PreviousInfomgr ProfilerNext

Chapter 10: Library: Command Line Interface

This chapter describes the Library utility, which groups individual files into one file. You also can use Library to group together static source code to create copy libraries.

10.1 Overview

Using Library gives you the following advantages:


Warnings:


Library is invoked from the operating system command line and runs in batch mode. The following sections describe how to invoke Library, how to create a Library batch file and how to access files in libraries.

10.2 Invoking Library

To invoke Library, enter:

library filename-1 [file-name-2...] [==library-name]

where the parameters are:

filename-n Either a file to be included in the library, a library whose contents are to be included, or a library batch file (see below).
library-name The library to be saved. If this is not specified the library, takes the name of the first parameter, thus filename-1.lbr.

file-namen and library-name can include drive and/or path. If these are unspecified the current directory is assumed.

If you specify a .lbr library file as a file-namen, the new library includes all the files contained in the old library.

For libraries that you are going to create and recreate frequently, you can write a library batch file (.lbt file) which contains the list of files to be included in the library. See the section Creating a Library Batch File below.

If an overlaid program is in a library, all the overlays must be in the same library as the program root segment.

Because file-name can include a library name as part of the path, you can use the Library Utility to copy files from one or more existing libraries into a new library. You must give the name of the new library by using the library-name parameter.

Example:
library $COBDIR/mylib1.lbr/linein.gnt == mylib2.lbr

10.3 Creating a Library Batch File

Batch files can be used with the load function to save you entering file-names individually. To create a batch file, enter the COBOL Editor; type one file-name on each line in the file starting at column one; then save the file using a .lbt extension. This file contains the file-names only, not the actual files.

To run a library batch file, enter:

library batch.lbt == library-name

where the parameters are:

batch.lbt The file you have just created, containing the list of files to be included in the library.
library-name As described previously. However, in this case, if you do not specify, library-name, the library is assigned the name batch.lbr.

You can prefix any of the file-names with a path-name identifier.

10.4 Accessing Files in Libraries

The following program operations obtain access to files in libraries:

Files within libraries can be found only if the library is open. There are several ways to open a library:


Notes:



Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousInfomgr ProfilerNext