


You can create object libraries with the cblutil program provided with the runtime system. This utility has the following format:
cblutil -lib [options] modules
When you are creating 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 then 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 will replace 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 of 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:
-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 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.
Examples:
To create a library called "mylib.out" that consists of two ACUCOBOL-GT objects named prog1.out and prog2.out:
cblutil -lib -v -o mylib.out prog1.out prog2.out
Wild cards are permitted:
cblutil -lib -v -o mylib.out prog1.out otherdir/*.*
To add modules to an existing library, do not use the "-o" argument. For example, to add prog3.out and prog4.out to mylib.out, do this:
cblutil -lib -v mylib.out prog3.out prog4.out