8 File Storage

Purging a File

The PURGE statement erases any DATA file by removing its name from the name table in the directory.

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";PROG
If 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;OTHR
will purge file WILLI.


Eloquence Language Manual - 19 DEC 2002