Clears the contents of a KSAM file.
The contents of a KSAM file, both the data and key files, can be cleared to an empty state with the KSAMUTIL ERASE command.
CLEARING A KSAMFILE |
 |
EXECUTE access is required to erase a KSAM file. If the group in which the KSAM file resides does not have EXECUTE access, any attempt to erase a file results in an error and the message, "FSERR 93 SECURITY VIOLATION."
When ERASE is specified for a KSAM file, the end-of-file pointer that follows all data is reset to point to the first record in the data file. This position of the pointer is identical to its position when the file is created and before any data is written to the file.
All pointers and control words in the key file are reset to indicate that the data file is empty.
Note that the file is still created and new data may be written to it.
For example, to clear the contents from the file identified as KSAMFILE: