Channel and container examples

Containers are named blocks of data designed for passing information between programs. Containers are grouped in sets called channels. This information explains how you can use channels and containers in your Java™ application and provides some code examples.

For introductory information about channels and containers, and guidance about using channels in non-Java applications, see Enhanced inter-program data transfer using channels in the CICS TS 5.1 Information Center. For information about tools that allow Java programs to access existing CICS® application data, see Interacting with structured data from Java.

Table 1 lists the classes and methods that implement JCICS support for channels and containers.

Table 1. JCICS support for channels and containers
Methods JCICS class EXEC CICS Commands
containerIterator() Channel STARTBROWSE CONTAINER
createContainer() Channel  
deleteContainer() Channel DELETE CONTAINER CHANNEL
getContainer() Channel  
getName() Channel  
delete() Container DELETE CONTAINER CHANNEL
get(), getLength() Container GET CONTAINER CHANNEL [NODATA]
getName() Container  
put() Container PUT CONTAINER CHANNEL
getOwner() ContainerIterator  
hasNext() ContainerIterator  
next() ContainerIterator GETNEXT CONTAINER BROWSETOKEN
remove() ContainerIterator  
link() Program LINK
xctl() Program XCTL
setNextChannel() TerminalPrincipalFacility RETURN CHANNEL
issue() StartRequest START CHANNEL
createChannel() Task  
getCurrentChannel() Task ASSIGN CHANNEL
containerIterator() Task STARTBROWSE CONTAINER

The CICS condition CHANNELERR results in a ChannelErrorException exception. The CONTAINERERR CICS condition results in a ContainerErrorException exception. The CCSIDERR CICS condition results in a CCSIDErrorException exception.