Copy contents of logical system file
| Component: | SYSFILE | 
| Functional area: | File processing | 
| Domain: | JOB  | 
| Privileges: | STD-PROCESSING | 
Function
The COPY-SYSTEM-FILE command copies the contents of the logical system file SYSLST, for which the primary assignment is in force, to a file. The user can thus have the contents stored in a cataloged file without having previously performed a corresponding assignment of SYSLST. The present contents of SYSLST are immediately accessible to the user in the specified file, i.e. there is no need to wait until a listing is available which is only produced at the end of the job or previously by means of PRINT-DOCUMENT. After the copy operation, output to the logical system file is continued.
The part of the logical system file SYSLST that was copied with the COPY-SYSTEM-FILE command cannot be deleted. With the DELETE-SYSTEM-FILE command, only the part of the logical system file SYSLST that has been created since the last COPY-SYSTEM-FILE command can be deleted.
Format
Operands
 FILE-NAME =   *SYSLST
 Name of the logical system file whose contents are to be copied. The default value is the logical system file SYSLST.
 TO-FILE = <filename 1..54 without-gen-vers>
Name of the file to which the contents of the system files are to be copied. The specified file is opened with OPEN=OUTPUT, i.e. the contents of any existing file are lost. If insufficient storage space is available for the user ID, the command is rejected.
Return codes
| (SC2) | SC1 | Maincode | Meaning | 
|---|---|---|---|
| 0 | CMD0001 | Command executed | |
| 32 | SSM3284 | DMS error during command execution | |
| 64 | SSM3282 | System file has no primary assignment | |
| 64 | SSM3283 | System file is empty |