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

3- 53
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.
6 This line names the data set to be accessed.
Columns 54-65 contain DSNAMEA-ACCOUNT-NO to specify that the
data set is D-ACCOUNTS.
7 This line begins the input record description of the IDACCT
file.
8 This line begins the input record description of the DACCOUNT
file.
9 This line reads the data set, D-ACCOUNTS, randomly.
Columns 18-27 contain ACTNO to specify the key field for reading
the data set.
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 80 to turn on indicator 80 when a record
is not found for the account number in D-ACCOUNTS.
Columns 56-57 contain the H0 indicator to avoid a compiler
warning for the CHAIN operation. The end-of-chain indicator has
no meaning since records are accessed randomly.
10 This line locks the data set, D-ACCOUNTS (DACCOUNT), when
indicator 80 is turned on.
Columns 10-11 contain 80 to condition the LOCK operation.
Columns 28-32 contain LOCK to specify the lock operation.
Columns 33-42 contain DACCOUNT to identify the data set to lock.
Columns 54-55 contain 10 to specify that indicator 10 be turned
on if the database, data set or a record in the data set is
already locked by another process. You can enter a TurboIMAGE
STATUS array in the File Description Continuation line to get
additional information about the lock when indicator 10 is
turned on.
Columns 56-57 contain 11 for the low resulting indicator. An
indicator is required in this field. When turned on, this
indicator signals a memory manager error.
Columns 58-59 contain 12 for the equal resulting indicator. An
indicator is required in this field. When turned on, this
indicator signals that the lock request was granted.
11 This line specifies that exception output is performed when
indicator 80 is turned on (indicator 80 is turned on when a
record is not found for an account number).
12 This line unlocks the data set, D-ACCOUNTS, when indicator 80 is
turned on.
Columns 10-11 contain 80 to condition the UNLCK operation.