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

3- 49
set is D-ACCOUNTS.
Manually Locking and Unlocking TurboIMAGE Databases and Data Sets. This
section explains how you can control the locking and unlocking of
TurboIMAGE databases and data sets. You use the LOCK and UNLCK
operations in Calculation Specifications.
Figure 3-30 through Figure 3-32 show how to lock and unlock databases,
data sets and individual records in the data sets. The examples use the
MARKET database whose schema is shown in the section titled "Defining a
TurboIMAGE Database Schema."
Figure 3-32 gives an example of adding records to the data set,
D-ACCOUNTS. The entire database (MARKET) to which D-ACCOUNTS belongs is
locked before a record is added. After the record is added, the database
is unlocked.
Figure 3-32. Manually Locking and Unlocking a TurboIMAGE Database
Comments
1 This line defines the file, IDACCT.
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 66 is A to indicate that records are added to DACCOUNT.
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 L to indicate user-controlled manual locking.