IBM SC34-7012-01 Server User Manual


 
committed in one unit of work, but the transaction is to continue with one or
more units of work for further processing.
3. Where file or database updates must be kept in step, make sure that your
application does them in the same unit of work. This approach ensures that
those updates will all be committed together or, in the event of the unit of
work being interrupted, the updates will back out together to a consistent state.
Processing dialogs with users
An application may require several interactions (input and output) with the user.
CICS provides the following basic techniques for program design for use in such
situations:
v Conversational processing
v Pseudo-conversational processing
Conversational processing
With conversational processing, the transaction continues to run as a task across all
terminal interactions—including the time it takes for the user to read output and
enter input.
While it runs, the task retains resources that may be needed by other tasks. For
example:
v The task occupies storage, and locks database records, for a considerable period
of time. Also, in the event of a failure and subsequent backout, all the updates to
files and databases made up to the moment of failure have to be backed out
(unless the transaction has been subdivided into units of work).
v If the transaction uses DL/I, and the number of scheduled PSBs reaches the
maximum allowed, tasks needing to schedule further PSBs have to wait.
Conversational processing is not generally favored, but may be required where
several file or database updates made by several interactions with the user must be
related to each other—that is, they must all be committed together, or all backed
out together, in order to maintain data integrity.
Pseudoconversational processing
In pseudoconversational processing, successive terminal interactions with the user
are processed as separate tasks, usually consisting of one unit of work each.
This approach can result in a requirement to communicate between tasks or
transactions (see “Mechanisms for passing data between transactions” on page 145)
and the application programming can be a little more complex than for
conversational processing.
However, at the end of each task, the updates are committed, and the resources
associated with the task are released for use by other tasks. For this reason,
pseudoconversational transactions are generally preferred to the conversational
type.
When several terminal interactions with the user are related to each other, data for
updates must accumulate on a recoverable resource and then be applied to the
database in a single task; for example, in the last interaction of a conversation. In
the event of a failure, emergency restart or dynamic transaction backout would
144 CICS TS for z/OS 4.1: Recovery and Restart Guide