To create a channel, use the createChannel() method of the Task class.
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.) 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.