Pathmaker Programming Guide
Reading Rows
How to Operate a DB Requester Application
067868 Tandem Computers Incorporated B–3
READ APPROXIMATE (F6) To read the first row(s) in sequence whose key value is equal to or greater than that of
a key value entered on the screen, the end user requests a READ APPROXIMATE
operation.
Suppose that a READ APPROXIMATE operation has been requested for the following
Enscribe group key:
+ DEPT
REGNUM __
BRANCHNUM __
If a value of 01 or 1 is entered in REGNUM, the application returns the first records(s)
having a REGNUM value equal to or greater than 1. If a leading zero is entered with
the 1, the zero is ignored. The BRANCHNUM field of the first returned record will be
the lowest in value of any rows with a REGNUM value of 1.
If a READ APPROXIMATE operation is requested on an alphanumeric or alphabetic
column, the application will return records in alphanumeric sequence. For example,
assume a file contains two records with name fields: JACK WILSON and JANE
ADAMS. If a J or JA is entered in the name column on the screen, and the end user
presses F6 to request a READ APPROXIMATE operation, the application returns
JACK WILSON as the first record.
If a READ APPROXIMATE is requested for a NonStop SQL table that has a multi-
column key, only the value entered in the first column of the key is used to determine
which row to read first. For example, if a table has a three-column key and the end
user enters 3, 6, 2 on the screen in the corresponding key columns, the application
ignores the values in the second and third columns. The first row with the first
column greater than or equal to three (“3, 0, 1”, for example) is returned first.
If a READ APPROXIMATE is requested for an Enscribe file that has a multifield key,
all values entered in those key fields will be used to determine which record to read
first. For example, if a file has a three-field key and the end user enters 3, 6, 2 on the
screen in the corresponding key fields, the application uses all those values to
determine the first record to return (“3, 7, 0”, for example).
READ APPROXIMATE Operation for an Outermost Box
To perform a READ APPROXIMATE operation, the end user must do the following:
1. Enter a value in the desired key column.
2. Press F6.