Recording a simple macro

This section shows you how to record a very simple macro. This macro changes the application screen from the ISPF Primary Option Menu to the Data Set List Utility screen (passing through the Utility Selection Panel screen on the way).

Before recording this macro, assure that:
  • The ISPF Primary Option Menu is displayed on the session window. See The ISPF Primary Option Menu.
  • The Macro Manager toolbar is displayed above the session window. Macro Manager toolbar shows the Macro Manager toolbar (this is the same illustration that is displayed in Macro Manager toolbar).
    Figure 1. Macro Manager toolbar


    If the Macro Manager toolbar is not displayed on your system, click View > Macro Manager.

For more information on the Macro Manager toolbar, see Macro Manager toolbar.
To record the macro follow these steps:
  1. Is TSO displaying the ISPF Primary Options screen? If not, then go to the ISPF Primary Options screen. See The ISPF Primary Option Menu.
  2. Click the Record macro icon to start recording. (This icon displays a single dot over an image of a cassette.)
  3. The Record Macro window appears. Follow these steps:
    1. Select a macro location, such as Personal Library
    2. Click New.
    3. Type a name in the Name field, such as ispf_ex1 (macro names are case-sensitive).
    4. Type a description in the Description field, such as Simple macro.
    5. Click OK.
    6. The Record Macro window disappears.
  4. The ISPF Primary Option Panel is still displayed. See The ISPF Primary Option Menu.
    Figure 2. The ISPF Primary Option Menu


    In the figure above, Z and I Emulator for Web is displaying the application screen and waiting for user input in the same way that it always does. But at the same time, the Macro object is waiting to record the user input when it occurs. There are two visual cues in the figure above that show that a macro is being recorded:
    • In the status line at the bottom of the session panel is displayed the message Recording macro.
    • On the Macro Manager toolbar the five icons on the right are enabled (Stop Macro, Pause Macro, and the three Add-A icons), while the five icons on the left are temporarily disabled. See The ISPF Primary Option Menu.
  5. Click on the Option line near the top of the application screen. The Option line is the fourth line of the ISPF Primary Options Menu and begins at the left side of the screen with the label Option ===>. You should see the text cursor appear at the location that you clicked. Is the cursor displayed on the Option line? If not, then click again.
  6. Type 3 and the enter key. As the figure above shows, 3 is the selection for Utilities.
  7. The application screen changes to the Utility Selection Panel. See The Utility Selection Panel application screen.
    Figure 3. The Utility Selection Panel application screen


    In the figure above, ISPF has automatically placed the text cursor on the Option line of this menu. On your screen, is the text cursor on the Option line? If not then click on the Option line to move the text cursor there.
  8. Type 4 followed by the enter key. As the figure above shows, 4 is the selection for Dslist.
  9. The application screen changes to the Data Set List Utility. See The Utility Selection Panel application screen.
    Figure 4. The Utility Selection Panel application screen


  10. Click the Stop playing or recording macro icon to stop recording. This icon is the one that displays a black square with the image of a cassette below it. The five icons on the right side of the Macro Manager toolbar become disabled, and the five icons on the left side become enabled.
  11. Recording is complete. The Data Set List Utility screen is displayed, as in The Utility Selection Panel application screen.
Some observations:
  • You clicked the Record macro icon to start recording.
  • You entered input (a mouse click and some keystrokes) just as you normally would when using the application, and the host application, ISPF, displayed the application screens and responded to the user input as it normally does.
  • The Macro object recorded the application screens (or rather, a few identifying characteristics of each application screen) and recorded the mouse clicks and keystrokes as you entered them.
  • You clicked the Stop recording or playing macro icon to stop recording the macro.

You can record interactions with more than one session into the same macro. This is an advanced feature (see Interacting with more than one session).