Using the JCA local ECI resource adapter with channels and containers

To use channels and containers with the JCA local ECI resource adapter, the input and output records must be instances of ECIChannelRecord.

Stabilized feature:

Consider updating applications to use JCICS Link as an alternative. See also Stabilization notices and discontinued functions.

6.3 beta The JCA ECI adapter in Liberty JVM server is removed as of CICS® TS 6.3.

6.16.2The JCA ECI adapter in Liberty JVM server is stabilized.

When the ECIChannelRecord is passed to the execute() method of ECIInteraction, the method uses the ECIChannelRecord itself to create a channel and converts the entries inside the ECIChannelRecord into containers before passing them to CICS.

This example shows how to build an input and output record for use by the JCA local resource adapter using the put() and get() methods on the ECIChannelRecord.
// Create a channel record for the input data.
ECIChannelRecord in = new
ECIChannelRecord("CHANNELNAME");

// Data for the BIT container.
byte[] bitData = "Container with BIT data".getBytes();

// Data for the CHAR container.
String charData = "Container with CHAR data";

// Set the data in the input record.
in.put("BITCONTAINER", bitData);
in.put("CHARCONTAINER", charData);

// Create a channel record for the output data.
ECIChannelRecord out = new ECIChannelRecord("CHANNELNAME");

// Execute the program link.
interaction.execute(is, in, out);

// Retrieve the data from the output container.
bitData = (byte[]) out.get("BITCONTAINER");
charData = (String) out.get("CHARCONTAINER");
BIT and CHAR containers are created depending on the type of the entry:
  • A BIT container is created when the entry data is of type byte[] or an object that implements the Streamable interface. No code page conversion takes place.
  • A CHAR container is created when the entry data is of type String. String data is encoded by Unicode and is converted to the encoding of the container. Data read from this container by EXEC CICS GET CONTAINER will be converted according to Using containers for code page conversion.

When creating the ECIChannelRecord, the name must be a valid CICS channel name. Once created the getRecordName() method obtains the name of the channel. When adding containers to the ECIChannelRecord, the container names must be valid CICS container names. Once created the keySet() method retrieves the names of all the containers.