Using Link3270 messages
To run transactions using the Link3270 Bridge, a client program creates an inbound message, links to DFHL3270 with a COMMAREA containing the message, and interprets the result of the outbound message.
- The inbound message
-
The inbound message is passed on the LINK, ECI or EXCI call as
a COMMAREA. It contains the following data structures:
- Bridge message header (BRIH)
- A data structure containing parameters to be passed to the Link3270 bridge mechanism, such as the name of the user transaction; the facility-like template to be used when the bridge facility is created, and the termid to be assigned to the bridge facility.
- Bridge message vectors (BRIV)s
- Zero or more data structures containing data to be passed to the user transaction containing the data requested by the EXEC CICS command for 3270 terminal input.
For example, if the application issues an EXEC CICS RECEIVE MAP , the inbound message will have the following form:Where ADS is the application data structure expected by the RECEIVE MAP command.Table 1. Message structure for the EXEC CICS RECEIVE MAP command Message structure for the EXEC CICS RECEIVE MAP command BRIH BRIV-RM ADS Sample BRIH and BRIV copybooks are supplied, primed with the default values, to simplify programming. You can include these in your program and then change only the specific fields relevant to the request.
- The outbound message
-
The outbound message is passed in the COMMAREA on return from
the LINK, ECI or EXCI call. It contains the following data:
- Bridge message header (BRIH)
- A data structure containing parameters returned by the Link3270 mechanism, such as return and response codes; the actual termid assigned to the bridge facility, and the length of the returned message.
- Bridge message vectors (BRIV)s
- Zero or more data structures containing the data supplied by the EXEC CICS command for a 3270 terminal output request, or requests for more data, to be passed to the client program.
For example, if the application issues several non-terminal EXEC CICS commands, an EXEC CICS SEND MAP and then an EXEC CICS RETURN , the outbound message will have the following form where ADS is the application data structure expected by the SEND MAP command.
Table 2. Message structure for the EXEC CICS SEND MAP command Message structure for the EXEC CICS SEND MAP command BRIH BRIV-SM ADS A more complicated example would be one where the application issues several non-terminal EXEC CICS commands, an EXEC CICS SYNCPOINT , an EXEC CICS SEND CONTROL , an EXEC CICS SEND MAP , and then an EXEC CICS RETURN . In this case, the outbound message has the following form:Table 3. More complicated message structure More complicated message structure BRIH BRIV-SP BRIV-SC BRIV-SM ADS