Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

INSRT - Insert record

Macro type:

R for PARMOD=24
0 for PARMOD=31

The INSRT macro transfers a record from the user area to the file and inserts it at the position defined by the value of its record key.

If the file already contains a record with the specified key, the new record is not transferred, even if DUPEKY=YES was defined in the FCB macro. Control passes to EXLST exit DUPEKY.
Insertion of a record with a key that already exists in the file is only possible using STORE; sequential extension of the file is possible by means of PUT.

If RECFORM=V was specified, the user must enter the length of the record to be inserted in the record length field before calling the INSRT macro.

Format

Operation

Operands

INSRT

fcbadr / (1)
,area / (0)
[,PARMOD = 24 / 31]

Operand descriptions

fcbaddr

Address of the FCB associated with the file to be processed.

(1)
The FCB address is stored in register 1.

area

The address of the record to be inserted in the file. Even in locate mode, the record must be made available at address “area”.

(0)
The address of the record to be inserted in the file is in register 0.

PARMOD

Specifies the generation mode for the macro.

Default value:

the value predefined for the generation mode by means of the GPARMOD macro or preset by the assembler.

= 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 INSRT macro destroys the contents of registers 0, 1, 14 and 15.