START

Start task at a specified time.

Read syntax diagramSkip visual syntax diagram
START

>>-START--TRANSID(name)----------------------------------------->

   .-INTERVAL(0)------------------------.                    
>--+------------------------------------+--+-------------+------>
   +-INTERVAL(hhmmss)-------------------+  '-REQID(name)-'   
   +-TIME(hhmmss)-----------------------+                    
   |        .-------------------------. |                    
   |        V                         | |                    
   +-AFTER----+-HOURS(data-value)---+-+-+                    
   |          +-MINUTES(data-value)-+   |                    
   |          '-SECONDS(data-value)-'   |                    
   |     .-------------------------.    |                    
   |     V                         |    |                    
   '-AT----+-HOURS(data-value)---+-+----'                    
           +-MINUTES(data-value)-+                           
           '-SECONDS(data-value)-'                           

>--+----------------------------------------------+------------->
   '-FROM(data-area)--LENGTH(data-value)--+-----+-'   
                                          '-FMH-'     

>--+--------------------+--+-------------------+---------------->
   +-TERMID(name)-------+  '-SYSID(systemname)-'   
   '-USERID(data-value)-'                          

>--+----------------+--+---------------+--+-------------+------->
   '-RTRANSID(name)-'  '-RTERMID(name)-'  '-QUEUE(name)-'   

>--+---------+--+---------+------------------------------------><
   '-NOCHECK-'  '-PROTECT-'   

Conditions: INVREQ, IOERR, ISCINVREQ, LENGERR, NOTAUTH, RESUNAVAIL, SYSIDERR, TERMIDERR, TRANSIDERR, USERIDERR

Note for dynamic transaction routing: Using START if later CANCELed by another task, or if the started transaction uses RETRIEVE WAIT, could create inter-transaction affinities that adversely affect the use of dynamic transaction routing. See the CICS® Application Programming Guide for more information about transaction affinities.

Description

START starts a task, on a local or remote system, at a specified time. The time is specified by INTERVAL, AFTER, AT or TIME. See the section about expiration times in the CICS Application Programming Guide.

The starting task may pass data to the started task. The starting task may also specify a terminal to be used by the started task as its principal facility.

The default is INTERVAL(0), but for C the default is AFTER HOURS(0) MINUTES(0) SECONDS(0).

Note that CEDF is an exception to the START command and is not valid as a TRANSID name. You should therefore not attempt to start CEDF in this way.

You can use the RTRANSID, RTERMID, and QUEUE options to pass further data to the started task. These options can contain arbitrary data values whose meanings depend on what you have specified in the started and starting tasks. One possible way of using them is in the following situation. One task can start a second task, passing it a transaction name and a terminal name to be used when the second task starts a third task. The first task may also pass the name of a queue to be accessed by the second task.

One or more constraints have to be satisfied before the transaction to be executed can be started, as follows:
  • The specified interval must have elapsed or the specified expiration time must have been reached. (For more information, see the CICS Application Programming Guide.) The INTERVAL or AFTER options should be specified when a transaction is to be executed on a remote system; this avoids complications arising when the local and remote systems are in different time zones.
  • If the TERMID option is specified, the named terminal must exist and be available. If the named terminal does not exist when the time interval expires, the START is discarded.
  • If the PROTECT option is specified, the starting task must have taken a successful syncpoint. This option, coupled to extensions to system tables, reduces the exposure to lost or duplicated data caused by failure of a starting task.
  • If the transaction to be executed is on a remote system, the format of the data must be declared to be the same as that at the local system. This is done using the RDO options DATASTREAM and RECORDFORMAT. For CICS-CICS, these are always the default values. For CICS-IMS/VS, care should be taken to specify the correct values.

Execution of a START command naming a transaction in the local system cancels any outstanding POST commands executed by the starting task.

START commands can be queued by specifying the LOCALQ option on the RDO TRANSACTION resource definition, as described in the CICS Resource Definition Guide.

Passing data by interval control

If data is to be passed by interval control (using the FROM option), it is queued on a temporary storage queue. The REQID option allows you to specify the name of the temporary storage queue to be used. This identifier may be recoverable (in temporary storage terms) or nonrecoverable. The CICS Resource Definition Guide describes how to define recoverable temporary storage queues.

If you also specify the PROTECT option, the temporary storage queue identified by the REQID option should be defined as recoverable. If you do not specify the PROTECT option, the temporary storage queue should not be defined as recoverable. Unpredictable results can occur if these rules are not followed (see the CICS Recovery and Restart Guide).

If you specify the FROM and not the REQID option, a default 'DF' prefix temporary storage queue is used. The same rules apply as above; only specify the PROTECT option if you define the 'DF' prefix temporary storage queues as recoverable.

