ERASE (Erase) keyword for display files

You use this record-level keyword with the OVERLAY keyword to specify that the records whose names you supplied as parameter values are to be erased from the display when this record is written.

The format of the keyword is:
ERASE(record-name-1 [record-name-2 ...[record-name-20]])

The record formats specified as parameter values must exist in the file.

ERASE can be specified more than once. The OVERLAY keyword must be specified whenever the ERASE keyword is specified.

If the ERASE and CLRL keywords are both in effect on an output operation, the records specified in the ERASE keyword are erased despite the CLRL keyword.

A record already on the display that has no input-capable fields and that has the CLRL specified cannot be erased by the ERASE keyword on another record (ERASE has no effect).

If the specified record is not on the display, this function is ignored for that record name.

Option indicators are valid for this keyword.

Note: This function requires extra data transmission and should be used only when you do not want to erase all other record formats. You can also specify the OVERLAY keyword with option indicators so that you can select when to erase all other formats.

Example

The following example shows how to specify the ERASE keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00020A          R REC1
     A             :
     A             :
     A          R REC2                      OVERLAY
     A             :
     A             :
     A          R REC4                      OVERLAY
     A                                      ERASE(REC1)
     A