Use FileDelete to delete a file.
FileDelete may also be entered as FileDel[ete], FilePur[ge], DeleteFile, DelFile, PurgeFile, PurFile, or Pur[ge].
Required Operands
FILE is the BIM, workstation, PDS, or VSE file to be deleted. If FILE is specified as an asterisk (*), the last referenced file is deleted.
Optional Operands
OPT [relevant for BIM files only] may be specified as NOPGCTL to disable the purge control option if the host BIM-EDIT MMPPGCTL variable is set to 1. If the host BIM-EDIT ARCHIVE feature is installed it may be specified as FORCE to allow purging of members contained in either the $SIT.GEN or $SIT.ARCHIVE libraries. These libraries are normally maintained using the ARCHIVE and RECOVER commands. You must have ADM level security to use the FORCE and NOPGCTL options.
FileDelete can also be invoked by entering the ContextDelete command while a FileLibrary or FileScan session is current.
FileDelete sets the last referenced file. This is typically not useful because no further processing can be done to the file.
If FILE is a Host file, and if file synchronization (see File Synchronization Facility) is active for the file, the corresponding workstation file is deleted as well. The opposite is not true, i.e., if FILE is a workstation file, and if file synchronization is active for the file, the corresponding Host file is not deleted.
For BIM files, if the host pre-defined variable MMPPGCTL has been set to 1, files can be retrieved for a short period of time after an erroneous FileDelete. Otherwise, the only possible way to retrieve a file after a FileDelete is to use the BIM-EDIT RESTORE from a backup tape.
When Valid
For host files, the user must have DEF access level for the FILE directory.
FILE cannot be either the slave or the master in a checkout relationship. (See the FileCheckDelete command to delete the slave copy in a checkout relationship.) FILE cannot be currently undergoing editing.
For BIM files, the file cannot have any active List sessions.
Return Codes
OK Successful.
CK File is part of a checkout relationship.
ED File is being edited.
LI File has active List session(s).
NF File not found.
SC Inadequate access level.
Procedure Notes
FileDelete sets the TXM variables to the attributes of FILE.
Examples
Delete workstation file \PE00\ApcIssu.C:
=> pur \pe00\apcissu.c
Delete BIM file TKRMBR1:
=> pur tkrmbr1
End the current List session and delete the file associated with the session:
=> end;pur *