You can use channels and containers when you connect to CICS® using the IPIC protocol. You must construct a channel before it can be used in an ECIRequest.
Channel myChannel = new Channel("CHANNELNAME");
byte[] custNumber = new byte[]{0,1,2,3,4,5};
myChannel.createContainer("CUSTNO", custNumber);
And a
sample CHAR container:String company = "IBM";
myChannel.createContainer("COMPANY", company);
ECIRequest eciReq = new ECIRequest("CICSA", "USERNAME", "PASSWORD",
"CHANPROG", channel, ECIRequest.ECI_NO_EXTEND, 0);
jgateway.flow(eciReq);
Channel myChannel = eciReq.getChannel();
for(Container container: myChannel.getContainers()){
System.out.println(container.getName());
if (container.getType() == ContainerType.BIT){
byte[] data = container.getBITData();
}
if (container.getType() == ContainerType.CHAR){
String data = container.getCHARData();
}
}