Note: A START command with REQID, issued from within a task that was itself initiated by a START with the same REQID, returns an AEIQ abend (IOERR condition) if the FROM data for the task has not yet been read by a RETRIEVE.

This is also true if more than one START command with the same REQID is issued by a task or tasks in the same CICS system. This is due to a tightening of the rules governing the use of the REQID option for start requests that have associated data. In CICS/ESA 4.1, and earlier releases, if you specify the same REQID on more than one START command, in some circumstances CICS accepts the start request. However, this can cause the behavior of subsequent RETRIEVE or CANCEL requests to be unpredictable. In particular, the association between each START and its data is lost. CICS TS regions always reject with an IOERR any START commands that specify a duplicate REQID.

Started tasks without data run without a facility address. Started tasks with data run with a facility address of an ICE until the data is retrieved.

Error checking and performance considerations

The NOCHECK option specifies that no response (to execution of the START command) is expected by the starting transaction. For START commands naming tasks to be started on a local system, error conditions are returned; error conditions are not returned for tasks to be started on a remote system. The NOCHECK option allows CICS to improve performance when the START command has to be shipped to a remote system; it is also a prerequisite if the shipping of the START command is queued pending the establishing of links to the remote system.

Starting tasks without terminals

If the task to be started is not associated with a terminal, each START command results in a separate task being started. This happens regardless of whether or not data is passed to the started task. The following examples show how to start a specified task, not associated with a terminal, in one hour:
EXEC CICS START
     TRANSID('TRNL')
     INTERVAL(10000)
     REQID('NONGL')
⋮
EXEC CICS START
     TRANSID('TRNL')
     AFTER HOURS(1)
     REQID('NONGL')
⋮

Starting tasks with terminals but without data

Only one task is started if several START commands, each specifying the same transaction and terminal, expire at the same time or before the terminal is available.

The following examples show how to request initiation of a task associated with a terminal. Because no request identifier is specified in these examples, CICS assigns one and returns it to the application program in the EIBREQID field of the EXEC interface block.
EXEC CICS START
     TRANSID('TRN1')
     TIME(185000)
     TERMID('STA5')
⋮
EXEC CICS START
     TRANSID('TRN1')
     AT HOURS(18) MINUTES(50)
     TERMID('STA5')
⋮

Starting tasks with terminals and data

Data is passed to a started task if one or more of the FROM, RTRANSID, RTERMID, and QUEUE options is specified. Such data is accessed by the started task by using a RETRIEVE command.

It is possible to pass many data records to a new task by issuing several START commands, each specifying the same transaction and terminal.

Execution of the first START command ultimately causes the new task to be started and allows it to retrieve the data specified on the command. The new task is also able to retrieve data specified on subsequently executed START commands that expire before the new task is terminated. If the transaction has been defined as restartable (by defining the transaction using the RDO option RESTART(YES)) and such data has not been retrieved before the new task is terminated, another new task is started and is able to retrieve the outstanding data.

If the transaction Start of changeabends andEnd of change has not been defined as restartable, no new task is initiated and the data is discarded.

The following examples show how to start a task associated with a terminal and pass data to it:
EXEC CICS START
     TRANSID('TRN2')
     TIME(173000)
     TERMID('STA3')
     REQID(DATAREC)
     FROM(DATAFLD)
     LENGTH(100)
⋮
EXEC CICS START
     TRANSID('TRN2')
     AT HOURS(17) MINUTES(30)
     TERMID('STA3')
     REQID(DATAREC)
     FROM(DATAFLD)
     LENGTH(100)
⋮

When using the C language, you are recommended to use the AFTER/AT HOURS, MINUTES, and SECONDS options as C does not provide a packed decimal data type. You may use INTERVAL or TIME, but if the value specified is not an integer constant, the application is responsible for ensuring that the value passed to CICS is in packed decimal format.

Dynamically routed transactions started by START commands

Some transactions started by a subset of START commands can be dynamically routed to a remote region. For general information about dynamic transaction routing, and specific information about which transactions started by START commands are eligible for dynamic routing, see the CICS Intercommunication Guide.

START failures without exception conditions

There are some circumstances in which a START command is executed without error, but the started task never takes place:
  • When the transaction or its initial program is disabled at the time CICS attempts to create the task.
  • When the START specifies a terminal and an expiration time, and the terminal is not defined (and cannot be located by the XICTENF or XALTENF exits) at expiration time.
  • When the START specifies a terminal that is not defined (and cannot be located by the XICTENF or XALTENF exits) at the time CICS attempts to create the task.

These exposures result from the delay between the execution of the START and the time of task creation. Even when the START is immediate, CICS may delay creating the task, either because the required terminal is not free or because of other system constraints.

