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

3-: 48
---------------------------------------------------------------------------------------------
| | |
| 9 | Lock the data set before a record is read, written or updated. |
| | Unlock it after the record is read, written or updated. |
| | |
---------------------------------------------------------------------------------------------
| | |
| R | Lock the data record before it is read, written or updated. Unlock |
| | it after the record is read, written or updated. |
| | |
---------------------------------------------------------------------------------------------
Figure 3-31 shows how to specify automatic locking and unlocking at the
data record level for TurboIMAGE data sets (see line 2).
Figure 3-31. Automatically Locking and Unlocking a TurboIMAGE Data Set Record
Comments
1 This line defines the TurboIMAGE data set file, DACCOUNT.
Column 15 is I to indicate that the TurboIMAGE file is input.
Column 16 is C for CHAINed (random) access.
2 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 R to specify open mode with automatic locking and
unlocking at the data record level.
Column 67 is 5 to specify Input/Output Mode 5 - Chained Read.
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 NAME-LAST to specify that the key for
the data set is NAME-LAST.
5 This line names the data set to be accessed.
Columns 54-65 contain DSNAMED-ACCOUNTS to specify that the data