Benefits of channels

Using the channel and container model in CICS programs to exchange data has several advantages over using communication areas (COMMAREAs) .

  • There is no limit to the number of containers that can be added to a channel, and the size of individual containers is limited only by the amount of storage that you have available.

    Take care not to create so many large containers that you limit the amount of storage available to other applications.

  • A channel can comprise multiple containers, passing data in a structured way.
  • Channels do not require the programs that use them to know the exact size of the data returned.
  • A channel is a standard mechanism for exchanging data between CICS programs. A channel can be passed on LINK , START , XCTL , RUN TRANSID and RETURN commands. Distributed program link (DPL) is supported, and the transactions started by START CHANNEL and RETURN TRANSID commands might be remote.
  • The transaction channel, DFHTRANSACTION, remains in scope even when the link level changes, so it can be used to exchange data between any programs in a transaction.
  • Channels can be used by CICS application programs written in any of the language supported by CICS. For example, a Java client program on one CICS region can use a channel to exchange data with a COBOL server program on a back-end AOR.
  • A server program can be written to handle multiple channels. It can, for example:
    • Discover, dynamically, the channel that it was invoked with.
    • Count and browse the containers in the channel.
    • Vary its processing according to the channel it has been passed.
  • You can build "components" from sets of related programs invoked through one or more channels.
  • The loose coupling between clients and components permits easy evolution. Clients and components can be upgraded at different times. For example, first a component could be upgraded to handle a new channel, then the client program upgraded (or a new client written) to use the new channel.
  • The programmer is relieved of storage management concerns. CICS automatically destroys containers (and their storage) when they go out of scope. Programs may also issue commands to delete individual containers, or a complete channel and all the containers on it, before they go out of scope.
  • The data conversion model used by channel applications is simple and is controlled by the application developer, using simple API commands.
  • Programmers with experience of CICS® business transaction services (BTS) can find it easy to use containers in non-BTS applications.
  • Programs that use containers can be called from both channel and BTS applications.
  • Non-BTS applications that use containers can be migrated into full BTS applications. (They form a migration route to BTS.)
Channels might not be the best solution in all cases. When designing an application, there are one or two implications of using channels that you must consider:
  • When a channel is to be passed to a remote program or transaction, passing a large amount of data might affect performance, particularly if the local and remote regions are connected by an ISC, rather than MRO, connection.
  • A channel might use more storage than a COMMAREA designed to pass the same data because container data can be held in more than one place. COMMAREAs are accessed by pointers, whereas the data in containers is copied between programs.


dfhp3_ch_benefits.html | Timestamp icon Last updated: Monday, 5 June 2017