Browsing the current channel
A JCICS program that is passed a channel can access all of the Container objects without receiving the channel explicitly.
To do this, it uses a ContainerIterator object. (The
ContainerIterator class implements the
java.util.Iterator interface.) When a Task
object is instantiated from the current task, its containerIterator()
method returns an Iterator for the current channel, or null if there
is no current channel. For example:
Task t = Task.getTask();
ContainerIterator ci = t.containerIterator();
while (ci.hasNext()) {
Container custData = ci.next();
// Process the container...
}