Overview of all 3 stages of the entire process

In stage 1 the macro runtime determines the next macro screen to be processed. As stated in the previous section, stage 1 includes three steps.

In step 1(a) the macro runtime collects the names of macro screens that can occur after the current macro screen, and adds these names to the list of valid next screens. There might be just one such screen in the list or several. In the example scenario, the macro runtime would look in the <nextscreens> element of Screen1, find one name (Screen2), and add that name to the list (see Table 1).

In step 1(b), the macro runtime periodically checks each macro screen on the list to determine whether it matches the application screen.

Timing is a factor in this step. Because of an action that the macro runtime has just performed in the current macro screen (in Screen1, typing '3[enter]' as the last action of the <actions> element), the host application is in the process of changing the host terminal so that it displays the new application screen (the Utility Selection Panel) instead of the old application screen (ISPF Primary Option Menu). However, this change does not occur immediately or all at once. The change takes some hundreds of milliseconds and might require several packets of data from the host.

Therefore, during step 1(b), every time the OIA line or the host terminal's presentation space is updated, the macro runtime again checks the macro screen (or screens) named in the list of valid next screens to determine whether one of them matches the application screen in its current state.

Eventually the host terminal is updated to the extent that the macro runtime is able to match one of the macro screens on the list to the application screen.

In step 1(c), the macro runtime removes all the macro screen names from the list of valid next screens (except transient screens if any).

In stage 2, the macro runtime makes the selected macro screen, the one that matched the application screen in step 1(b), the new current macro screen.

Finally, in stage 3, the macro runtime performs the actions in the <actions> element of Screen2.

The remainder of this chapter provides detailed information about the stages and steps presented in the above overview.