Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

ISREQ - Unlock data block

Macro type:

R for PARMOD=24
0 for PARMOD=31

The ISREQ macro is used in shared-update processing to cancel a lock which was requested explicitly in a read operation and is not cancelled (implicitly) by writing the record back to the file or by any other ISAM action macro.

Locks are cancelled implicitly by the next ISAM action macro unless the read operation which requested the lock is followed by an OSTAT macro or by a read operation with NOLOCK for another file.

The lock may be:

  • a record lock (for NK-ISAM, non-sequential processing)

  • a range lock ((for NK-ISAM, sequential processing)

  • a block lock (for K-ISAM).

Format

Operation

Operands

ISREQ

fcbadr / (1)
,ACTION = UNLOCK
[,PARMOD = 24 / 31]

Operand descriptions

fcbaddr

Address of the FCB associated with the file containing the lock.

(1)
The FCB address is stored in register “r”.

ACTION = UNLOCK

Cancels the external lock. After execution of “ISREQ ...,UNLOCK”, ISAM returns to the statement following the ISREQ macro.

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

Return codes

A return code is placed in field ID1ECB of the FCB. Depending upon the type of error, the contents of register 1 may also be affected:

ID1ECB

R1

Meaning

X'0000'

unchanged

The lock has been cancelled

X'0A01'

changed

For the file whose FCB address is stored in register 1, a lock is in force for the job *)

X'0A02'

unchanged

No lock is in force

X'0AA3'

unchanged

Invalid FCB

*)The user can cancel the lock by simply issuing an ISREQ macro with the contents of register 1 unchanged and with register 1 as the first operand.