ISMRANDOMREAD Procedure

ISMRANDOMREAD reads the record specified by RECORDKEY. The key specified by RECORDKEY becomes the key of reference, and the current record pointer is updated to point to the next record.

The ISMRANDOMREAD procedure requires the following parameters to return a random READ result:

ISMRANDOMREAD (ISAMFILE, KEYOFREF, RECORD)
  • ISAMFILE—The user's file.

  • KEYOFREF—Specifies the key to be used for the read. If the KEYFLAGF (bit 46) is SET, a keyed read is indicated, and KEYOFREF has the key information word format. If the KEYFLAGF is RESET, a relative read is indicated, and the value contained in KEYOFREF is used as the relative key.

  • RECORD—The user's record area.

The random READ result values are listed as follows:

Field

Value

Result [26:10]

Mnemonic

Meaning

[0:01]

0

 

 

No errors

 

1

100

DIFFERENTLENGTHRECORD

This record length is not the same as the record length of the file.

[9:1]

1

95

RECORDNOTFOUND

Record not found. Bit 0 is also equal to 1.

 

 

98

KEYSINVALID

The key is invalid. The KEYFLAGF was 0 indicating a relative key, but the file was not a relative file. Bit 0 is also equal to 1.