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

3-: 42
Figure 3-28 shows how to access records in the TurboIMAGE data set
D-ACCOUNTS (see the schema for this data set in Figure 3-23) by its key,
and change the TYPEC field in those records.
Figure 3-28. Randomly Updating Records in a TurboIMAGE Data Set
Comments
1 This line defines the file, INPUT.
2 This line defines the TurboIMAGE data set file, DACCOUNT.
Column 15 is U to indicate that DACCOUNT is updated.
Column 16 is C for chained (random) access.
Column 32 is M to specify that DACCOUNT is a TurboIMAGE file.
3 This line specifies that DACCOUNT is part of the MARKET
database.
Columns 54-65 identify MARKET as the TurboIMAGE database that is
used.
Column 66 is 2 to indicate Open Mode 2 - Update-Shared Access.
Column 67 is 5 to specify Input/Output Mode 5 - Chained Read.
4 This line defines the password for the database.
Columns 54-65 contain LEVEL WRITER to specify the password,
WRITER. This password establishes a user class identification
that permits write access to the database.
5 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.