Acquiring session-related information
You can use the EXTRACT ATTACH command to recover session-related information from the attach FMH if required, but the use of this command is not mandatory.
The presence of an attach header is indicated by EIBATT, which is set after the first RECEIVE command has been issued.
The EXTRACT ATTACH command has the following format:
EXTRACT ATTACH
[SESSION(data-area)]
[PROCESS(data-area)]
[RESOURCE(data-area)]
[RPROCESS(data-area)]
[RRESOURCE(data-area)]
[QUEUE(data-area)]
[IUTYPE(data-area)]
[DATASTR(data-area)]
[RECFM(data-area)]
The parameters of the EXTRACT ATTACH
command have the following meanings:
- DATASTR(data-area)
-
Contains a value specifying the IMS output component.
The data area must be a halfword binary field. The values set by IMS are as follows:
0–7 X'00' – (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. - IUTYPE(data-area)
-
indicates SNA chaining information for the message and the type
of MFS paged output.
The data area must be a halfword binary field. The values set by IMS are as follows:
0–7 X'00' – (zero) 8–15 X'00' – multiple RU chains, MFS autopaged output X'01' – single RU chains, MFS nonpaged output X'05' – single RU chains, MFS demand-paged output. - PROCESS(data-area)
- IMS returns either the return destination process name specified in the RPROCESS option of the BUILD ATTACH command, or a value set by the MFS MOD.
- QUEUE(data-area)
- IMS returns the LTERM name associated with the ISC session when MFS demand-paged output is ready to be sent. The returned value should be used in the QMODEL FMH and the BUILD ATTACH QNAME when a paging request is to be sent.
- RECFM(data-area)
-
Contains the data format of the incoming user message.
The data area must be a halfword binary field. The values set by IMS are as follows:
0–7 X'00' – (zero) 8–15 X'01' – variable-length variable-blocked (VLVB) format X'04' – chain of RUs (can also be X'00' or X'05'). If VLVB is specified, your application program must deblock the message by using the halfword-binary length field that precedes each record.
- RESOURCE(data-area)
- IMS returns either the return resource name specified in the RRESOURCE option of the BUILD ATTACH command, or a value set by the MFS MOD.
- RPROCESS(data-area)
- IMS sends the chained MFS MID name if MFS is being used. Otherwise, no value is sent.
- RRESOURCE(data-area)
- IMS sends the value set by the MFS MOD if MFS is being used. Otherwise, no value is sent.