Last Revised: 10/31/15 |
CDS075 is a called routine which will permanently erase a data file.
Calling Format:
CALL "CDS075",ERR=NNNN, CHAN
CDS075 | |
---|---|
NNNN
|
the line to GOTO in the case of an error |
CHAN
|
the channel number of the file currently opened to be erased. |
With versions dated 10/31/15 and later, CDS075 will also clear the global variable used for template retrieval.
Examples:
A program to sort the customer file created a work file at the beginning of the program, has printed the report, and now the work file must be erased. It was created using device 6 and is still open.
CALL "CDS075",6
This routine will not generate an error if there is no file open to the specified device. This permits any program that may define a work file to unconditionally call the routine. If the program is terminated, even before the work file has been defined, no error will occur.
Possible Errors:
0 the file is in use by another task and cannot be locked
17 device opened to channel CHAN
is not a disc file