You can use channels and containers when you use connect to CICS using the IPIC protocol. You must construct a channel and add containers to the 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); eciReq.flow();
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(); } }If you are using this channel in an extended request, you must use the same channel object in subsequent flows.