Guardian Procedure Calls Reference Manual

Condition Code Settings
indicates that the PURGE failed (call FILEINFO or FILE_GETINFO_). Note, however, that in the case
of a disk free-space error (such as file-system errors 52, 54, 58), the file is purged, and an error returns.
< (CCL )
indicates that the file purged successfully.=(CCE)
indicates that the device is not a disk.> (CCG)
Considerations
Purge failure
If PURGE fails, the reason for the failure can be determined by calling FILEINFO or
FILE_GETINFO_, passing -1 as the filenum parameter.
Purging a file audited by the Transaction Management Facility (TMF)
If the file is a file audited by TMF and there are pending transaction-mode record locks or file
locks, any attempt to purge that file fails with file error 12, whether or not openers of the file
still exist.
When an audited file is purged, all corresponding dump records are deleted from the TMF
catalog. If TMF is not active, attempts to purge an audited file fail with file-system error 82.
Purging a partitioned file
When you purge the primary partition of a partitioned file, the file system automatically purges
all the other partitions located anywhere in the network that are marked as secondary partitions.
A secondary partition is marked as such if it created at the same time as the primary partition.
Security consideration
File purging normally is performed in a logical fashion; the data is not necessarily overwritten
or erased, but rather pointers are changed to show the data to be absent. For security reasons,
you might want to set the CLEARONPURGE flag for a file, using either SETMODE function 1
or the File Utility Program SECURE command. Either way, this option causes all data to be
physically erased (overwritten with zeros) when the file is purged.
Expiration dates
PURGE checks the expiration date of a file before it purges the file. If the expiration date is
later than the current date, PURGE does not purge the file and returns error code 1091.
Support for format 2 key-sequenced files with increased limits
PURGE can be used to delete format 2 legacy key-sequenced files with increased limits and
enhanced key-sequenced files with increased limits that are not open in H06.28/J06.17 RVUs
with specific SPRs and later RVUs; the behavior of the API is unchanged. (For a list of the
required H06.28/J06.17 SPRs, see SPR Requirements for Increased Enscribe Limits for the
H06.28/J06.17 Release (page 31).)
Safeguard Considerations
For information on files protected by Safeguard, see the Safeguard Reference Manual.
OSS Considerations
This procedure operates only on Guardian objects. If an OSS file is specified, error 1163 occurs.
Example
CALL PURGE ( OLD^FILE^NAME );
PURGE Procedure (Superseded by FILE_PURGE_ Procedure) 1187