When a session has been acquired, the next step is to cause the remote IMS process to be initiated.
The LUTYPE6.1 architecture defines a special function management header, called an attach header, which carries the name of the remote process (in CICS terms, the transaction) that is to be initiated, and also contains further session-related information.
CICS provides the BUILD ATTACH command to enable a CICS application program to build an attach header to send to IMS, and the EXTRACT ATTACH command to enable information to be obtained from attach headers received from IMS.
Because these commands are available, you do not need to know the detailed format of an LUTYPE6.1 attach header. In most cases, however, you need to know the meaning of the information that it carries.
BUILD ATTACH
ATTACHID(name)
[PROCESS(ISCEDT|BASICEDT∨name)]
[RESOURCE(name)]
[RPROCESS(name)]
[RRESOURCE(name)]
[QUEUE(name)]
[IUTYPE(0|data-value)]
[DATASTR(0|data-value)]
[RECFM(data-value)]
The parameters of the BUILD ATTACH command have the following meanings:
In CICS-to-IMS communication, the remote process is always an editor. It can be ISCEDT (or its alias), BASICEDT, or an MFS MID name. The process name must not exceed eight characters.
If the PROCESS option is omitted, IMS assumes ISCEDT.
The RESOURCE option specifies the primary resource name (up to eight characters) that is to be assigned to the remote process that is being initiated.
In CICS-to-IMS communication, the primary resource name is either an IMS transaction code or a logical terminal name. You can omit the RESOURCE option if the IMS message destination is specified in the first eight bytes of the message or if the destination is preset by the IMS operator.
If a primary resource name is supplied to IMS, the data stream is not edited for destination and security information. You should therefore omit the RESOURCE option if IMS password processing is required.
The name in the RESOURCE option is ignored during conversational processing, or if the remote process is BASICEDT.
The RPROCESS option specifies a suggested return destination process name. IMS returns this name as a destination process name (ATTDPN) when it sends a reply to CICS, although the name may be overridden by MFS.
CICS uses the returned destination process name to determine the transaction that is to be attached after a session restart. At any other time, it is ignored. The RPROCESS option should therefore name a transaction that will handle any queued messages when it is attached by CICS at session restart following a session failure.
The RRESOURCE option specifies a suggested primary resource name that is to be assigned to the return process. IMS returns this name as the resource name (ATTPRN) when it sends a reply to CICS.
Although CICS normally ignores this field, one use for it in ISC is to specify a CICS terminal to which output messages occurring after session restart should be sent.
The QUEUE option specifies a queue that can be associated with the remote process. In CICS-to-IMS communication, it is used only to send a paging request to IMS during demand paging. The name used must be the one obtained by a previous EXTRACT ATTACH QNAME command. The name must not exceed eight characters.
The IUTYPE option specifies SNA chaining information for the message. The value is halfword binary. The bits in the binary value are used as follows:
0–7 | X'00' – must be set to zero |
8–15 | X'00' – multiple RU chains |
X'01' – single RU chains. |
The DATASTR option is used to select an IMS component. The value is halfword binary. The bits in the binary value are used as follows:
0–7 | X'00' – must be set to zero |
8–11 | 0000 – (user-defined data stream) |
12–15 | 0000 – IMS Component 1 |
0001 – IMS Component 2 | |
0010 – IMS Component 3 | |
0011 – IMS Component 4. |
If the DATASTR option is omitted, IMS Component 1 is assumed.
The RECFM option specifies the format of the user data that is sent to the remote process. The name must represent a halfword binary value. The bits in the binary value are used as follows:
0–7 | X'00' – reserved – must be set to zero |
8–15 | X'01' – variable-length variable-blocked (VLVB) format |
X'04' – chain of RUs. |
If VLVB is specified, your application program must add a two-byte binary length field in front of each record. If chain of RUs is specified, you can send your data in the usual way; no length fields are required.
A record is interpreted by IMS as either a segment of a message (without MFS) or an MFS record (with MFS).
The RECFM option indicates only the type of the message format. Multiple records can be sent by one SEND command. In this case, it is the responsibility of your application program to perform the blocking.
Having built the attach header, you must ensure that it is transmitted with the first data sent to the remote system by naming it in the ATTACHID option of the SEND or CONVERSE command.