Exceptions, Considerations – HP Integrity NonStop H-Series User Manual
Page 57
![background image](/manuals/397556/57/background.png)
Configuring Automatic Transaction Processing
HP NonStop AutoTMF Software User’s Guide—429952-013
4-13
Exceptions
In such cases, you can configure NonStop AutoTMF software to generate one
automatic transaction for each record lock and to commit each transaction as soon as
the record is unlocked. This approach increases the transactional activity but prevents
the occurrence of long-running transactions without changing the program’s locking
behavior.
This feature is enabled by specifying the RECORDTX attribute on both the file on
which the locks are held and the accessing program. If RECORDTX is specified on
either the file or the program, but not on both, RECORDTX is ignored.
To implement RECORDTX, NonStop AutoTMF software maintains a table of records
locked and the associated transaction for each lock. If the same record is locked
multiple times, the same transaction is used for each lock until the lock is released and
the transaction is committed.
Exceptions
Certain sequences of operations do not lend themselves to the generation of automatic
transactions for each record lock. In these cases, the RECORDTX attribute is not
supported and cannot be used:
•
If a program issues READLOCK (In COBOL, READ NEXT WITH LOCK) to read
records sequentially, NonStop AutoTMF software cannot predict the key of the next
record that will be locked, so NonStop AutoTMF software cannot identify which
transaction to use if the same record is locked more than once. As long as
READLOCK is used to lock records that are not already locked, READLOCK may
be used with RECORDTX.
•
If a program does a LOCKFILE after locking two or more records, the file cannot
be locked unless the records are unlocked first. Otherwise, the same record could
be locked under more than one transaction, leading to internal deadlocks. If a
LOCKFILE operation that has more than one record lock is requested, the
LOCKFILE operation will be abended.
•
If a program issues READUPDATELOCK with positioning by a unique alternate
key, NonStop AutoTMF software cannot predict the primary key of the record being
locked, so NonStop AutoTMF software cannot identify which transaction to use if
the same record is locked more than once. As long as READUPDATELOCK is
used to lock records that are not already locked, READUPDATELOCK may be
used with RECORDTX.
Considerations
As mentioned above, record-level transactions increase transactional activity and
processing complexity, and they are useful only in very specific situations. Users
should configure record-level transactions when a careful analysis of a program’s
locking behavior leaves no other option or after being instructed to do so by product
support.