Record objects represent data exchanged between your application
and CICS®, and these record
objects are the basis of J2C record or data beans.
Record objects are used to represent data passing to and from the
EIS. For ECI, this is a representation of a COMMAREA. After a connection
has been obtained to the CICS server, an Interaction can be created from the Connection in order
to make a particular request. As with the Connection, Interactions
can have custom properties set by the CICS-specific InteractionSpec
class (ECIInteractionSpec). To perform the Interaction, the application
calls the execute() method and uses CICS-specific Record objects to
hold the data. For example:
Obtain a ConnectionFactory
Connection c = cf.getConnection(ConnectionSpec)
Interaction i = c.createInteraction()
InteractionSpec is = newInteractionSpec();
i.execute(is,input,output)
Record objects store the input/output data that is used during
an interaction with an EIS, for example a byte array representing
an ECI COMMAREA. The following example shows a complete interaction
with an EIS. In this example input and output Record objects and Spec
objects are used to define the specific attributes of both the interaction
and the connection. The example uses setters to define any component-specific
properties on the Spec objects before they are used.
ConnectionFactory cf = [Lookup from JNDI namespace]
ECIConnectionSpec cs = new ECIConnectionSpec();
cs.setXXX(); //Set any connection specific properties
Connection conn = cf.getConnection( cs );
Interaction int = conn.createInteraction();
ECIInteractionSpec is = new ECIInteractionSpec();
is.setXXX(); //Set any interaction specific properties
RecordImpl in = new RecordImpl();
RecordImpl out = new RecordImpl();
int.execute( is, in, out );
int.close();
conn.close();
The ECI resource adapter allows a Java™ EE developer to access CICS programs, using COMMAREAs to pass information to and from
the server. This table shows the JCA objects corresponding to the
ECI terms The CCI interfaces for CICS are in the com.ibm.connector2.cics package.
| ECI term |
J2C object: property |
| Abend code |
CICSTxnAbendException |
| COMMAREA |
Record |
| ECI timeout |
ECIInteractionSpec:ExecuteTimeout |
| LUW identifier |
Java EE
transaction |
| Password |
ECIConnectionSpec:Password |
| Program name |
ECIInteractionSpec:FunctionName |
| Server name |
ECIConnectionFactory:ServerName |
| TPNName |
ECIInteractionSpec:TPNName |
| TranName |
ECIInteractionSpec:TranName |
| User ID |
|