850-FIND-MIDSUBRNG-<Index>
Name
850-FIND-MIDSUBRNG-<Index>
Description
When you need to process a range of data, starting at a given point in a subrange, use 850-FIND-MIDSUBRNG-<Index> .
Using the API in a Program
You can use 850-FIND-MIDSUBRNG-<Index> in conjunction with 850-FIND-SUBRNG-<Index> and 860-FIND-NXTRNG-<Index> .
The database routines perform an equal condition on all DB
index fields up to the subrange field designated in
the WS-DB-SUB-RNG
. It performs a
"where greater-than and less-than" condition on this index
field.
Input Values
Field | Description |
---|---|
<Index> |
You must specify the index in the FIND statement. |
Record retrieval variables (also known as DB
fields)
|
Fill in the DB
fields that define the
point to position at in the mid-subrange, and also initialize any
other DB
fields that do not define the mid-subrange.
|
DBSRNG-<KeyFieldName>
|
Define the beginning value of the last key by moving
the appropriate values to the record retrieval field named DBSRNG-<KeyFieldName>
(starting value).
|
DBRNG-<KeyFieldName>
|
Define the ending values of the last key by moving the
appropriate values to the record retrieval field named DBRNG-<KeyFieldName>
(ending value).
|
WS-DB-SUB-RNG
|
Move the symbolic constant <IndexName>-<IndexFieldName> to the field WS-DB-SUB-RNG in order to tell the interface which key is the last significant one defining the range. The symbolic constant is numerically equivalent to the position of the named field in the Index. |
Return Values
Field | Description |
---|---|
<FileName>-SW | The Find routines set the <FileName>-SW switch to indicate the outcome of the read. |
<FileName>-FOUND |
Each routine sets the logical value <FileName>-NOTFOUND or <FileName>-FOUND based on the outcome of the read process. |
Programming Example
|