Module 10: CICS Transaction Processing
START
The EXEC CICS START command schedules a new transaction to run now or at a later time.
It is the way one task starts another task, with or without a delay, and passes data to it.
What the START command does
- Starts the transaction named by TRANSID, which creates a brand new task.
- Can start it immediately, or after a delay using the INTERVAL, TIME, AFTER, or AT options.
- The FROM and LENGTH options pass a data area to the new task.
- The new task collects the data with the EXEC CICS RETRIEVE command.
Options of the START command
- TRANSID - the transaction to start. This option is required.
- FROM and LENGTH - the data area passed to the started task.
- INTERVAL(hhmmss) - start after a delay, for example INTERVAL(002000) means 20 minutes from now.
- TIME(hhmmss) - start at a specific time of day.
- REQID - names the request so it can be cancelled later with the CANCEL command.
- TERMID - starts the transaction on a specific terminal instead of in the background.
- PROTECT - makes the request recoverable so it survives a CICS restart.
START and RETRIEVE work together
- START stores the data and schedules the task; the started task issues RETRIEVE to read it.
- If the started program never issues RETRIEVE, the data is simply discarded.
- Typical uses: delayed printing, time-triggered housekeeping, and starting a transaction on another terminal.
- Both commands must agree on the data length and layout, usually through a shared copybook.
Example of starting a delayed transaction
- This starts the print transaction PRNT 20 minutes from now and passes it a 200-byte record.
- *--- start the print transaction 20 minutes from now --- EXEC CICS START TRANSID('PRNT') FROM(PRINT-RECORD) LENGTH(200) INTERVAL(002000) REQID('PRINT01') END-EXEC.
- The REQID lets the program cancel this request later if the user changes their mind.
