START ATTACH

Start a task immediately.

Syntax

START ATTACH

Read syntax diagramSkip visual syntax diagramSTART ATTACHTRANSID( name)FROM( data-area)LENGTH( data-value)

Conditions: INVREQ, LENGERR, NOSTART, NOTAUTH, TRANSIDERR

NOHANDLE, RESP, and RESP2 are common options that can be added to all EXEC CICS commands to process error conditions. They are not explicitly included in the command syntax diagram and option descriptions. For information about these common options and EXEC CICS command syntax, see EXEC CICS command format and programming considerations.

Description

START ATTACH starts a non-terminal task immediately in the local CICS® region.

The attached task has a STARTCODE of U and cannot be canceled, so EIBREQID is set to nulls.

ATTACH allows a START issued in a PLTPI program to take effect before initialization completes.

The starting task can pass data to the started task by using the FROM option.

START ATTACH does not propagate the origin data record (ODR), so tasks are always started at a new point of origin

Starting tasks with data

If data is to be passed, it is not written to a temporary storage queue; only its address is passed.

The attached task retrieves data in the normal way. The task that issued the START must ensure that the data is valid when it is retrieved, either by synchronizing its execution with the attached task, or by placing the data in shared storage.

Each START ATTACH command results in a separate task started, optionally with data passed to the started task. The following example shows how to start a specified task, and pass data to it:
EXEC CICS START ATTACH
          TRANSID('TRNL')
          FROM(DATAFLD)
          LENGTH(100)
⋮

Options

FROM(data-area)
Specifies the data to be passed to a started task.
LENGTH(data-value)
Specifies a halfword binary data value that is the length of the data to be passed to a started task.
TRANSID(name)
Specifies the symbolic identifier (1–4 characters) of the transaction to be started by a task started as the result of a START ATTACH command.

The TRANSID option is used in previous hop data that is collected. For more information, see Previous hop data characteristics.

Conditions

16 INVREQ
RESP2 values:
11
An attempt was made to route a START ATTACH request.
12
A START ATTACH request failed.

Default action: terminate the task abnormally.

22 LENGERR
Occurs if LENGTH is not greater than zero.

Default action: terminate the task abnormally.

6.2 and later 10 NOSTART
Occurs if the request to start a task is discarded.
RESP2 values:
1
The PURGETHRESH limit of the TRANCLASS to which the specified transaction belongs has been reached, and the request is discarded as set by the PURGEACTION of DISCARD.
70 NOTAUTH
RESP2 values:
7
A resource security check fails on TRANSID (name).

Default action: terminate the task abnormally.

28 TRANSIDERR
Occurs if the transaction identifier specified in a START command is not defined to CICS.
RESP2 values:
11
The specified transaction is defined as remote.

Default action: terminate the task abnormally.