You can use INQUIRE commands to ensure that the transaction and program are enabled at the time of the START command, but either may become disabled before task creation.

You get a TERMIDERR condition if the requested terminal does not exist at the time of the START, but if it is deleted subsequently, as occurs if the user logs off, your START request is discarded with the terminal definition.

Options

AFTER
specifies the interval of time that is to elapse before the new task is started.
There are two ways to enter the time under AFTER and AT.
  1. A combination of at least two of HOURS(0–99), MINUTES(0–59), and SECONDS(0–59). HOURS(1) SECONDS(3) would mean one hour and three seconds (the minutes default to zero).
  2. As one of HOURS(0–99), MINUTES(0–5999), or SECONDS(0–359 999). HOURS(1) means one hour. MINUTES(62) means one hour and two minutes. SECONDS(3723) means one hour, two minutes, and three seconds.
AT
specifies the time at which the new task is to be started. For the ways to enter the time, see the AFTER option.
FMH
specifies that the user data to be passed to the started task contains function management headers. This is not valid for LUTYPE2 or LUTYPE3 terminals.
FROM(data-area)
specifies the data to be stored for a task that is to be started at some future time.
HOURS(data-value)
specifies a fullword binary value in the range 0–99. This is a suboption of the AFTER and AT options. For its use and meaning, see the AFTER option.
INTERVAL(hhmmss)
specifies the expiration time as an interval of time that is to elapse from the time at which the START command is issued. The mm and ss are each in the range 0–59. The time specified is added to the current clock time by CICS when the command is executed, to calculate the expiration time.
LENGTH(data-value)
specifies a halfword binary data value that is the length of the data to be stored for the new task.
MINUTES(data-value)
specifies as a fullword binary value the number of minutes for use in conjunction with AFTER or AT. The value must be in the range 0 through 59 if HOURS or SECONDS is also specified, or in the range 0 through 5999 otherwise. This is a suboption of the AFTER and AT options. For its use and meaning, see the AFTER option.
NOCHECK
specifies that, for a remote system, CICS should improve performance of the START command by providing less error checking and slightly less function. For more information, see the section about improving the performance of intersystem START requests in the CICS Intercommunication Guide.
PROTECT
specifies that the new task is not started until the starting task has taken a syncpoint. If the starting task abends before the syncpoint is taken, the request to start the new task is canceled. If the REQID option is also specified, the request identifier should be a name defined as recoverable to temporary storage. If the started transaction is remote, PROTECT specifies that it must not be scheduled until the local transaction has successfully completed a syncpoint. For more information about the PROTECT option with remote transactions, see the CICS Intercommunication Guide.
QUEUE(name)
specifies a name (1–8 characters) that is passed to the started task. If this name represents a temporary storage queue, the queue must be local to the started task. The contents of the queue are not passed.

If you are also specifying REQID, make sure that the name of the REQID and the name of the QUEUE are not the same.

REQID(name)
specifies a name (1–8 characters), which must be unique, to identify a command. This option can be used when another task is to be provided with the capability of canceling an unexpired command.

If this option is omitted, CICS generates a unique request identifier in the EIBREQID field of the EXEC interface block, unless the NOCHECK option is specified, in which case field EIBREQID is set to nulls and cannot be used subsequently to cancel the START command.

If you include any of the data options (FROM, RTERMID, RTRANSID or QUEUE), the data is stored in a TS queue using the REQID name specified (or CICS generated) as the identifier. The queue record thus identified must be local to the CICS system where the START command is processed. The START command is processed on the system identified by the SYSID option or, if the SYSID option is omitted, on the system associated with the TRANSID option.

RTERMID(name)
specifies a value (1–4 characters), for example a terminal name, that may be retrieved when the transaction, specified in the TRANSID option in the START command, is started.

When retrieved, the value may be used in the TERMID option of a subsequent START command.

RTRANSID(name)
specifies a value (1–4 characters), for example a transaction name, that may be retrieved when the transaction, specified in the TRANSID option in the START command, is started.

When retrieved, the value may be used in the TRANSID option of a subsequent START command.

SECONDS(data-value)
specifies a fullword binary value in the range 0–59, when HOURS or MINUTES are also specified, or 0–359 999 when SECONDS is the only option specified. This is a suboption of the AFTER and AT options. For its use and meaning, see the AFTER option.
SYSID(systemname)
specifies the name of the system to which the request is directed.
TERMID(name)
specifies the symbolic identifier (1–4 alphanumeric characters) of the principal facility associated with a transaction to be started as a result of a START command. This principal facility can be either a terminal (the usual case) or an APPC session. Where an APPC session is specified, the connection (or modeset) name is used instead of a terminal identifier. This option is required when the transaction to be started must communicate with a terminal; it should be omitted otherwise.

