The libutil Utility

libutil is a special utility that allows you to easily convert KSAM COPY libraries into text format COPY libraries. The utility also allows you to create individual COPY files from KSAM or text format COPY libraries. libutil i has several options.

To create individual COPY files from COPY libraries the usage is:

MPE:

libutil "-x[b] [copylib [group]]"

POSIX:

libutil  -x[b] [copylib [group]]

where:

copylib is a KSAM or text file. copylib defaults to COPYLIB.

group is the name of an existing group or directory. group defaults to the current group or directory.

If only -x is specified, the output file type is MPE fixed ASCII. If -xb is specified, the output file type is HFS bytestream ASCII. Use the -xb option if your copy libraries have copyfile names with hyphens in them.

One COPY file is created for each entry in the COPY library. The name of each COPY file is derived from the name of the entry in the COPY library. For example, if you want to extract all of your COPY files from a COPY library called MYLIB into a group called MYCPY in an account named ACUCOBOL, from MPE you can use the command:

libutil "-x MYLIB MYCPY.ACUCOBOL"

To create a text file version of a KSAM COPY library the usage is:

MPE:

libutil "-c[b] [KSAM-copylib [ASCII-copylib]]"

POSIX:

libutil -c[b] [KSAM-copylib [ASCII-copylib]]

where:

KSAM-copylib defaults to COPYLIB; and

ASCII-copylib defaults to COPYLIBA.

If only -c is specified, the output file type is MPE fixed ASCII. If -cb is specified, the output file type is HFS bytestream ASCII. Because some HP editors cannot edit files that do not have sequential line numbers, libutil resequences the line numbers in the output file, starting with 000001 and incrementing by one. For example, if you want to convert a KSAM COPY library called MYLIB into a text file called MYLIBA, from MPE you can use the following command:

libutil "-c MYLIB MYLIBA"

For more information on how libraries are used by the ACUCOBOLGT compiler, see COPY Statement.