CICS® does not recover extrapartition data sets. If you depend on extrapartition data, you will need to develop procedures to recover data for continued execution on restart following either a controlled or an uncontrolled shutdown of CICS.
There are two areas to consider in recovering extrapartition data sets:
The main information required on restart is the number of records processed up to the time the system ended. This can be recorded during processing, using CICS journaling, as described in the following paragraphs.
Each application program that reads records from extrapartition input queues should first enqueue exclusive access to those queues. This prevents interleaved access to the same queues by other concurrently executing tasks.
The application programs then issue READQ TD commands to read and process extrapartition input records. In this way, they accumulate the total of input records read and processed during execution for each queue. The total number of READQ operations is written to a journal data set, together with the relevant destination identifications. This journaling should be done immediately before RETURN or SYNCPOINT commands.
Following output of the journal record, each application program dequeues itself from the extrapartition input queues to permit other application programs to access those queues.
If uncontrolled shutdown occurs before this journaling, no records will appear on the journal data set for that unit of work. The effect of that in-flight task is, therefore, automatically backed out on emergency restart. However, if the journal record is written before uncontrolled shutdown, this completed input data set processing will be recognized on emergency restart.
On emergency restart following uncontrolled shutdown or on a warm start following a controlled shutdown, use the following procedure, which will reposition the extrapartition input data sets to reflect the input and processing of their records during previous CICS operation.
You can identify an extrapartition input recovery program in the PLT for execution during the initialization phase. This program reads the journal data set forward. Each journaled record indicates the number of READQ operations performed on the relevant extrapartition input data set during previous execution of application programs. The same number of READQ TD commands is issued again by the recovery program, to the same input queue that was referenced previously.
On reaching the end of the journal data set, the extrapartition input data sets are positioned at the same point they had reached before the initiation of tasks that were in-flight at uncontrolled shutdown. The result is the logical recovery of these input data sets with in-flight task activity backed out.
The recovery of output extrapartition data sets is somewhat different from the recovery of input data sets.
For a tape output data set, use a new output tape on restart. You can then use the previous output tape if you need to recover information recorded before termination.
To avoid losing data in tape output buffers on termination, you can write unblocked records. Alternatively, write the data to an intrapartition disk destination (recovered by CICS on a warm start or emergency restart) and periodically copy it to the extrapartition tape destination through an automatically initiated task. On termination, the data is still available to be recopied on restart.
If a controlled shutdown of CICS occurs, the previous output tape closes correctly and writes a tape mark. However, on an uncontrolled shutdown such as a power failure or machine check, a tape mark is not written to indicate the end of the tape.
For a line printer output data set, you could just choose to carry on from where printing stopped when the system stopped. However, if you want to continue output from a defined point such as at the beginning of a page, you may need to use a journal data set. As each page is completed during normal CICS operation, write a record to a journal data set.
On restart, the page that was being processed at the time of failure can be identified from the journal data set, and that page can be reprocessed to reproduce the same output. Alternatively, use an intermediate intrapartition destination (as previously described) for tape output buffers.
You can use initialization (PLTPI) programs:
There are two PLT phases. The first phase occurs before the system initialization task is attached, and should not use CICS resources, because initialization is incomplete. The first phase is intended solely to enable exits that are needed during recovery processing. The second phase occurs after CICS initialization is complete and, at this point, you may use PLT programs to customize the environment.
For information on how to code the PLT, see the CICS Resource Definition Guide. For programming information about the special conditions that apply to PLT programs, see the CICS Customization Guide.
[[ Contents Previous Page | Next Page Index ]]