Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-133
FILE_PURGE_ Procedure
Considerations
•
Purging a file audited by the Transaction Management Facility (TMF) subsystem
If the file is audited by the TMF subsystem and if there are pending 
transaction-mode record locks or file locks, any attempt to purge the file fails with 
file-system 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 the TMF subsystem 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
When a file is purged, the data is not necessarily overwritten or erased, but 
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 function 1 of the 
SETMODE procedure or the File Utility Program (FUP) SECURE command. This 
flag causes all data to be physically erased (overwritten with zeros) when the file is 
purged.
•
Expiration dates
FILE_PURGE_ checks the expiration time of a file before purging it. If the 
expiration time is later than the current time, FILE_PURGE_ does not purge the file 
and returns file-system error 1091.
OSS Considerations
This procedure operates only on Guardian objects. If an OSS file is specified, error 
1163 is returned.
SQL/MX Considerations
FILE_RENAME_ does not operate on SQL/MX objects. If a SQL/MX object is 
specified, file-system error 2 is returned.
Example
error := FILE_PURGE_ ( old^filename : old^filename^length );










