The CICS START command starts a new transaction asynchronously. The task that issues START does not wait for the new transaction to finish; it continues immediately. You can run the new transaction right away (default), after a delay (INTERVAL or AFTER), or at an absolute time (TIME or AT). You can also pass data to the started task using FROM and LENGTH, and optionally name a terminal (TERMID) or a remote system (SYSID).
Imagine you tell a friend: "When I leave, please run this errand in one hour." You do not stand there for an hour; you go on with your day. CICS START is like that: your program says "start this other program now (or in 10 minutes, or at 5 p.m.)," and your program keeps going. The other program runs on its own, maybe on another "terminal" or even on another computer. You can also hand the other program a note (data) so it knows what to do.
1234567891011121314151617EXEC CICS START TRANSID('transaction-id') [INTERVAL(hhmmss)] [TIME(hhmmss)] [AFTER HOURS(hh) MINUTES(mm) SECONDS(ss)] [AT HOURS(hh) MINUTES(mm) SECONDS(ss)] [REQID(name)] [FROM(data-area)] [LENGTH(data-length)] [TERMID('terminal-id')] [SYSID('system-name')] [RTRANSID('trans-id')] [RTERMID('terminal-id')] [QUEUE(name)] [RESP(response-field)] [RESP2(response-field2)] END-EXEC.
TRANSID is required; it identifies which transaction to start. All other parameters are optional. The following table summarizes each parameter and how it affects behavior.
| Parameter | Required | Meaning |
|---|---|---|
| TRANSID | Yes | Transaction ID (1–4 chars) to start. Must be defined to CICS. |
| INTERVAL(hhmmss) | No | Delay from now in packed decimal: hhmmss (e.g. 10000 = 1 hour). Default 0 = immediate. |
| TIME(hhmmss) | No | Absolute time when the task should run (e.g. 173000 = 17:30:00). Packed decimal. |
| AFTER HOURS/MINUTES/SECONDS | No | Delay using fullword binary. e.g. AFTER HOURS(1) MINUTES(30) = 1h 30m from now. |
| AT HOURS/MINUTES/SECONDS | No | Absolute time using fullword binary. Use when packed decimal is awkward (e.g. in C). |
| FROM(data-area) | No | Data passed to the started task. Retrieved by the task with RETRIEVE. |
| LENGTH(data-length) | If FROM | Length in halfword binary of the FROM data. Must be greater than zero. |
| REQID(name) | No | 1–8 char name for the request. Used for TS queue and for CANCEL REQID. Must be unique. |
| TERMID(name) | No | Terminal (or APPC session) where the started task runs. Omit for no terminal. |
| SYSID(system-name) | No | Send START to a remote CICS system. Omit for local. |
| RTRANSID / RTERMID / QUEUE | No | Values passed to the started task; retrieved with RETRIEVE (e.g. next transaction or terminal to use). |
| RESP / RESP2 | No | Capture response and secondary response codes for error handling. |
INTERVAL(hhmmss) is a delay from the moment the START command runs. The value is in packed decimal: hours, minutes, seconds. For example, INTERVAL(10000) means one hour from now; INTERVAL(003000) means 30 minutes. INTERVAL(0) or omitting the time option means "run as soon as possible" (immediate).
TIME(hhmmss) is an absolute time of day in packed decimal (hhmmss). For example, TIME(173000) means 17:30:00. The task is scheduled to run at that clock time. If you use TIME or AT, be aware of the 6-hour rule: if the specified time falls within the past 6 hours (including across midnight), CICS runs the START immediately instead of at that time.
AFTER and AT take HOURS, MINUTES, and SECONDS as fullword binary values. AFTER is a delay (e.g. AFTER HOURS(1) MINUTES(30)); AT is an absolute time. These are often used from C, where packed decimal is not native. MINUTES can be 0–5999 when used alone (e.g. 90 for 90 minutes), or 0–59 when combined with HOURS and SECONDS.
FROM(data-area) and LENGTH(data-length) pass a block of data to the started task. CICS stores this in temporary storage. The started task receives it with EXEC CICS RETRIEVE. LENGTH must be greater than zero when FROM is specified. If you use REQID(name), that name identifies the request and the TS queue; it must be unique. You can later cancel the deferred START with CANCEL REQID(name). If you omit REQID, CICS generates an identifier and returns it in the EIBREQID field (unless you use NOCHECK). When you pass data, the started task runs with a facility address (ICE) until it retrieves the data.
TERMID assigns the started task to a specific terminal (or APPC session). Use it when the started transaction must run at that terminal. If you omit TERMID, the task is not tied to a terminal and each START creates a separate task. SYSID sends the START to a remote CICS system; the transaction then runs there. Specifying TERMID means the origin data record (ODR) is not propagated; the task starts at a new point of origin.
12345678910111213141516171819WORKING-STORAGE SECTION. 01 WS-TRANS-ID PIC X(4) VALUE 'TRN1'. 01 WS-RESP PIC S9(4) COMP. 01 WS-RESP2 PIC S9(4) COMP. PROCEDURE DIVISION. EXEC CICS START TRANSID(WS-TRANS-ID) RESP(WS-RESP) RESP2(WS-RESP2) END-EXEC. IF WS-RESP NOT = DFHRESP(NORMAL) *> Handle error (e.g. TRANSIDERR, NOTAUTH) EXEC CICS RETURN END-EXEC END-IF. *> Current task continues; TRN1 runs asynchronously ...
Here, TRN1 is started with no delay and no data. The program checks RESP and continues; it does not wait for TRN1 to finish.
12345678910111213141516171819202122232425WORKING-STORAGE SECTION. 01 WS-TRANS-ID PIC X(4) VALUE 'TRN2'. 01 WS-TERM PIC X(4) VALUE 'STA3'. 01 WS-REQID PIC X(8) VALUE 'DATAREC'. 01 WS-DATA PIC X(100). 01 WS-LEN PIC S9(4) COMP VALUE 100. 01 WS-RESP PIC S9(4) COMP. PROCEDURE DIVISION. *> Move data to pass to the started task MOVE 'Order 12345 process this' TO WS-DATA. EXEC CICS START TRANSID(WS-TRANS-ID) TIME(173000) TERMID(WS-TERM) REQID(WS-REQID) FROM(WS-DATA) LENGTH(WS-LEN) RESP(WS-RESP) END-EXEC. IF WS-RESP NOT = DFHRESP(NORMAL) *> Handle INVREQ, LENGERR, TERMIDERR, etc. END-IF.
This schedules TRN2 to run at 17:30:00 at terminal STA3 and passes 100 bytes from WS-DATA. The started task uses RETRIEVE to get the data. REQID is used so the request can be canceled with CANCEL REQID if needed.
| Condition (RESP) | Meaning |
|---|---|
| NORMAL (0) | START accepted. Task will run at the specified time (or immediately). |
| INVREQ (16) | Invalid request. RESP2: 4=HOURS out of range, 5=MINUTES, 6=SECONDS; 17=region shutting down and transaction not shutdown-enabled. |
| IOERR (17) | I/O error (e.g. DFHTEMP full, or duplicate REQID). |
| LENGERR (22) | LENGTH not greater than zero or invalid. |
| NOTAUTH (70) | Security failure. RESP2: 7=TRANSID, 9=USERID. |
| SYSIDERR (53) | Remote system problem. RESP2: 1=dynamic routing rejected. |
| TERMIDERR (11) | Terminal identifier not defined to CICS at time of START. |
| TRANSIDERR (28) | Transaction ID not defined to CICS. |
Always check RESP (and RESP2 when applicable) after START. INVREQ with RESP2 4, 5, or 6 indicates invalid HOURS, MINUTES, or SECONDS. NOTAUTH means a security check failed on the transaction or user. TRANSIDERR and TERMIDERR mean the transaction or terminal is not defined at the time of the START.
If the time you specify with TIME or AT is in the past, CICS applies a 6-hour rule: if the current time is within 6 hours after the specified time, the START runs immediately. For example, START TIME(020000) issued at 05:00 or 07:00 on Monday runs immediately because 02:00 is within the preceding 6 hours. This applies even across midnight. For deferred STARTs across time zones, INTERVAL or AFTER is often clearer than TIME or AT.
1. What does CICS START do?
2. How does the started task receive data from the START command?
3. INTERVAL(0) means: