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

3- 41
Comments
1 This line defines, AACCOUNT, which is a TurboIMAGE automatic
master data set.
Columns 28-38 indicate that AACCOUNT is a TurboIMAGE file to be
processed randomly by the ACCOUNT-NO key field (positions 1-6).
2 This line specifies that AACCOUNT is part of the MARKET
database.
Columns 54-65 identify MARKET as the TurboIMAGE database that is
used.
Column 66 is 6 to indicate Open Mode 6 - Shared Read Access.
Column 67 is 7 to specify Input/Output Mode 7 - Calculated Read.
This mode applies to master data sets only.
3 This line defines the password for the database.
Columns 54-65 contain LEVEL READER to specify the password
READER. This password establishes a user class identification
that permits read access to the database.
4 This line identifies the key field for the data set.
Columns 54-65 contain ITEM ACCOUNT-NO to specify that the key
for the data set is ACCOUNT-NO.
5 This line names the data set to be accessed.
Columns 54-65 contain DSNAMEA-ACCOUNT-NO to specify that the
data set is A-ACCOUNT-NO.
6 This line begins the input record description of the
A-ACCOUNT-NO data set.
7 This line reads the data set, A-ACCOUNT-NO randomly.
Columns 18-27 contain the name of the key field, ACTNO.
Columns 28-32 contain CHAIN to specify a chained read operation.
Columns 33-42 specify the name of the TurboIMAGE data set file,
AACCOUNT.
Columns 54-55 contain 60 to turn on indicator 60 when no record
is found having the key value contained in ACTNO.
Columns 56-57 contains the default H0 indicator to avoid a
compiler warning for the CHAIN operation. The end-of-chain
indicator has no meaning for master data sets, since they cannot
have duplicate keys.
8 This line starts the description of the output record for
OUTPUT. The record contains messages that indicate whether or
not the account exists in the master data set.
Updating a TurboIMAGE Data Set
This section explains how to modify records that already exist in a
TurboIMAGE data set.
For information on adding and deleting records, see the next two
sections. To learn about database security provisions that can be
incorporated into your RPG programs, see the section titled "Providing
Security for TurboIMAGE Databases and Data Sets."