ISMSTART positions your current record pointer to the logical record currently in the file whose key satisfies the comparison. If the comparison is not satisfied by any record in the file, a “RECORD NOT FOUND” result is returned—bits 0 and 9 SET. A successful START operation establishes the RECORDKEY parameter as the key of reference. The key of reference is the key that is used on any subsequent sequential operations. No data is transferred during a start operation.
The ISMSTART procedure requires the following parameters to return a START result:
ISMSTART (ISAMFILE, KEYOFREF, KEYLEN, RECORD, CHOOZ)
-
ISAMFILE—The user's file.
-
KEYOFREF—Specifies the key to be used for the START operation. If the KEYFLAGF (bit 46) is SET, a keyed START is indicated, and KEYOFREF specifies the key information format. If the KEYFLAGF is not SET, a relative START is indicated and the value contained in KEYOFREF is used as the relative key. The values of CHOOZ and KEYLEN are checked against the value stored in KEYOFREF.
-
KEYLEN—The length of the key to be used in the START operation. KEYLEN must be less than or equal to the key-length field of the KEYOFREF. If KEYLEN is less than the key-length field of the KEYOFREF, a partial key start is indicated.
-
RECORD—The user's record area.
-
CHOOZ—Specifies the type of start to be done, as shown in the following:
Value |
Meaning |
---|---|
0 |
Start equal. Finds the key with the same value as the key in your record. |
15 |
Start greater than or equal to. Finds the first key with a value greater than or equal to the key in your record. |
20 |
Start greater than. Finds the first key with a value greater than the key in your record. |
The START result values are listed as follows. The results with an asterisk (*) are returned by the GENERALSUPPORT procedure ISMSTART. The other results are returned by KEYEDIO.
Field |
Value |
Result [26:10] |
Mnemonic |
Meaning |
---|---|---|---|---|
[0:01] |
1 |
|
|
An error occurred |
|
0 |
|
|
No error occurred |
*[2:1] |
1 |
0 |
NOERROR |
The value in CHOOZ was not valid. Bit 0 also equals 1. |
[9:1] |
1 |
95 |
RECORDNOTFOUND |
No key met the conditions Bit 0 will also equal 1. |
|
|
98 |
KEYISINVALID |
The key is invalid. Bit 0 also equals 1. |