IBM SC34-7012-01 Server User Manual


 
back out only the updates made during that individual step; the application is
responsible for restarting at the appropriate point in the conversation, which might
involve recreating a screen format.
However, other tasks might try to update the database between the time when
update information is accepted and the time when it is applied to the database.
Design your application to ensure that no other application can update the
database at a time when it would corrupt the updating by your own application.
Mechanisms for passing data between transactions
In those applications where one transaction needs to access working data created
by a previous transaction, you must decide which mechanism will pass the data
between the transactions.
You have two options for passing data between transactions:
v Main storage areas
v CICS recoverable resources
Main storage areas
The advantages of main storage areas are realized only where recovery is not
important, or when passing data between programs servicing the same task.
Main storage areas that you can use to pass data between transactions include:
v The communication area (COMMAREA)
v The common work area (CWA)
v Temporary storage (main)
v The terminal control table user area (TCTUA)
CICS does not log changes to these areas (except as noted later in this section).
Therefore, in the event of an uncontrolled shutdown, data stored in any of these
areas is lost, which makes them unsuitable for applications needing to retain data
between transactions across an emergency restart. Also, some of these storage areas
can cause inter-transaction affinities, which are a hindrance to dynamic transaction
routing. To avoid inter-transaction affinities, use either a COMMAREA or the
TCTUA. For information about intertransaction affinities, see the CICS Application
Programming Guide.
Design programs so that they do not rely on the presence or absence of data in the
COMMAREA to indicate whether or not control has been passed to the program
for the first time (for example, by testing for a data length of zero). Consider the
abend of a transaction where dynamic transaction backout and automatic restart
are specified. After the abend, a COMMAREA could be passed to the next
transaction from the terminal, even though the new transaction is unrelated.
Similar considerations apply to the terminal control table user area (TCTUA).
CICS recoverable resources
Resources recoverable by backout that can be used for communication between
transactions include:
v Temporary storage (auxiliary)
v Transient data queues
v User files and DL/I and DB2 databases
Chapter 13. Programming for recovery 145