Version 7.4.4
 —  Command Reference  —

HI Command: Hold Record

The HI command prevents record update by other users.

This document covers the following topics:


Function and Use

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

Top of page

Command: HI

User Control Block

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

User Buffer Areas

Not used

where:

F Filled in by user before Adabas Call
A Filled in by Adabas
U Unchanged after Adabas call
-- Not used

Top of page

Control Block

Command Code

HI

File Number

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.

Response Code

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.

ISN

The ISN of the record to be placed in hold status.

Command Option 1: Response Code 145 if Record Not Available

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.

Top of page

Example

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.

Control Block

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

Top of page