8 File Storage
PURGE file spec
The disk space used by the file is then available for other uses. For example, the statement to follow purges a file:
320 PURGE "DATA"NOTE: Use PURGE with care since all data in a purged file is lost.
NOTE: You can purge an opened file if it belongs to your own process.
The XPURGE statement purges a file of given type. Normally, using PURGE, to remove a file which is not of type DATA, you have to enter a statement like this:
COMMAND "!rm "&MAPVOL$("CODE")&"WILLI.PROG"Using XPURGE you would simply enter:
XPURGE "WILLI,CODE";PROGIf you omit the type, it defaults to DATA. So
PURGE "WF1"and
XPURGE "WF1"are equivalent.
If type is OTHR, no extension will be added to the filename, e.g.
XPURGE "WILLI;OTHRwill purge file WILLI.