Delete system file
Component: | BS2000 |
Functional area: | Job processing |
Domain: | FILE |
Privileges: | STD-PROCESSING |
Routing code: | $ (with NBCONOPI=N) or E (with NBCONOPI=Y) |
Function
The DELETE-SYSTEM-FILE command deletes the contents of a system file logically. If a file has been allocated to the system file to be deleted, the contents of that file will be logically deleted, but the allocation will remain in effect. This enables the user to delete an allocated file without removing the allocation to a system file. The DELETE-FILE command cannot be used on the allocated file since the file is open.
If the logical system file SYSLST is specified, only the part that was created after the last COPY-SYSTEM-FILE command can be deleted, regardless of whether the COPY-SYSTEM-FILE command was executed successfully.
See section "System files" in chapter "Volume 1: General Part" and the description of the COPY-SYSTEM-FILE command.
Format
DELETE-SYSTEM-FILE | Alias: DLSF | ||||||||||||||||||||||||||||||||
|
Operands
SYSTEM-FILE = *SYSLST / *SYSOUT / *OMF / *SYSLST-NUMBER(...) / *ALL-SYS(...)
The name of the system file to be deleted.
The contents of the specified system file, or the (cataloged) SAM file allocated to it, will be logically deleted.
Any existing allocation will be retained. After its deletion, data will be written to the file starting at its beginning.
SYSTEM-FILE = *SYSLST
The contents of the specified system file, or the (cataloged) SAM file allocated to it, will be logically deleted.
SYSTEM-FILE = *SYSOUT
The contents of the specified system file, or the (cataloged) SAM file allocated to it, will be logically deleted.
SYSTEM-FILE = *OMF
Deletes the EAM object module file, which is produced and used by the language processor, for the job currently running. If this file is empty, the command will be ignored. This case does not trigger a spin-off mechanism or SDF-P error handling in procedures.
SYSTEM-FILE = *SYSLST-NUMBER(...)
The contents of the allocated SAM file will be logically deleted. The existing allocation will be retained; after its deletion, data will be written to the file starting at its beginning. The command will be rejected if the system file SYSLST-NUMBER is not allocated to a (cataloged) SAM file.
SYSLST-NUMBER = <integer 1..99> / <filename 1..2 with-wild(73)
The number of the SYSLST file which is to be deleted. This must always be given as a two-digit number. Several numbers may be specified by using a sequence of wildcards.
SYSTEM-FILE = *ALL-SYS(...)
Enables several system output files to be deleted simultaneously.
SYS-IDENTIFIER = <filename 1..3 with-wild(76)>
Deletes one or more system output files, which can be specified by a sequence of wildcards. The name of the system file is specified without its SYS prefix, e.g. LST for the SYSLST system file.
DIALOG-CONTROL = *STD / *NO / *ERROR / *FILE-CHANGE /*MORE-THAN-ONE-FILE
Specifies whether and under what conditions a verification dialog is to be conducted with the user during the deletion process.
The verification dialog mechanism is available only in interactive mode, though that does include procedures. The only operand value that you can specify in batch mode is *STD or *NO.
The user can intervene with the following inputs:
Y: the specified file or file set will then be deleted.
N: the specified file or file set will not be deleted.
T: processing of the command will be terminated.
?: the possible responses will be listed, with an explanation of each.
In addition, the following options can be specified, separated by commas:
,CHECK = NO
The DIALOG-CONTROL mode will be changed to ‘*NO’.,CHECK = MULTIPLE
The DIALOG-CONTROL mode will be changed to ‘*MORE-THAN-ONE-FILE’.,CHECK = SINGLE
The DIALOG-CONTROL mode will be changed to ‘*FILE-CHANGE’.,CHECK = ERROR
The DIALOG-CONTROL mode will be changed to ‘*ERROR’.,IGNORE = list-poss(2): ACCESS / EXDATE
Specifies which protection attributes are to be ignored during deletion.,PASSWORD = list-poss(3): <c-string 1..4> / <x-string 1..8> /<integer -2147483648..2147483647>
Enables password-protected files to be deleted (maximum of 3 passwords).
DIALOG-CONTROL = *STD
The default *STD setting is equivalent to *MORE-THAN-ONE-FILE in an interactive dialog (when SYSCMD is connected to the terminal) and to *NO in procedures and in batch mode.
DIALOG-CONTROL = *NO
The user cannot intervene in DELETE-SYSTEM-FILE processing; all the specified files will be deleted.
DIALOG-CONTROL = *ERROR
If deletion of the selected files proceeds without error, they will be deleted immediately, as when *NO is specified (i.e. no verification dialog). However, if a user-correctable error occurs, then a verification dialog takes place as for DIALOG-CONTROL=*FILE-CHANGE. In the event of an error, the user may acknowledge the error message, abort DELETE-SYSTEM-FILE processing or attempt to rectify the error. If he wishes, he can also change the DIALOG-CONTROL mode (see also the possible forms of intervention listed under the first DIALOG-CONTROL operand).
DIALOG-CONTROL = *FILE-CHANGE
For each system file to be deleted, the user has the intervention options described under the first DIALOG-CONTROL operand. For each file which is to be processed, the user can decide in a dialog whether it should be deleted or not (response: YES/NO). If in the dialog he specifies protection attributes under “IGNORE”, or one or more passwords under “PASSWORD”, these will be taken into account for any selected file and, if satisfied, the file will be deleted without further queries (“YES” must also be specified). The user can also abort DELETE-SYSTEM-FILE processing, or change the DIALOG-CONTROL mode.
DIALOG-CONTROL = *MORE-THAN-ONE-FILE
If exactly one system file is specified, this file will be deleted immediately. If SYSTEM-FILE is partially qualified, which means that more than one file is selected, or if “pathname” contains wildcards, the user can decide, each time the catalog ID changes, whether files from the new catalog are to be deleted (see the intervention options described for the first of the DIALOG-CONTROL operands). He must respond to the question issued by the system with “YES” or “NO”. DIALOG-CONTROL = *MORE-THAN-ONE-FILE is useful if wildcards are specified for “catid” in the FILE-NAME operand. In the dialog, DELETE-SYSTEM-FILE processing can be terminated, or the DIALOG-CONTROL mode can be changed.
OUTPUT = *STD / *NO / *SYSOUT
The user can specify whether a message (DMS0800
) with the name of the deleted file is to be output to SYSOUT for each successful deletion. The default setting *STD is equivalent to OUTPUT=*NO.
OUTPUT = *NO
No messages are output to SYSOUT for successfully deleted files.
OUTPUT = *SYSOUT
For each file that is successfully deleted, a message with the name of that file is output to SYSOUT.
SUPPRESS-ERRORS = *NONE / list-poss(3): <alphanum-name 7..7>
In procedures the user can specify whether the spin-off mechanism or SDF-P error handling is to be triggered every time an error occurs (apart from syntax errors), or whether specific error conditions are to be ignored.
SUPPRESS-ERRORS = *NONE
All errors will trigger the spin-off mechanism or SDF-P error handling. The deletion of an empty system file is not treated as an error.
SUPPRESS-ERRORS = list-poss(3): <alphanum-name 7..7>
The user can define which errors are to be ignored by means of their DMS error codes (alphanum-name 7..7). If the specified error occurs, the spin-off mechanism will not be triggered. A maximum of 3 error codes may be specified.
DMS error code: 7 characters, of which the first three are always “DMS”; the last
4 characters identify the error; the digits 0..9 and letters A..F are permitted. When error codes are entered, no check is made to verify that valid error codes have been specified.
A detailed list of valid DMS error codes can be found on the manual server (URL: http://bs2manuals.ts.fujitsu.com ) by means of an HTML application and on the “BS2000 SoftBooks” DVD.
Return codes
(SC2) | SC1 | Maincode | Meaning/Guaranteed messages |
---|---|---|---|
0 | CMD0001 | Command executed | |
1 | 0 | CMD0001 | No action required |
1 | CMD0202 | Syntax or semantic error in command | |
32 | DMS0584 | A state that does not allow the function to continue was reported during processing. | |
64 | DMS0572 | SYSLST file not allocated to DMS file | |
64 | DMS0574 | DMS error when deleting a system file | |
64 | DMS0587 | Use of the specified command has been restricted by systems support | |
130 | DMS0524 | System address space exhausted | |
130 | DMS0594 | Not enough virtual memory available |