ERASE
Format
Purpose
Use the ERASE macro to delete a record from a VSAM file.
This record must be one that you have retrieved through the GET macro with the OPTCD=UPD parameter specified. You can delete records in a key-sequenced file by keyed or addressed access. However, you cannot delete records in an entry sequenced file. You can delete records in a relative-record file by keyed access, but you cannot delete control intervals. See GET.
This discussion of the ERASE macro deals only with those matters that involve GCS.
Parameters
- RPL
- Specifies the address of the request parameter list (RPL) associated with your ERASE request.
This is the same request parameter list that you defined through the RPL macro. (If necessary, review the entry titled RPL.)
You can write this parameter as an assembler program label or as register (2) through (12).
Usage
- Each time you enter the ERASE macro, you must provide the system with a 72-byte save area. Be certain that before you enter the macro you place the address of this save area in register 13.
- See Using VSAM.
Return Codes and ABEND Codes
When this macro completes processing, it passes to the caller a return code in register 15. If register 15 contains 8 or 12, then the specific error is indicated in the FDBK field of the appropriate RPL. This field can be displayed through the SHOWCB or TESTCB macros. See SHOWCB or TESTCB.
|
Hex
Code |
Decimal
Code |
Meaning
|
|---|---|---|
| X'00' | 0 | Your request was accepted. |
| X'04' | 4 | Your request was not accepted because the RPL you specified in the ERASE macro is already active for another request. |
| X'08' | 8 | A logical error occurred. |
| X'0C' | 12 | A physical error occurred. |
| ABEND Code | Meaning |
|---|---|
| 035 | An error occurred in the ERASE macro. |
| 03B | An invalid address was found in a VSAM control block or a VSAM parameter list. This means your program tried to use an address to which it has no access. |
