Creating Object Libraries

You can create object libraries with the cblutil program provided with the ACUCOBOL-GT runtime system. This command line has the following format:

cblutil  -lib  [options]  modules

When you create a new object library, the first module specified becomes the primary module. All other modules are simply added to the library. If no options are specified, then the first module specified is converted from an object file or resource into an object library, and the remaining modules are added to it.

The first module may also be an object library. In this case, the remaining modules are added to the library. Any module that has the same name as one already contained in the library automatically replaces the one in the library.

The modules may be any type of file. If an input file is a COBOL object, then cblutil includes it in the resulting library as a COBOL object. Any other type of file is included as a resource. If an input file is another library, then each component of that library is individually added to the resulting library. The resulting library may consist entirely of COBOL objects, entirely of resources, or a mixture of the two.

A total of 1024 modules can be placed in a single library.

Options can be one or more of the following:

-c Used to embed a comment in the object library. This flag must be followed by the comment. Comments with embedded spaces must either be between quotation marks, or include the shell's escape character before each space.
-o     This option must be followed (as the next separate argument) by a file name. This file becomes the new object library. If a file exists by that name, it will be deleted first.
-v Causes cblutil to be verbose about its progress.
-r Causes the separate modules to be deleted after they have been added to the object library. If -o has not been specified, then the first module (which becomes the new library) is not deleted.