Creating channels and containers in JCICS
To create a channel, use the createChannel() method of the Task class.
For example:
Task t=Task.getTask();
Channel custData = t.createChannel("Customer_Data");
The string supplied to the
createChannel
method is the name by which the
Channel
object is known to CICS. (The name is padded with spaces to 16
characters, to conform to CICS naming conventions.)
To create a new container in the channel, use the
Channel
createContainer()
method. For example:
Container custRec = custData.createContainer("Customer_Record");
The string supplied to the
createContainer()
method is the name by which the
Container
object is known to CICS. The name is padded with spaces to 16
characters, if necessary, to conform to CICS naming conventions. If
a container of the same name already exists in this channel, a
ContainerErrorException
is thrown.