The INQUIRE_CONTEXT call

INQUIRE_CONTEXT returns information about the environment in which a transaction is running. Specifically, it provides information for transactions running in a bridge environment.

INQUIRE_CONTEXT

DFHBRIQX  [CALL,]
       [CLEAR,]
       [IN,
       FUNCTION(INQUIRE_CONTEXT),]
       [OUT,
       [CONTEXT(byte1),]
       [BRIDGE_TRANSACTION_ID(name4),]
       [BRIDGE_EXIT_PROGRAM(name8),]
       [BFB_TOKEN(name4),]
       [BRXA_TOKEN(name4),]
       [FACILITYTOKEN(name8),]
       [START_TYPE(byte1),]
       RESPONSE (name1 | *),
       REASON (name1 | *)]

This command is threadsafe.

Parameters

BFB_TOKEN(name4)
returns a pointer that contains the address of the bridge facility used by this task. Although the bridge facility is not a real terminal, it is represented by a data structure that has the same format as a TCTTE and can be mapped using the DSECT DFHTCTTE. If CONTEXT returns NORMAL, the contents of this field are meaningless.
Note: In earlier releases of CICS®, this field was called BRIDGE_FACILITY_TOKEN.
name4
The name of a 4-byte location to receive the token.
BRIDGE_EXIT_PROGRAM(name8)
returns the name of the bridge exit program used by this task. If CONTEXT returns NORMAL, the contents of this field are meaningless.
name8
The name of an 8-byte location to receive the name of the bridge exit program.
BRIDGE_TRANSACTION_ID(name4)
returns the name of the bridge monitor transaction that issued a START BREXIT TRANSID command to start this transaction. If CONTEXT returns NORMAL, the contents of this field are meaningless.
name4
The name of a 4-byte location to receive the name of the bridge monitor transaction.
BRXA_TOKEN(name4)
returns a token that contains the address of the bridge exit area (BRXA) used by this task. The BRXA is not applicable to the Link3270 bridge (START_TYPE=BRIQ_LINK). The format of BRXA is defined by the DFHBRARx copy books. If CONTEXT returns NORMAL, the contents of this field are meaningless.
name4
The name of a 4-byte location to receive the token.
CONTEXT(byte1)
returns, in a 1-byte location (byte1), the type of environment in which the transaction is running.
BRIDGE
A user transaction that was started using a bridge
BREXIT
A bridge exit program
NORMAL
A transaction that is not running in a bridge environment.
FACILITYTOKEN(name8)
returns the facilitytoken ( an identifier associated with the bridge facility). If CONTEXT returns NORMAL, the contents of this field are meaningless.
name8
The name of an 8-byte location to receive the facilitytoken.
START_TYPE(byte1)
returns, in a 1–byte location (byte1), an indication of how the 3270 bridge was started. If CONTEXT returns NORMAL, the contents of this field are meaningless.
BRIQ_START
The bridge was started using START BREXIT.
BRIQ_LINK
The bridge was started using the Link3270 mechanism.

RESPONSE and REASON values

The following table lists the RESPONSE and REASON values for INQUIRE_CONTEXT.

RESPONSE REASON
OK None
DISASTER ABEND
LOOP
INVALID None
EXCEPTION NO_TRANSACTION_ENVIRONMENT
KERNERROR None