Delete file generation group and generations
Component: | BS2000 |
Functional area: | File processing |
Domain: | FILE-GENERATION-GROUP |
Privileges: | STD-PROCESSING |
Routing code: | $ (with NBCONOPI=N) or E (with NBCONOPI=Y) |
Function
With the DELETE-FILE-GROUP command, a user can delete file generation groups, and their associated file generations, which are cataloged under his own user ID, and selected according to criteria which must be specified in the command. If the specified file is neither a file generation group nor a file generation, it will still be deleted. Specific deletion operations allow the user to release storage space. The user is assisted in doing this by a guided dialog. The operands of the DELETE-FILE-GROUP command can be divided into four groups, which correspond to the different functional levels of the command (see "Overview of functions" in section "DELETE-FILE-GROUP").
Selection
Using the selection parameters, the user specifies which file generation groups/catalog entries are to be processed. The attributes stored in the catalog entries are used as selection criteria. For this purpose, some of the operands in the DELETE-FILE-GROUP command correspond with those of the SHOW-FILE-ATTRIBUTES command.
File protection
File protection parameters make it unnecessary for the user to input a MODIFY-FILE-GROUP-ATTRIBUTES or ADD-PASSWORD command in order to delete files for which file protection attributes such as passwords, retention period, etc. are defined.
Action parameters
Action parameters control the internal execution of the DELETE-FILE-GROUP command. The user can, on the one hand, determine the scope of the deletions, and on the other hand can define conditions for deletion.
Control parameters
Control parameters permit the user to define his own user interface, within certain limits. For example, he can use interactive prompts in the dialog, or can request a SYSOUT log, or have DMS errors ignored (for the spin-off mechanism or SDF-P error handling).
Privileged functions
The privileged functions for system support staff include specification of any user ID, the ability to ignore protection attributes of the file generations being deleted and, in the case of a user ID change, to branch to guided dialog.
By default, systems support (TSOS privilege) is a co-owner of all the files (and can, therefore, delete file generation groups under any user ID). When SECOS is used, this co-ownership can be restricted.
In conjunction with the SECOS software product, a user can allow other user IDs to act as co-owners of the file generation groups of his user ID. Co-owners of a user ID are then also allowed to delete file generation groups.
Overview of functions
Function / Meaning | Level 1 operands | Level 2/3 operands |
The name of the file generation group to be deleted | ||
Criteria for selection of the file generations to be deleted | ||
Date specification | ||
| EXPIRATION-DATE TIME | |
| FREE-FOR-DELETION TIME | |
Storage space | ||
| SUPPORT | |
| =*ANY | |
| ||
| ACCESS | |
| USER-ACCESS | |
| BASIC-ACL | |
| PASSWORD | |
| GUARDS | |
| SPACE-RELEASE-LOCK | |
| CODED-CHARACTER-SET | |
| BACKUP-CLASS | |
| MIGRATE | |
| MANAGEMENT-CLASS | |
| WORK-FILE-GROUP | |
Deletion parameters | ||
| =*ALL | |
| =*SPACE | |
| =*DATA | |
| =*DATA-KEEP-ATTRIBUTES | |
| =*DESTROY-ALL | |
Mount request | ||
Control parameters | ||
| =*NO | |
| =*MORE-THAN-ONE-FILE | |
| =*ERROR | |
| =*CATALOG-CHANGE | |
| =*FILE-CHANGE | |
| =*USER-ID-CHANGE | |
Message for successfully deleted files | ||
| =*NO | |
| =*SYSOUT | |
Ignore protection attributes | ||
| =*ACCESS | |
| =*EXPIRATION-DATE | |
| =*WRITE-PASSWORD / *READ-PASSWORD | |
Ignore password protection provided by specified passwords | ||
Suppress error situations |
Format
DELETE-FILE-GROUP | Alias: DLFGP | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Operands
GROUP-NAME = *DUMMY / <filename 1..54 without-gen-vers with-wild(80)>
The name of the file generation group (FGG) which is to be deleted. If the specified file is not a file generation group (and also not a file generation), then it will still be deleted. Only the user’s own user ID or a user ID for which the user is co-owner may be specified.
GROUP-NAME = *DUMMY
Designates the dummy file generation group *DUMMY, which “always exists”, and which satisfies all selection criteria. Any other operands (except for DIALOG-CONTROL, OUTPUT, and SUPPRESS-ERRORS) will be checked for their formal correctness, but otherwise ignored. If *DUMMY is specified, no catalog or data access is necessary. The main use of *DUMMY is in testing procedures.
SELECT = *ALL
All the files in the set specified by GROUP-NAME are selected.
SELECT = *BY-ATTRIBUTES(...)
Restricts the files in the set specified by GROUP-NAME to FGGs for which the fields in the group entry satisfy the criteria which follow. The default values, *ANY and ANY, each indicate that the file set is not to be restricted to any particular values for the attribute concerned.
For descriptions of the selection criteria see the DELETE-FILE-GENERATION command, which is used to delete file generations only.
OPTION = *ALL / *SPACE / *DATA / DATA-KEEP-ATTRIBUTES / *DESTROY-ALL
Controls the deletion of the file.
If DESTROY-BY-DELETE=YES
was defined in the catalog entry of the file, the file or released storage space will definitely be overwritten with binary zeros. If this is not the case and if OPTION=DESTROY-ALL was also not specified, the file or released storage space will be deleted only logically, rather than being overwritten.
OPTION = *ALL
The default setting for disk files.
The group entry and the catalog entries for the selected file generations are to be deleted and their storage space will also be released.
OPTION = *SPACE
Only for file generations on public disks (for tape files the default value *ALL applies):
The storage space for the file generations deleted by DELETE-FILE-GROUP is released, but the catalog entry is retained, although amended: it is then identical with a catalog entry created by a CREATE-FILE-GROUP command.
For private disks, the SPACE operand will be rejected.
OPTION = *DATA
Only for disk files (for tape files the default value *ALL applies):
The data in the selected files is “logically deleted”. After this, the user can no longer access the data, since he is no longer permitted to physically access the volume concerned. The group entry and storage space allocation still exist. The catalog entries for the file generation are identical to those for a file generation which was created using CREATE-FILE-GENERATION but which has not yet been opened (FILE-STRUC=NONE, CRE-DATE=NONE).
OPTION = *DATA-KEEP-ATTRIBUTES
Only for disk files (for tape files the default value *ALL applies):
The data of the file generations involved is “logically deleted” as with OPTION=*DATA, but the data-related file attributes are retained. The data can no longer be addressed by the user.
OPTION = *DESTROY-ALL
Only for disk files (for tape files the default value ALL applies): The storage space for the affected file generations is released and the group entry is deleted and the catalog entries of the file generation are deleted; in addition, the storage space thus released is overwritten with binary zeros so that, if the space is allocated again, nobody can read the old data (data protection). In the case of files on private disks, all the volumes on which the file was stored must be mounted at the time of deletion.
When a file is deleted, the action parameters are evaluated first. See the command EXPORT-FILE for details of exportation of file generations. “Data destruction” when a file is deleted can also be permanently recorded in the group entry for the file using the command CREATE-FILE-GROUP; in the group entry a “DESTROY” indicator is then set (DESTROY=YES). In this case storage space is released and it will be automatically overwritten.
MOUNT = *FIRST-DISK / *ALL-DISKS
Only for files on private disks: Specifies whether to mount all the private disks which hold any part of the file which is to be deleted. The user can request that only the first of the required private disks be mounted, or all of them. The MOUNT operand should be specified if the operands ALL or DESTROY-ALL are specified. For tape files or files on public disks, any MOUNT specification will be ignored.
MOUNT = *FIRST-DISK
It is only necessary for the first of the private disks, containing the start of the file generation and its group entry, to be online. The associated private disks do not have to be online.
MOUNT = *ALL-DISKS
All the private disks on which parts of the file are held must be online. If any of the disks are missing, the file will not be deleted; on completion of the DELETE-FILE-GROUP processing, the spin-off mechanism will be triggered.
DIALOG-CONTROL = *STD / *NO / *ERROR / *FILE-CHANGE / *MORE-THAN-ONE-FILE / *CATALOG-CHANGE / *USER-ID-CHANGE
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 = PVS The DIALOG-CONTROL mode will be changed to ‘*CATALOG-CHANGE’.
,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(4): ACCESS / EXDATE / RDPASS/ WRPASS Specifies which protection attributes are to be ignored during deletion. Only applies to a verification dialog for a single file generation group. RDPASS and WRPASS are available to privileged users only.
,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). Only applies to a verification dialog for a single file generation group.
DIALOG-CONTROL = *STD
The default value *STD corresponds to *MORE-THAN-ONE-FILE in interactive mode (SYSCMD is allocated to the terminal), and in procedures or in batch mode it corresponds to *NO.
DIALOG-CONTROL = *NO
The user cannot intervene in DELETE-FILE-GROUP processing; all the specified file generation groups will be deleted (without a verification dialog).
DIALOG-CONTROL = *ERROR
If deletion of the selected file generation groups 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. DIALOG-CONTROL = *ERROR applies implicitly if DIALOG-CONTROL = *FILE-CHANGE is set. In the event of an error, the user may acknowledge the error message, abort processing of DELETE-FILE-GROUP or attempt to rectify the error. If he wishes, he can also change the DIALOG-CONTROL mode.
DIALOG-CONTROL = *FILE-CHANGE
For each file generation group which is to be deleted, the user has the intervention options described under the first DIALOG-CONTROL operand. For each file generation group which is to be processed, the user can decide in a verification 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 generation group and, if satisfied, the file generation group will be deleted without further queries (“YES” must also be specified). The user can also abort DELETE-FILE-GROUP processing, or change the DIALOG-CONTROL mode.
The file generations which have been deleted will be listed in alphanumeric order.
DIALOG-CONTROL = *MORE-THAN-ONE-FILE
If exactly one file generation group is specified, this will be deleted immediately. If GROUP-NAME is partially qualified, which means that more than one group is selected, or if GROUP-NAME contains wildcards, the user can decide, each time the catalog ID changes, whether the file generation groups from the new catalog are to be deleted (see also the intervention options described under the first DIALOG-CONTROL operand). 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 the catalog ID in the GROUP-NAME. In the dialog, DELETE-FILE-GROUP processing can be terminated, or the DIALOG-CONTROL mode can be changed.
DIALOG-CONTROL = *CATALOG-CHANGE
As for DIALOG-CONTROL = *MORE-THAN-ONE-FILE, the system starts a dialog if file generation groups in different catalogs (pubsets) are affected by the DELETE-FILE-GROUP processing. The user can determine whether the file generation groups in the current pubset should be deleted (YES/NO), DELETE-FILE-GROUP processing should be terminated, or the DIALOG-CONTROL mode should be changed.
DIALOG-CONTROL = *USER-ID-CHANGE
Each time the user ID changes during the deletion of the file generation group, the system branches into the guided dialog.
OUTPUT = *STD / *NO / *SYSOUT
The user can specify whether a message (DMS0800
) with the name of the deleted file generation group 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 file generation groups.
OUTPUT = *SYSOUT
For each file generation group that is successfully deleted, a message with the name of that file generation group is output to SYSOUT.
IGNORE-PROTECTION = *NONE / list-poss(4): *ACCESS / *EXPIRATION-DATE / *WRITE-PASSWORD / *READ-PASSWORD
The user can specify whether any defined protection against write access or any defined retention period is to be ignored. Systems support staff can also ignore password protection. The specification of IGNORE-PROTECTION in the DELETE-FILE-GROUP command thus makes it unnecessary to issue MODIFY-FILE-GROUP-ATTRIBUTES commands to reset the protection attributes before the files can be deleted.
IGNORE-PROTECTION = *NONE
The protection attributes “read-only” (ACCESS=READ) and “retention period” (EXPIRATION-DATE) will be observed during deletion.
IGNORE-PROTECTION = *ACCESS
File generation groups for which protection against writing is defined by ACCESS=READ can still be deleted using DELETE-FILE-GROUP.
IGNORE-PROTECTION = *EXPIRATION-DATE
File generation groups which are still within their retention period (EXDATE > current date) may nevertheless be deleted using DELETE-FILE-GROUP.
IGNORE-PROTECTION = *WRITE-PASSWORD
Systems support staff are authorized to ignore the protection attribute write password when deleting the file generation group.
IGNORE-PROTECTION = *READ-PASSWORD
System support staff are authorized to ignore the protection attribute read password when deleting the file generation group.
PASSWORDS-TO-IGNORE = *NONE / *SECRET / list-poss(3): <x-string 1..8> / <c-string 1..4> /
<integer -2147483648..2147483647>
The user can specify one or more passwords, which will permit file generation groups protected by these passwords to be deleted. The passwords entered here are not recorded into the password table for the job and are valid only for the current DELETE-FILE-GROUP processing. Up to 3 passwords may be specified in the form of a list. In order to delete a password-protected file generation group, the password at the highest access level must be specified (see the ADD-PASSWORD command).
The operand has the following special characteristics:
The input field is automatically blanked out in the guided dialog.
In unguided dialog and foreground procedures, the entry *SECRET or ^, SDF provides a blanked out input field for inputting the password .
The password entered is not logged.
PASSWORDS-TO-IGNORE = *NONE
No passwords are specified.
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.
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 |
2 | 0 | DMS05F7 | File generation does not exist, but group entry is updated |
2 | 0 | DMS06D6 | Error on deleting certain files |
1 | CMD0202 | Syntactical or semantic error in command | |
32 | DMS0584 | A state that does not allow the function to continue was reported | |
64 | CMD0102 | Interrupted by K2 key | |
64 | CMD0216 | Privileges error | |
64 | DMS0501 | Requested catalog not available | |
64 | DMS0512 | Requested catalog not available | |
64 | DMS051B | Requested user ID not in pubset | |
64 | DMS051C | User not authorized to access pubset | |
64 | DMS0535 | Specified file not shareable | |
64 | DMS057B | Invalid operand for migrated file | |
64 | DMS057C | Processing not possible due to HSMS error | |
64 | DMS057D | File has been migrated and cannot be recalled without delay | |
64 | DMS057E | File has been migrated, and HSMS is not available | |
64 | DMS0585 | Error detected during catalog processing or multihost processing | |
64 | DMS0586 | Currently not possible to access or reserve volume | |
64 | DMS0587 | Use of specified command restricted by system administrator | |
64 | DMS05FC | Specified user ID not in HOME pubset | |
64 | DMS0609 | Access to system file not permitted | |
64 | DMS06FF | BCAM connection severed | |
130 | DMS0524 | System address space full | |
130 | DMS0582 | File is currently locked or in use and cannot be processed | |
130 | DMS0585 | Error detected during catalog processing or multihost processing | |
130 | DMS0586 | Currently not possible to access or reserve volume | |
130 | DMS0594 | Not enough virtual memory available |
Notes
If it is required to delete an FGG which is held on a private disk, then the device on which this disk is mounted will be requested for the job.
For files stored on private disks, if OPTION=*DESTROY-ALL is specified then all the volumes which hold the file group must be already mounted at the time the command is executed or, if DATA is specified, only the first volume which holds the file group has to be mounted. This rule also applies if a partially qualified file name is specified in the DELETE-FILE-GROUP command, thus addressing a number of files. In this situation, it is not necessary that all the volumes for all the files are mounted simultaneously. The system will determine which of the files requires the most devices and will request the corresponding number of devices.
If an error arises during the deletion of a file generation group or some of the generations in a group, then any remaining file generations which are present will not be deleted, and the catalog entry for the file generation group will be updated.
Example
/show-file-attr max.group.4,select=(generation=*yes) ————————————— (1)
% 0 :2OS2:$USER1.MAX.GROUP.4 (FGG) % 3 :2OS2:$USER1.MAX.GROUP.4(*0002) % 3 :2OS2:$USER1.MAX.GROUP.4(*0003) % 3 :2OS2:$USER1.MAX.GROUP.4(*0004) % 3 :2OS2:$USER1.MAX.GROUP.4(*0005) % 3 :2OS2:$USER1.MAX.GROUP.4(*0006) %:2OS2: PUBLIC: 6 FILES RES= 15 FRE= 15 REL= 15 PAGES
/del-file-gr group-name=max.group.4,output=*sysout —————————————————— (2)
% DMS0800 SPECIFIED FILE ':2OS2:$USER1.MAX.GROUP.4(*0002)' DELETED ————————— (3) % DMS0800 SPECIFIED FILE ':2OS2:$USER1.MAX.GROUP.4(*0003)' DELETED % DMS0800 SPECIFIED FILE ':2OS2:$USER1.MAX.GROUP.4(*0004)' DELETED % DMS0800 SPECIFIED FILE ':2OS2:$USER1.MAX.GROUP.4(*0005)' DELETED % DMS0800 SPECIFIED FILE ':2OS2:$USER1.MAX.GROUP.4(*0006)' DELETED % DMS0800 SPECIFIED FILE ':2OS2:$USER1.MAX.GROUP.4' DELETED
/show-file-attr max.group.4,select=(gen=*yes) —————————————————————————— (4)
% DMS0533 REQUESTED FILE NOT CATALOGED IN PUBSET '2OS2'.COMMAND TERMINATED
(1) | The SHOW-FILE-INFORMATION command returns information on the catalog entries for the file generation group MAX.GROUP.4 and its existing generations. |
(2) | The DELETE-FILE-GROUP command is to be used to delete the file generation group, i.e. all generations as well as the group entry. A separate message is to be output to SYSOUT for each deleted catalog entry (operand OUTPUT=*SYSOUT). |
(3) | The messages sent to SYSOUT indicate the generations *0002 to *0006 and the group entry for the file generation group MAX.GROUP.4 have been deleted. |
(4) | The SHOW-FILE-ATTRIBUTES command confirms that all catalog entries for the file generation group MAX.GROUP.4 have been deleted. |