This document covers the following topics:
The HI option is used to place record in hold status, i.e. lock the records for other users. Please refer to Concepts and Facilities, Competitive Updating, Shared Locks and Hierarchical Locking for further information. The command can also be used to upgrade the lock mode of a record from shared to exclusive. If the user already holds an exclusive lock for the record, the lock mode remains unchanged.
The record remains in the requested lock mode until the lock is upgraded by another command, or it is released with an ET or BT command, or it is released or downgraded with an RI command.
The user specifies the file number and ISN of the record to be held.
The HI command does not check whether the ISN to be placed in hold status exists.
Adabas will only execute this command if this is not prevented by a lock for another user. If the record is not available, the user will be placed in wait status and reactivated automatically by Adabas when the record becomes available again.
If the HI command is issued with the return option and the record to be held is currently not available, Adabas will return response code 145 instead of placing the user in wait status.
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/U |
Command Option 1 | A | F/U |
Command Option 3 (ACBX only) | A | F/U |
Additions 2 | A,B | -/A |
Command Time | B | -/A |
User Area | F/U |
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.
- Command Code
HI
- File Number
The number of the file which contains the record to be held.
- Response Code
Adabas returns the response code for the command in this field. Response code 0 indicates that the command was executed successfully.
- ISN
The ISN of the record to be placed in hold status.
- Command Option 1
An 'R' in this field indicates that the return option is to be used. If the record to be held is currently held by another user, Adabas will return response code 145 rather than placing the user in wait status until the record becomes available.
- Command Option 3 (ACBX only)
An ‘S’ in this field places the record in shared hold status, if the record is not yet locked shared or exclusively. The record remains in shared hold status until the lock is upgraded to an exclusive lock, or until the lock is released again with an ET, BT or RI command.
A blank or binary zero in this field places the record in exclusive hold status.
- Additions 2
For some response codes, Adabas returns detailed information in this field. See Adabas Messages and Codes for further information.
The record identified by ISN 3 in file 2 is to be placed in exclusive hold status. Control is not to be returned until the record is available.
Command Code hi
File Number 2 (record to be held is in file 2)
ISN 3 (record with ISN 3 to be held)
Command Option 1 b (Return option not used)
Command Option 3 b (exclusive lock)
The record identified by ISN 4 in file 2 is to be placed in shared hold status. If the record is exclusively locked or it is waiting to be exclusively locked by another user, Adabas will return a response code 145.
Command Code hi
File Number 2 (record to be held is in file 2)
ISN 4 (record with ISN 4 to be held)
Command Option 1 R (Return option used)
Command Option 3 S