Referring to different sessions in the same macro screen

When you want to use the second technique described earlier for building macro screens (see Two techniques for building macro screens), the technique of referring to more than one session in the descriptors or in the actions of the same macro screen, you must use the Macro Editor or the Code Editor to manually add the references to additional session or sessions.

For example, if you have recorded a macro screen that interacts with a 3270 Display session, and you want to add to that macro screen references to a 5250 Display session, then you must open the macro script with the Macro Editor or the Code Editor and then manually add the appropriate descriptors or actions to the 5250 Display session.

With the following three descriptors, there is a limitation in how many descriptors the Macro Editor can display in the editing window: You might recall that these three descriptors are represented in the Macro Editor by a single descriptor, the Field Counts and OIA descriptor, and that in an ordinary macro only one Field Counts and OIA descriptor is allowed per macro screen (see Field Counts and OIA descriptor). Because of this state of affairs in ordinary macros, the Macro Editor is incapable of displaying multiple Field Counts and OIA descriptors, even if each one refers to a different session. Therefore, if your macro screen contains more than one Field Counts and OIA descriptor, the Macro Editor displays only the first one. However, you can see all the descriptors by viewing the macro screen with the Code Editor.

If you are using the Macro Editor, then use can use the Current button in descriptors to gather data from sessions other than the session from which the Macro Editor was launched (see Using automatic editing features with other sessions).