Linking to a program on a CICS server
Use the Interaction interface to link to a server program. The ECI resource adapter provides an implementation of the Interaction interface but you do not use this directly.
- Set the FunctionName property to the name of the CICS® server program.
- Set the InteractionVerb to SYNC_SEND for an asynchronous
call or SYNC_SEND_RECEIVE for a synchronous call. Use SYNC_RECEIVE
to retrieve a reply from a asynchronous call. Note:
- When a SYNC_SEND call has been issued with the execute() method of a particular ECIInteraction object, that instance of ECIInteraction cannot issue another SYNC_SEND, or SYNC_SEND_RECEIVE, until a SYNC_RECEIVE has been run.
- Simultaneous asynchronous calls to the same connection are permitted, provided they do not result in two asynchronous calls being outstanding in the same transaction scope. In that case an exception is thrown.
- If you are using the adapter in local mode with IBM® WebSphere® Application Server for IBM z/OS®, and you require transactional support, specify the SYNC_SEND_RECEIVE interaction type. If you use SYNC_SEND and SYNC_RECEIVE to issue asynchronous requests, the ECI requests are issued with SYNCONRETURN, and are outside the scope of the current global transaction. In remote mode, asynchronous calls work in the usual way.
- If you are using channels and containers, the
program receiving the data does not need the exact size of the data
returned. If you are using COMMAREAs, set the CommareaLength property
to the length of the COMMAREA being passed to CICS.
If it is not supplied, a default is used:
- SYNC_SEND, SYNC_SEND_RECEIVE
- Length of input record data
- SYNC_RECEIVE
- The value of ReplyLength
- Set the ReplyLength property to the length
of the data stream to be returned from the Gateway daemon to
the JCA application. This value can reduce the data transmitted over
the network if the data returned by CICS
is less than the full COMMAREA size, and you know the size of the
data in advance.
The JCA application still receives a full COMMAREA of the size specified in CommareaLength, but the amount of data sent over the network is reduced. This method is equivalent to the setCommareaInboundLength() method available for the ECIRequest class.
If you do not set ReplyLength, CICS Transaction Gateway automatically strips trailing zeros from the COMMAREA sent from the Gateway daemon to the JCA application, without needing the size of the data in advance.
For more information on COMMAREA stripping, see ECI performance considerations when using COMMAREAs.
As with ECIConnectionSpec, you can set properties on the ECIInteractionSpec class at either construction time or by using setters. Unlike ECIConnectionSpec, the ECIInteractionSpec class behaves like a Java™ bean. So, in a managed environment, your server might provide tools to allow you to define these properties using a GUI without writing any code.
- 0
- No timeout default value.
- A positive integer
- Time in milliseconds.