CICS START – Quick Reference

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).

Explain Like I'm Five: What Is CICS START?

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.

Command Syntax

cobol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
EXEC 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.

Parameters Explained

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.

CICS START parameters
ParameterRequiredMeaning
TRANSIDYesTransaction ID (1–4 chars) to start. Must be defined to CICS.
INTERVAL(hhmmss)NoDelay from now in packed decimal: hhmmss (e.g. 10000 = 1 hour). Default 0 = immediate.
TIME(hhmmss)NoAbsolute time when the task should run (e.g. 173000 = 17:30:00). Packed decimal.
AFTER HOURS/MINUTES/SECONDSNoDelay using fullword binary. e.g. AFTER HOURS(1) MINUTES(30) = 1h 30m from now.
AT HOURS/MINUTES/SECONDSNoAbsolute time using fullword binary. Use when packed decimal is awkward (e.g. in C).
FROM(data-area)NoData passed to the started task. Retrieved by the task with RETRIEVE.
LENGTH(data-length)If FROMLength in halfword binary of the FROM data. Must be greater than zero.
REQID(name)No1–8 char name for the request. Used for TS queue and for CANCEL REQID. Must be unique.
TERMID(name)NoTerminal (or APPC session) where the started task runs. Omit for no terminal.
SYSID(system-name)NoSend START to a remote CICS system. Omit for local.
RTRANSID / RTERMID / QUEUENoValues passed to the started task; retrieved with RETRIEVE (e.g. next transaction or terminal to use).
RESP / RESP2NoCapture response and secondary response codes for error handling.

Timing: INTERVAL vs TIME vs AFTER vs AT

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.

Passing Data: FROM, LENGTH, REQID

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 and SYSID

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.

Step-by-Step: Starting a Transaction Immediately

  1. Define a working-storage field for the transaction ID (e.g. PIC X(4)) and optionally RESP/RESP2.
  2. Issue EXEC CICS START TRANSID(...) with no time option (or INTERVAL(0)). Include RESP (and RESP2) so you can check for errors.
  3. Check the response code. If not DFHRESP(NORMAL), handle the error (e.g. TRANSIDERR, TERMIDERR, NOTAUTH).
  4. Continue your program. The started transaction runs asynchronously; your task does not wait for it.

Tutorial: Immediate START with Response Check

cobol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
WORKING-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.

Tutorial: Deferred START with Data (FROM / LENGTH / REQID)

cobol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
WORKING-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.

Common Response Codes

Response codes for CICS START
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.

Six-Hour Rule for TIME and AT

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.

Best Practices

  • Always specify RESP (and RESP2) and check them before assuming the START was accepted.
  • Use REQID when you pass data or need to cancel the START; keep REQID unique per request.
  • For remote STARTs, NOCHECK can improve performance but you give up immediate error reporting.
  • Use PROTECT when the started task must not run until the starting task has taken a sync point; with FROM, use recoverable temporary storage for the REQID queue when using PROTECT.
  • Omit TERMID when the started task does not need a terminal; this avoids terminal availability issues at expiration time.

Test Your Knowledge

Test Your Knowledge

1. What does CICS START do?

  • Runs a transaction and waits for it to finish
  • Starts a transaction asynchronously (current task does not wait)
  • Stops a transaction
  • Defines a new transaction

2. How does the started task receive data from the START command?

  • In the COMMAREA automatically
  • Using EXEC CICS RETRIEVE
  • In a file
  • It cannot receive data

3. INTERVAL(0) means:

  • Do not run
  • Run in 0 seconds (immediately when possible)
  • Run at midnight
  • Invalid parameter