Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Using the TIBCO Service Gateway for IMS TM : Returning Data from TIBCO Object Service Broker to IMS TM

Returning Data from TIBCO Object Service Broker to IMS TM
You can set the contents of the SPA (for conversational programs) and up to two output message segments in the I/O-PCB from TIBCO Object Service Broker rules using either MAP tables or the $SETENVCOMMAREA tool.
Example using $SETENVCOMMAREA
Although MAP tables are likely to be more useful for real applications, for brevity $SETENVCOMMAREA is used in the following example. Its syntax is:
LEN = $SETENVCOMMAREA(message, segment)
where:
 
If segment=0, the string is inserted into the SPA. When the TIBCO Object Service Broker IMS TM client program inserts these messages into the I/O-PCB on termination, each message must have the format shown below, which includes at least a valid llzz field:
At Session End
Depending on the actions that you require at session end, you must construct valid IMS output message segments. You must establish the length ll and preload the IMS control area zz or zzzz components before issuing $SETENVCOMMAREA. An example for segment 1 is:

 
LL_OUT = GENBIN(LENGTH(DATA) + 4, 2);
ZZ_OUT = GENBIN('00', 2);
STRING_OUT = LL_OUT || ZZ_OUT || DATA;
LEN = $SETENVCOMMAREA(STRING_OUT, SEGMENT);

 
where LEN, LL_OUT, DATA, STRING_OUT, SEGMENT are defined as local variables, with SEGMENT set to the segment number.
The trancode to which a message is to be sent is reserved in the first eight bytes of segment 1 if the destination is non-conversational. The first eight bytes are set by the SWITCH facility described in Passing Control to an IMS Transaction at Session End.
The returned data is directed either to your terminal or to another IMS program as described in the following section.
Do not change the first 14 bytes of segment 0 (the SPA). Use MAP tables or the GENBIN tool to set up the first four bytes of segments 1 or 2.
See Also
TIBCO Object Service Broker Managing Data about using MAP tables.
TIBCO Object Service Broker Shareable Tools about the tools.
TIBCO Object Service Broker Parameters about parameters.
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved