HP RPG/XL Programmer's Guide (30318-90001)

3-: 40
Columns 28-32 contain CHAIN to specify a "dummy" chained read
operation. This operation simply establishes a new head of
chain.
Columns 33-42 specify the name of the TurboIMAGE data set file,
DACCOUNT.
8 This line is the beginning of the loop that reads records in the
D-ACCOUNTS data set.
9 This line reads records randomly from the D-ACCOUNTS data set.
Columns 18-27 contain INAME to specify the key field.
Columns 28-32 contain CHAIN to specify a chained read operation.
Columns 33-42 specify the name of the TurboIMAGE data set file,
DACCOUNT.
Columns 54-55 contain 60 to turn on indicator 60 when a record
is not found for the key value in INAME.
Columns 56-57 contain 61 to turn on indicator 61 when there are
no more records in the data set chain.
10 This line starts the description of the output record to be
displayed on the terminal.
Reading a TurboIMAGE Data Set Randomly. This section explains how to
retrieve master data set records using random key values.
The following example takes an account number (ACTNO) entered by a user
and verifies it against a list of valid account numbers in the
A-ACCOUNT-NO data set. (The schema for this data set is shown in the
section "Defining a TurboIMAGE Database Schema.") When an account does
not exist, a message (NO HIT ON CHAIN) is displayed.
.
Figure 3-27. Reading a TurboIMAGE Data Set Randomly