The HI command prevents record update by other users.
This document covers the following topics:
The HI command is used to place a record in hold status. This command is used to hold a record for subsequent updating without allowing other users to update the record until it is released.
The user specifies the file number and ISN of the record to be held.
If the record to be held is currently being held by another user, the action taken by Adabas is controlled by the setting of the command option 1 field in the Adabas control block. If the command option 1 field
contains an "R", Adabas returns response code 145 if the record to be held is not available;
does not contain an "R", Adabas places the user in wait status until the record becomes available, at which time the user is reactivated automatically.
Field | Position | Format | Before Adabas Call | After Adabas Call |
---|---|---|---|---|
1-2 | -- | -- | -- | |
COMMAND CODE | 3-4 | alphanumeric | F | U |
5-8 | -- | -- | -- | |
FILE NUMBER | 9-10 | binary | F | U |
RESPONSE CODE | 11-12 | binary | -- | A |
ISN | 13-16 | binary | F | U |
17-34 | -- | -- | -- | |
COMMAND OPTION 1 | 35 | alphanumeric | F | U |
36-72 | -- | -- | -- | |
COMMAND TIME | 73-76 | binary | -- | A |
USER AREA | 77-80 | -- | -- | U |
Not used
where:
F | Filled in by user before Adabas Call |
A | Filled in by Adabas |
U | Unchanged after Adabas call |
-- | Not used |
HI
The number of the file that contains the record to be held.
Note:
When using two-byte file numbers and database IDs, a X'30' must be
coded in the first byte of the control block.
In this field, Adabas returns the response code for the command. Response code 0 indicates that the command was executed successfully. If the HI command returns a non-zero response code, the rightmost two bytes of Adabas control block bytes 45-48 (additions 2 field) may contain a subcode defining the exact response code meaning. Response codes and their subcodes are defined in the Adabas Messages and Codes documentation.
The ISN of the record to be placed in hold status.
If the record to be held is currently being held by another user, the action taken by Adabas is controlled by the setting of the command option 1 field:
Option | Description |
---|---|
R | (return) causes Adabas to return response code 145 if the record to be held is not available. The command is not placed in wait status. |
Otherwise, Adabas places the command in wait status until either the record becomes available, at which time command and user are reactivated automatically, or the transaction times out.
The record identified by ISN 3 in file 2 is to be placed in 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 | response code 145 option not used |