LOADLIB
Authorization
General User
Purpose
Use the LOADLIB command to list, map, copy, or compress a CMS LOADLIB. CMS LOADLIBs can be merged, and specified members can optionally be selected or excluded during the merge.
Operands
- LIST
- lists by member name, the contents of the CMS LOADLIB specified by fileid1, and gives a hexadecimal representation of each member's size. Specifying a fileid1 that is a concatenated SYSUT1 results in an error message indicating this is not supported.
- MAP
- has the same function as the LIST operand.
- COMPress
- recreates a LOADLIB with the same name as the specified file (fileid1), and deletes all obsolete members from the new data set.
- COPY
- copies members of fileid1 into fileid2. If
fileid2 already exists, MODIFY or REPLACE must be specified. If you
specify MODIFY, existing members are not replaced in the output data set, but new members are added.
If you specify REPLACE, existing members are replaced in the output data set and new members are
added.
You must specify SYSIN control statements. If you do not specify SYSIN control statements in a SYSIN dataset (fileid3), you will be prompted for them at the terminal with the message: ENTER
SYSIN Control Statements for the Copy Function
- SELECT
- copies only selected members of a data set. Each member to be copied must be named in a separate
line entry following the SELECT statement. Note: If you specify the SELECT statement, the LOADLIB command does not replace existing members of a data set. If you want to replace an existing member of a data set, you must specify (R) immediately following the member name:
membername(R
ormembername(R)
- EXCLUDE
- copies a whole data set except for a few members. Each member to be excluded must be named in a separate line entry following the EXCLUDE statement. You can exclude up to 256 members for each COPY function.
Note: Indicate the end of control statements from the terminal by entering a null line; EOF serves this purpose in a SYSIN file. If you want to copy an entire data set, specify COPY and enter a null line at the terminal (or include a blank line in a SYSIN file). To avoid unexpected results, clear the file definitions used by the COPY function before specifying new file identifiers in subsequent LOADLIB commands.
Note: You may specify the LOADLIB function (LIST, MAP, COMPRESS, COPY) either on the command line or
in the SYSIN data set (fileid3). If you specify the function in the SYSIN
data set, you must issue the FILEDEF command for fileid1, fileid2 (if
required), and fileid3 before you issue the LOADLIB command. (You must use
the full function name in the SYSIN data set, not the abbreviation. You must also use the full name
of any options you have specified in the command line.) However, if you specify the function on the
command line, fileid1, and optionally, fileid2
and fileid3 may be specified either on the command line or defined with
FILEDEF commands. Any FILEDEF commands issued by the user remain in effect after the command
function completes. During subsequent use of LOADLIB functions, file definitions which have not been
cleared or reissued may override the file identifiers entered in the LOADLIB command line.
- fileid1
- is the file name, file type, and file mode of the input LOADLIB. This data set is referred to as the SYSUT1 data set. SYSUT1 is always required. An OS load library may not be directly specified as input; it must be related to a CMS file ID using the FILEDEF command.
- fileid2
- is the file name, file type, and file mode of the output LOADLIB. This data set is referred to as the SYSUT2 data set. If the SYSUT2 data set already exists, either MODIFY or REPLACE must be specified. If a SYSUT2 data set is not specified, LOADLIB SYSUT2 A (or the file mode of the first available read/write disk or directory) is the default. When the default SYSUT2 file is used and no errors occur, fileid1 is erased and the new file is renamed fileid1.
- fileid3
- is the file name, file type, and file mode of the control data set. This data set is referred to as the SYSIN data set. If no SYSIN data set is specified, the user is prompted at the terminal to enter LOADLIB functions or SYSIN COPY control statements.
Note: The file containing the SYSIN control statements must be a Fixed 80 (RECFM=F, LRECL=80)
file.
Options
Options Entered in the Command Line
- TERM
- directs printer output to the terminal. The default is TERM.
- TYPe
- directs printer output to the terminal. (This option is the same function as the TERM option.)
- directs printer output to the printer.
- DISK
- directs printer output to a disk or directory. The DISK option creates a file named LOADLIB LISTING A1.
- REPlace
- replaces all existing members of a data set and adds new members. To replace only selected members of a data set, see the Select operand.
- MODIFY
- does not replace existing members of a data set; adds new members.
Usage Notes
- If a LOADLIB COPY or COMPRESS into an existing LOADLIB results in a CMS ABEND001, check the integrity of the LOADLIB directory. If the file, $PDSTEMP LOADLIB, exists on your disk or SFS directory, do not erase it. The $PDSTEMP LOADLIB file contains the updated LOADLIB directory. Reissue another LOADLIB COPY or COMPRESS command where the modified output LOADLIB is the SYSUT1 data set and omit the SYSUT2 data set from the command input. If the command is successful, the LOADLIB's directory will be restored.
- To select or exclude members of a data set, enter the LOADLIB COPY command and press Enter. When
you receive the status message
VM READ
orEnter a command or press a PF or PA key
, type in SELECT or EXCLUDE (or press Enter to copy the entire data set). When you receive another status messageVM READ
orEnter a command or press a PF or PA key
, type the name of the first data set member to be selected or excluded and press Enter. For each successive status message ofVM READ
orEnter a command or press a PF or PA key
, type the name of the dataset to be selected or excluded. When you have specified each data set member you choose to select or exclude, enter a null line to end the command. - Although SELECT and EXCLUDE are both valid control statements for the LOADLIB COPY command, they must be used separately. Interchanging SELECT and EXCLUDE statements within the same command routine may lead to unpredictable results.
Examples
These are two examples of using FILEDEF and LOADLIB:
- In this case, the function (COPY) is specified in the command line, so the abbreviation REP can
be used for the REPLACE option.
Where in CONTROL FILE A you have:filedef sysut1 disk lib1 loadlib a filedef sysut2 disk lib2 loadlib a filedef sysin disk control file a loadlib copy (rep term
SELECT MEMB1 MEMB2
- In this case, the function (COPY) is specified in the control file. The full option name,
REPLACE, must therefore be used in the command line.
Where in CONTROL FILE A you have:filedef sysut1 disk lib1 loadlib a filedef sysut2 disk lib2 loadlib a filedef sysin control file a loadlib (replace term
COPY SELECT MEMB1 MEMB2
Responses
- MEMBER
- member name HAS BEEN COPIED|EXCLUDED.
- ALIAS
- alias name HAS BEEN COPIED|EXCLUDED.
- ALIAS
- alias name NOT COPIED. MEMBER member name FOR THE ALIAS NOT FOUND. An EXCLUDE or SELECT statement controlled the COPY function, and the SYSUT2 data set did not contain the parent member for the alias. The member may not have been moved from the SYSUT1 data set because it was excluded, it was not specified in the SELECT list, or the member name did not precede the alias name in the SELECT list.
- MEMBER
- member name HAS BEEN REPLACED IN DATA SET.
- MEMBER
- member name DOES NOT EXIST BUT HAS BEEN ADDED TO DATA SET. REPLACE was specified but the member was not in the output data set, therefore the member was added to the output data set.
- MEMBER
- member name COPY UNSUCCESSFUL. An error occurred while trying to add/replace the member in the output data set. (For example, if MODIFY was specified and the member already existed in the output data set.) The COPY continues with the next member to be copied.
- MEMBER
- member name NOT FOUND. The member requested was not found in the input data set.
- MEMBER
- member name NOT COPIED. WRONG LENGTH NOTE LIST FOUND.
- MEMBER
- member name NOT COPIED. NOTE LIST UPDATE LOGIC ERROR.
- USER TTR WAS NOT UPDATED
- NOTE LIST TTR OR RECORD WAS NOT UPDATED
Messages and Return Codes
- DMS003E Invalid option: option
- DMS014E Invalid function function [RC=24]
- DMS024E File fn ft fm already exists [RC=28]
- DMS032E Invalid filetype ft [RC=24]
- DMS037E Output filemode mode is accessed as read/only [RC=36]
- DMS039E No entries in library fn ft fm [RC=32]
- DMS042E No fileid(s) specified [RC=24]
- DMS047E No function specified [RC=24]
- DMS048E Invalid file mode fm [RC=24]
- DMS054E Incomplete fileid specified [RC=24]
- DMS062E Invalid character char in fileid fn ft [RC=20]
- DMS065E option option specified twice [RC=24]
- DMS066E option1 and option2 are conflicting options [RC=24]
- DMS069E Filemode mode is not accessed [RC=36]
- DMS073E Unable to open file ddname [RC=28]
- DMS188W SYSUT2 header is invalid because of blocksize incompatibility; user action required [RC=4]
- DMS189E The LIST function of the LOADLIB command does not support concatenated SYSUT1 [RC=24]
- DMS901T Unexpected error at vstor1: plist function fn ft fm at vstor2, base vstor3, rc=nn [RC=31│55│70│76│99│256]
- DMS907T I/O error on file fn ft fm [RC=256]
- DMS1144E Implicit rollback occurred for work unit workunitid [RC=31]
- DMS1252T Rollback unsuccessful for file pool filepoolid
Additional system messages may be issued by this command. The reasons for these messages and their location are:
Reason | Location |
---|---|
Errors in the Shared File System | File Pool Server Messages |
Errors in using a file | File Error Messages |
Errors in copying a file | Messages and Return Codes |
Errors in command syntax | Command Syntax Error Messages |