在 JCICS 中创建通道和容器
要创建通道,应使用 Task 类的 createChannel() 方法。
例如:
Task t=Task.getTask();
Channel custData = t.createChannel("Customer_Data");提供给 createChannel 方法的字符串是 CICS®已知 Channel 对象的名称。 (名称使用空格填充到 16 个字符以符合 CICS 命名约定。)要在通道中创建新容器,请使用 Channel createContainer() 方法。 例如:
Container custRec = custData.createContainer("Customer_Record");提供给 createContainer() 方法的字符串是 CICS 能够理解的 Container 对象的名称。 必要时,将使用空格填充名称以符合 CICS 命名约定的 16 个字符。 如果该通道已有同名的容器,那么将抛出 ContainerErrorException。