TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-315
#PURGE Built-In Function
#PURGE Built-In Function
Use #PURGE to remove a file from a disk.
file-name
is the name of the file to be removed.
Result
#PURGE returns zero if it removes the file successfully; otherwise, it returns the file-
system error indicating the reason for the failure.
Considerations
•
When you use #PURGE to remove a disk file, the file entry is removed from the file
directory in that volume, and any space previously allocated to that file is made
available. Data in the file is not physically removed from the disk unless you
specified the CLEARONPURGE option when you created the file: removed files
are then overwritten with spaces. For information about the
•
CLEARONPURGE option, see the FUP CREATE command description in the File
Utility Program (FUP) Reference Manual. You can purge a file only if it is not
currently open. You must have purge access to the file. See the description of the
FUP SECURE command in the File Utility Program (FUP) Reference Manual for
information about file-access restrictions.
•
If you try to use the PURGE command to remove a file that is being audited by the
TMF subsystem, the attempt fails, and file-system error 12 (file in use) is returned if
there are pending transaction-mode records or file locks. A PURGE attempt of this
kind is blocked regardless of whether the processes that opened the file still exist.
Example
This example illustrates the use of #PURGE with status reporting:
#PUSH old^file
#SET old^file $DATA.FILES.TEMP1
[#IF [#PURGE [old^file]] |THEN| #OUTPUT **Purge failed**]
#PURGE file-name