Information Center

Macro Manager exercise

This exercise takes you through the recording features of the Macro Manager. Because host applications are so different, the steps will not apply to all host applications. It's up to you to customize the macro for your specific application.

In this exercise, IBM's OfficeVision/VM application is used. If your host uses OfficeVision, great! If not, comments in italics guide you in customizing a macro for your own application. A menu application will work best for this exercise (ISPF is a good one if you're using it with TSO). Before you start, be sure that a session is started and that you are logged on to your host system.

Don't forget to click the Help button if you need to!

  1. Click Macro Manager on the toolbar.
  2. Click Record.
  3. Click New.
  4. Enter the following information:
  5. Click OK. You are now in record mode. All keystrokes will be recorded in the macro.
  6. At your host's system prompt, type profs and press Enter. Substitute your application's command here. For example, if you use ISPF, from a TSO prompt type ispf instead of profs.
  7. Insert a Smart Wait. Click the Smart Wait button and do the following:
    If the host application screen has a variable number of fields, you may not get a match for the smart wait because the number of fields recorded can be different from what is actually on the screen. If so, re-record the macro and don't use field counts.
  8. Add a prompt for the menu item. Click Prompt and do the following:
  9. Click OK. A prompt window appears. This allows you to enter whatever text the application needs in order to continue normally. Usually, you can leave the default value in the prompt window and click OK. The prompt places the text on the screen only; it doesn't press Enter because you might want to do something else, like press a PF key.
  10. Press Enter. The filelist command is entered. Press the key that will send the command to the host.
  11. Press PF11. This should bring you into XEDIT mode for the first file in the list.
  12. Click Stop. You're done! Do any steps you want recorded in the macro and then click Stop.

Test the macro by going back to the screen from which you started, and click Play.

The Macro function performs automatic screen-recognition for you by watching the field counts on each screen. You don't have to add a smart wait for every screen unless you are sure that the field counts are not a positive enough way of recognizing a screen. IBM's Callup application is a good example of when you do need a smart wait, because the cursor position depends on how long a name you're searching for.

Related topics

  • MacroManager Overview