Macro type: | R for PARMOD=24 |
The ELIM macro eliminates (deletes) a record from an ISAM file. The second operand (LAST/KEY/(0)) indicates which record is to be eliminated.
Format
Operation | Operands |
|
|
Operand descriptions
fcbaddr
Address of the FCB associated with the file to be processed.
(1)
The FCB address is stored in register 1.
LAST
The last record made available by one of the macros GET, GETFL, GETKY and GETR is processed (default value).
With the exception of OSTAT, no other ISAM macro which refers to the same FCB may be executed between the macro GET, GETFL, GETR or GETKY and the ELIM macro with function LAST. If SHARUPD=YES is specified, the preceding read macro must also set a lock and this lock must still be active when the ELIM macro is issued, i.e. no action, even for another FCB, which would cancel the lock may be executed.
KEY
The key of the record to be deleted is located at the address defined by KEYARG in the FCB.
If the specified key does not exist, the user program is continued at the address NOFIND (see "EXLST - Define exit address list"). If the file contains several records with the same key, the first of these records is eliminated.
(0)
The contents of register 0 indicate which record is to be processed:
If the address in register 0 is not the FCB address, the function “KEY” is executed.
If the address in register 0 is the FCB address, the “LAST” function is initiated, i.e. the last record made available is deleted.
PARMOD
Specifies the generation mode for the macro.
Default value: | the value predefined for the generation mode by means of the |
= 24
The object code generated can run only in the 16-Mb address space (24-bit addressing only).
= 31
The object code generated can run in the 2-Gb address space (24-bit or 31-bit addressing).
Programming note
The ELIM macro overwrites the contents of registers 0, 1, 14 and 15.