Scope example, with LINK and XCTL commands

Figure 1 shows the same four interactive programs described in Current channel example, with XCTL commands, plus a third-level program, C1, that is invoked by an EXEC CICS LINK command from program B1.

The scope of the X channel is restricted to A1 and B1.

The scope of the Y channel is B2 and B3.

The scope of the Z channel is B1 and C1.

Note that, by the time control is returned to program A1 by program B3, it's possible that the X channel may have been modified by program B1—it might not contain the same set of containers as when it was created by A1.

Figure 1. The scope of a channel—example showing LINK and XCTL commands
The picture shows the scenario described in the text.

Table 1 lists the name and scope of the current channel (if any) of each of the five programs shown in Figure 1.

Table 1. The scope of a channel—example with LINK and XCTL commands
Program Current channel Scope of channel
A1 None Not applicable
B1 X A1 and B1
B2 None Not applicable
B3 Y B2 and B3
C1 Z B1 and C1