Use a control boundary as a base

You can identify the base call stack entry as the one at the nearest control boundary by using the special value *CTLBDY.

A control boundary exists between two call stack entries if the two entries are running in two different activation groups. The one identified by using this special value is running in the same activation group as the entry that is sending the message.

See the second figure for an example of sending a message using the special value *CTLBDY. The three programs in this example (CLPGM91, CLPGM92, and CLPGM93) are all ILE programs. CLPGM91 runs in activation group AG91 while both CLPGM92 and CLPGM93 run in activation group AG92. In this example, PROC93A sends a message back to the entry that immediately precedes the boundary for AG92.

Figure 1. Example of *PGMNAME

Figure 2. Example of using *CTLBDY

Related concepts
Use the most recently called procedure as a base