PreviousInfomgr ProfilerNext

Chapter 10: Library: Command Line Interface

This chapter describes the Library utility.

10.1 Overview

Library enables you to groups individual files into one file. You also can use Library to group together static source code to create copy libraries. Using Library gives you the following advantages:


You invoke Library from the operating system command line; it 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 [filename...] [==library-name]

where the parameters are:

filename A file to be included in the library, or a library whose contents are to be included in the library, 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.

filename 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 filename, 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 filename 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.

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 filenames individually. To create a batch file, enter the COBOL Editor; type one filename on each line in the file starting at column one; then save the file using a .lbt extension. This file contains the filenames 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 filenames with a pathname 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:


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

PreviousInfomgr ProfilerNext