START ATTACH

Start a task immediately.

Read syntax diagramSkip visual syntax diagram
START ATTACH

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

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

Conditions: INVREQ, LENGERR, NOTAUTH, TRANSIDERR

 

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 cancelled, so EIBREQID is set to nulls.

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

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

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 issuing 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 being started, whether or not data is 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 executed by a task started as the result of a START ATTACH command.

Conditions

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

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

Default action: terminate the task abnormally.

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

Default action: terminate the task abnormally.