IBM SC34-7012-01 manual START TRANSID commands, PL/I programs and error handling

Models: SC34-7012-01

1 268
Download 268 pages 41.5 Kb
Page 165
Image 165
START TRANSID commands

START TRANSID commands

In a transaction that uses the START TRANSID command to start other transactions, you must maintain logical data integrity.

You can maintain data integrity by following these guidelines:

1.Always use the PROTECT option of the START TRANSID command. This ensures that if the START-issuing task is backed out, the new task will not start.

2.If you pass data to the started transaction (on one of the data options FROM, RTERMID, RTRANSID, or QUEUE), ensure you define the associated temporary storage queue as recoverable. The temporary storage queue is named on the REQID option of the START command when using any of the data options. To make the temporary storage queue recoverable, define the queue in a temporary storage table using the DATAID option of the DFHTST TYPE=RECOVERY macro (see “Recovery for temporary storage” on page 135).

This ensures that data being passed to another task is deleted from the temporary storage queue if the START-issuing task fails and is backed out. v If REQID is not used, the default DATAID is ‘DFRxxx’.

vIf REQID is used, that REQID is the DATAID designated as recoverable in the TST.

Use a recoverable DATAID to ensures that, if a system failure occurs after the START-issuing task has completed its syncpoint, the START command is preserved. CICS starts the transaction specified on a recoverable START command after an emergency restart, when the expiry time is reached and provided the terminal specified the TERMID option is available. A DATAID is relevant only if data is being passed to the started transaction.

Note: Consider using EXEC CICS RETURN TRANSID(...) with the IMMEDIATE option if the purpose is to start the next transaction in a sequence on the same terminal. This does not unlock the terminal, incurs less overhead, and, in a dynamic transaction routing (DTR) environment, the transaction is eligible for DTR.

PL/I programs and error handling

ON-units are a standard method of error-handling in PL/I programs. If the execution-time option STAE is specified, CICS program control services set up an exit routine that activates the PL/I ON-units.

This exit routine can handle:

vAll PL/I errors

vCICS abends that occur in the PL/I program and in associated CICS services

vProgram checks

Note that, under CICS, PL/I execution-time options can be specified only by the PLIXOPT character string.

For details of PL/I coding restrictions in a CICS environment, see the appropriate PL/I programmer’s guide for your compiler.

Locking (enqueuing on) resources in application programs

This topic describes locking (enqueuing) functions provided by CICS (and access methods) to protect data integrity.

Chapter 13. Programming for recovery 153

Page 165
Image 165
IBM SC34-7012-01 manual START TRANSID commands, PL/I programs and error handling