Procedure
v Arrange for all transactions to access files in a sequence agreed in advance. This
could be a suitable subject for installation standards. Be extra careful if you
allow updates through multiple paths.
v Enforce explicit installation enqueueing standards so that all applications do the
following:
1. Enqueue by the same character string
2. Use those strings in the same sequence.
v Always access records within a file in the same sequence. For example, where
you update several file or database records, ensure that you access them in
ascending sequence.
Ways of doing this include the following:
1. The terminal operator always enters data in the existing data set sequence.
This method requires special terminal operator action, which may not be
practical within the constraints of the application. (For example, orders may
be taken by telephone in random product number sequence.)
2. The application program first sorts the input transaction contents so that the
sequence of data items matches the sequence on the data set.
This method requires additional application programming, but imposes no
external constraints on the terminal operator or the application.
3. The application program issues a SYNCPOINT command after processing
each data item entered in the transaction.
This method requires less additional programming than the second method.
However, issuing a synchronization point implies that previously processed
data items in the transaction are not to be backed out if a system or
transaction failure occurs before the entire transaction ends. This may not be
valid for the application, and raises the question as to which data items in
the transaction were processed and which were backed out by CICS. If the
entire transaction must be backed out, synchronization points should not be
issued, or only one data item should be entered per transaction.
Of the three methods, the second (sorting data items into an ascending sequence
by programming) is most widely accepted.
If you allow updates on a data set through the base and one or more alternate
index (AIX) paths, or through multiple AIX paths, sequencing record updates
may not provide protection against transaction deadlock. You are not protected
because the different base key sequences will probably not all be in ascending
(or descending) order. If you do allow updates through multiple paths, and if
you need to perform several record updates, always use a single path or the
base. Define such a procedure in your installation standards.
Implications of interval control START requests
Interval control START requests initiate another task—for example, to perform
updates accumulated by the START-issuing task; this allows the user to continue
accumulating data without waiting for the updates to be applied.
The PROTECT option on a START request ensures that, if the task issuing the
START fails during the unit of work, the new task will not be initiated, even
though its start time may have passed. (See “START requests” on page 76 for more
information about the PROTECT option.)
Consider also the possibility of a started task that fails. Unless you include abend
processing in the program, only the master terminal will know about the failure.
Chapter 13. Programming for recovery 147