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 Transferring data between programs using channels. 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.
| Methods | JCICS class | EXEC CICS Commands |
|---|---|---|
| containerIterator() | Channel | STARTBROWSE CONTAINER |
| createContainer() | Channel | |
| delete() | Channel | DELETE CHANNEL |
| deleteContainer() | Channel | DELETE CONTAINER CHANNEL |
| getContainer() | Channel | |
| getContainerCount() | Channel | QUERY CHANNEL |
| getName() | Channel | |
| delete() | Container | DELETE CONTAINER CHANNEL |
| get() | Container | GET CONTAINER CHANNEL |
| getLength() | Container | GET CONTAINER CHANNEL NODATA |
| getDatatype() | Container | |
| getName() | Container | |
| put() | Container | PUT CONTAINER CHANNEL |
| getOwner() | ContainerIterator | |
| hasNext() | ContainerIterator | |
| next() | ContainerIterator | GETNEXT CONTAINER BROWSETOKEN |
| remove() | ContainerIterator | |
| link() | Program | LINK |
| 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 being thrown; the CONTAINERERR CICS condition results in a ContainerErrorException ; the CCSIDERR CICS condition results in a CCSIDErrorException.