Typically, programs that exchange a channel are written to handle that channel. That is, both client and server programs know the name of the channel, and the names and number of the containers in the channel. However, if, for example, a server program or component is written to handle more than one channel, on invocation it must discover which of the possible channels it's been passed.
A program can discover its current channel—that is, the channel with which it was invoked—by issuing an EXEC CICS® ASSIGN CHANNEL command. (If there is no current channel, the command returns blanks.)
The program can also (should it need to) get the names of the containers in its current channel by browsing. Typically, this is not necessary. A program written to handle several channels is often coded to be aware of the names and number of the containers in each possible channel.
To get the names of the containers in the current channel, use the browse commands:
Having retrieved the name of its current channel and, if necessary, the names of the containers in the channel, a server program can adjust its processing to suit the kind of data that it's been passed.