RI Command (Release Record)

This document covers the following topics:


Function and Use

The RI command is used to release the lock for a record or to downgrade the lock level from exclusive to shared.

The user specifies the file and ISN of the record to be released.

An option is available which permits the user to release all of the records currently being held by the user.

This command will be rejected for records which have been updated.

graphics/ri.png

RI Command, Procedure Flow

Control Block

Field Format  
Call Type B F/U
Reserved (internal use)   -/-
Command Code A F/U
File Number B F/U (1)
Response Code B F/A (1)
ISN B F/A
Command Option 3 (ACBX only) A F/U
Additions 2 A,B -/A
Command Time B -/A
User Area   F/U

Buffer Areas

Buffer  
Format Buffer –/–
Record Buffer –/–
Search Buffer –/–
Value Buffer –/–
ISN Buffer –/–
Formats:
A alphanumeric
B binary
x/y before/after Adabas call - x and y can take the values:
A Filled in by Adabas
F To be filled in by User
U Unchanged after Adabas call
- Not used

(1) The meaning of this field depends on the value specified for "Call Type". See Calling Adabas, The Control Block for details.

Control Block

Command Code

RI

File Number

The number of the file which contains the record to be released.

Response Code

Adabas returns the response code for the command in this field. Response code 0 indicates that the command was executed successfully. Response code 0 will also be returned if the specified record was not in hold status for the current user. If the specified record is in hold status for another user, it will not be released, but response code 0 will be returned.

ISN

The ISN of the record to be released.

If all the records held by the user are to be released, this field must be set to binary zeros.

Command Option 3 (ACBX only)

A blank in this field releases the record completely from hold status. An ‘S’ in this field downgrades the locking mode from exclusive to shared.

Example

The record identified by ISN 3 in file 2 is to be released from hold status.

Control Block

Command Code          RI
File Number           2 (record to be released is in file 2)
ISN                   3 (record with ISN 3 is to be released)