The Library File

The oldlibrary field specifies the name of an existing library or a library to be created. If you omit the filename extension, LIB assumes an extension of .LIB. You can specify a full path with the filename.

IMPORTANT:

The path and filename cannot contain a dash character (–). LIB interprets the dash as the LIB “delete” operator.

Creating a Library File

To create a new library file, give the name of the library file you want to create in the oldlibrary field of the command line or at the Library name: prompt. LIB supplies the .LIB extension.

The name of the new library file must not be the name of an existing file. If it is, LIB assumes that you want to change the existing file. When you give the name of a library file that does not currently exist, LIB displays the following prompt:

Library file does not exist. Create?

Press Y to create the file or N to terminate the library session. If the library name is followed immediately by commands, a comma, or a semicolon, LIB suppresses the message and assumes Y.

Performing Consistency Checks

If oldlibrary is followed immediately by a semicolon (;), LIB performs only a consistency check on the specified library to see if all the modules in the library are in usable form. LIB prints a message only if it finds an invalid object module; no message appears if all modules are intact. LIB puts the message in the listing file if one is created; otherwise, it writes the message to the standard output.

The following example causes LIB to perform a consistency check of the library file FOR.LIB, if the library file exists.

LIB FOR;

No other action is performed. LIB displays any consistency errors it finds and ends the session. If FOR.LIB does not exist, LIB creates an empty library file with that name.