ERASE—Delete a record

Use the ERASE macro to delete VSAM records. With ERASE processing of key-sequenced data sets or variable-length RRDS, VSAM attempts to make the control interval available to the control area when the last record in the control interval is erased. Thus, key-sequenced data set control intervals can be reused for new records whose keys fall anywhere within the control area's range of keys. The high key control interval of a control area is never reclaimed.

Variable-length RRDS control intervals can be reused for new records. The new variable-length RRDS record is inserted where the old record was, and the relative record number of the deleted record is reused for the new record.

ERASE is not supported for z/SO Unix files. You receive an error if you specify ERASE against a z/OS UNIX file.

To do an erase you must first do a GET UPD for the record.

The format of the ERASE macro is:

label
specifies 1 to 8 characters that provide a symbolic address for the ERASE macro.
RPL=address
specifies the address of a request parameter list that defines the request. You may specify the address in register notation (using a register from 1 through 12, enclosed in parentheses) or specify it with an expression that generates a valid relocatable A-type address constant.