Example of handling of transient screen

Suppose that the macro runtime is doing screen recognition and that it has the names of three macro screens on the list of valid next screens: ScreenB and ScreenD, which are the names of candidate screens, and ScreenR, which is the name of a transient screen. The macro runtime performs the following steps:
  1. When the host terminal's presentation space is updated, the macro runtime evaluates the names on the list of valid next screens in the usual way.
  2. Suppose that an unexpected application screen has occurred, so that neither ScreenB nor ScreenD matches the current application screen, but that ScreenR does match the current application screen.
  3. Because a transient screen has been recognized, the macro runtime does not remove any names from the list of valid next screens.
  4. The macro runtime makes ScreenR the current macro screen to be processed.
  5. The macro runtime performs the actions in ScreenR. These actions clear the unexpected application screen.
  6. The macro runtime ignores the <nextscreens> element, if any, in ScreenR.
  7. The macro runtime returns to the previous task of screen recognition in step 1 above. The list of valid next screens has not changed. This time, suppose that an expected application screen is displayed and that the macro runtime finds that ScreenD matches it. Therefore:
    1. The macro runtime makes ScreenD the next macro screen to be processed.
    2. The macro runtime removes the names ScreenB and ScreenD from the list of valid next screens. The name ScreenR remains on the list.
    3. The macro runtime begins processing the actions in ScreenD.