The terminal identifier must be defined as either a local or a remote terminal on the system in which the START command is executed, when the start of the transaction takes effect.

TIME(hhmmss)
specifies the time when a new task should be started.

When using the C language, you are recommended to use the AFTER/AT HOURS, MINUTES, and SECONDS options as C does not provide a packed decimal data type. You may use TIME, but if the value specified is not an integer constant, the application is responsible for ensuring that the value passed to CICS is in packed decimal format.

TRANSID(name)
specifies the symbolic identifier (1–4 characters) of the transaction to be executed by a task started as the result of a START command.

If SYSID is specified, and names a remote system, the transaction is assumed to be on that system irrespective of whether or not the transaction definition is defined as remote in the PCT. Otherwise the transaction definition is used to find out whether the transaction is on a local or a remote system.

USERID(data-value)
Specifies the userid under whose authority the started transaction is to run, if the started transaction is not associated with a terminal (that is, when TERMID is not specified). This is referred to as userid1.

If you omit both TERMID and USERID, CICS uses instead the userid under which the transaction that issues the START command is running. This is referred to as userid2.

By using either userid1 or userid2 CICS ensures that a started transaction always runs under a valid userid, which must be authorized to all the resources referenced by the started transaction.

CICS performs a surrogate security check against userid2 to verify that this user is authorized to userid1. If userid2 is not authorized, CICS returns a NOTAUTH condition. The surrogate check is not done here if USERID is omitted.

Conditions

INVREQ
RESP2 values:
4
The value specified in HOURS, for AFTER or AT options, or the hh value specified for INTERVAL, is out of range.
5
The value specified in MINUTES, for AFTER or AT options, or the mm value specified for INTERVAL, is out of range.
6
The value specified in SECONDS, for AFTER or AT options, or the ss value specified for INTERVAL, is out of range.
17
The STARTed transaction is not shutdown-enabled, and the CICS region is in the process of shutting down..
18
A USERID is specified and the CICS external security manager interface is not initialized.
Also occurs (RESP2 not set) in any of the following situations:
  • The START command is not valid for processing by CICS.
  • Values specified in the INTERVAL option are out of range.

Default action: terminate the task abnormally.

IOERR
occurs in any of the following situations:
  • An input/output error occurred during a START operation.
  • A START operation attempts to write to a temporary storage queue when the DFHTEMP dataset is full. is full.
  • A START operation uses a REQID name that already exists. This condition only occurs when the FROM option is also used.

Default action: terminate the task abnormally.

ISCINVREQ
occurs when the remote system indicates a failure that does not correspond to a known condition.

Default action: terminate the task abnormally.

LENGERR
occurs if LENGTH is not greater than zero.

Default action: terminate the task abnormally.

NOTAUTH
RESP2 values:
7
A resource security check fails on TRANSID (name).
9
A surrogate user security check fails on USERID (name).

The security access capabilities of the transaction that issued the command do not allow the command to be performed with the value specified in the USERID option. The security access capabilities of the transaction have been established by the external security manager according to user security, and whether link security or the execution diagnostic facility (EDF) have been in use.

Default action: terminate the task abnormally.

RESUNAVAIL
RESP2 values:
121
A resource required by the transaction to be started is unavailable on the target region. The RESUNAVAIL condition applies only to dynamically-routed, non-terminal-related EXEC CICS START requests.

RESUNAVAIL is returned on the EXEC CICS START command executed by the mirror in the target region, if an XICERES global user exit program indicates that a required resource is unavailable on the target region. It is not returned to the application.

Default action: reinvoke the distributed routing program for route selection failure.

SYSIDERR
occurs when the SYSID option specifies a name that is neither the local system nor a remote system (made known to CICS by defining a CONNECTION). SYSIDERR also occurs when the link to the remote system is known but unavailable. This condition may not be raised if the user exit XISLCLQ is enabled (see the CICS Customization Guide for programming information).
Start of changeThe following error is indicated by a RESP2 value:
1
The dynamic routing program rejected the START request.
End of change

Default action: terminate the task abnormally.

TERMIDERR
occurs if the terminal identifier in a START command cannot be found in the terminal control table.

Default action: terminate the task abnormally.

TRANSIDERR
occurs if the transaction identifier specified in a START command cannot be found in the program control table.

Default action: terminate the task abnormally.

USERIDERR
RESP2 values:
8
The specified USERID is not known to the external security manager.
10
The external security manager is in a state such that CICS cannot determine whether a specified USERID is valid.
Start of change19End of change
Start of changeThe specified USERID is revoked.End of change

Default action: terminate the task abnormally.