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


Chapter 7 Using the TIBCO Service Gateway for CICS : How Can Data Be Returned

How Can Data Be Returned
Returning Data From TIBCO Object Service Broker to CICS
Data can be returned by rules to the COMMAREA by using:
The $SETENVCOMMAREA tool to assign a string to the entire COMMAREA
Steps to Returning an Occurrence
To return an occurrence to the CICS program from TIBCO Object Service Broker:
1.
2.
Access TIBCO Object Service Broker using EXEC CICS LINK, EXEC CICS START, or EXEC CICS XCTL.
Refer to Passing the COMMAREA Between a TIBCO Object Service Broker CICS Client and a Session.
3.
When you return to CICS, you can retrieve the data from the COMMAREA. If you have a CICS MRO (Multi-Region Option) system, your transaction must be defined to run on the same CICS MRO region as the TIBCO Object Service Broker startup module.
Using MAP Tables to Return Data
MAP tables are a convenient way to access the COMMAREA that is passed to the session and returned by it. Use the System Interpreted Table @SESSION to obtain and manipulate the pointer to the COMMAREA. For both seamless and non-seamless clients, the value of @SESSION.COMMHANDLE is the address of the COMMAREA, and @SESSION.COMMLENGTH is its length. Refer to Non-Seamless COMMAREA and Seamless COMMAREA for the layout of the COMMAREAs.
MAP tables support FORALL, GET, and REPLACE statements. All MAP tables are parameterized by a memory address, which you use to position your MAP table access to a location within the COMMAREA.
Using $SETENVCOMMAREA to Return Data
The $SETENVCOMMAREA tool can be used to assign a string to the entire COMMAREA. The syntax is:
length=$SETENVCOMMAREA(value, segment#);
where:
 
On return, contains the number of bytes available in the COMMAREA. If a COMMAREA does not exist, the length remaining is zero.
The number of the segment where the tool is to store the data. The value is always 0 for a CICS environment.
Example Usage of $SETENVCOMMAREA
For example, the rules statement:
LEN = $SETENVCOMMAREA(STRINGOUT, 0)
sets the entire COMMAREA to contain the string STRINGOUT, and sets LEN to the number of bytes left remaining in the COMMAREA.
See Also
TIBCO Object Service Broker for z/OS Installing and Operating about setting up TIBCO Object Service Broker to use CICS MRO.
TIBCO Object Service Broker Managing Data about MAP tables.
TIBCO Object Service Broker Shareable Tools about the tools and System Interpreted Tables.

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