This format of the @DELETE statement is used for the complete deletion of work files.
Operation | Operands | F mode, L mode |
@DELETE | [ {ALL | (procnr[,...])} ] |
ALL procnr | All the work files are deleted in full. The work files with the specified numbers ( |
If no operand is specified then the current work file is deleted in full.
In the F mode statement line, the abbreviation D
without operands is rejected with an error message in order to prevent the accidental deletion of the current work file when D
statement codes are entered.
If one of the specified work files is an active work file then the statement is rejected with the message EDT5476
.
Completely deleting a work file makes it into an empty work file. In particular, not only are all the records deleted. In addition, the work file's character set is set to *NONE
and other work file-specific settings are restored to their default values (see section “Work files”). Furthermore, a file that has been fully deleted (except for the current work file) is removed from the set of work files in use (see @PROC USED).
The work files are deleted without a confirmation query, irrespective of their content. If files are open in the work files that are to be deleted then these are implicitly closed without being written back. This also applies to files opened for real processing using @OPEN (format 2). The records they contain are therefore not deleted.