Getting Object Information

The cblutil program can output useful information stored in the header of an object file or object library. The format of the command is:

cblutil  -info  [-x]  files

The options used to compile a COBOL program are automatically embedded in the program's object file. The -x option to the -info command causes cblutil to output all the options used to compile the object file.

Each file named on the command line is examined to determine if it is an object module or object library. If it is an object module, its size and other information is output. If the file is an object library, information is output for each module the library holds.

In each report, cblutil includes information that indicates whether the module is in debug-mode. Because programs compiled for source-level debugging can be quite large, it can be helpful to run reports on a regular basis to see if you have accidentally left any programs in debug-mode.

For example, the following could be run on a UNIX system every night:

cblutil  -info  /objects/* | grep  "debug"  >  /tmp/debug

This command creates a file called /tmp/debug that lists every program in the /objects directory that is in debug-mode.

The cblutil program also reports whether or not table-boundary checking is enabled in an object file, and, if the object contains an embedded comment, lists the comment.