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!
- Click Macro Manager on the toolbar.
- Click Record.
- Click New.
- Enter the following information:
- Name - Exer1
- Description - Macro Recording Exercise (do not worry if the text
wraps, since it is stored as a continuous string)
- Click OK.
You are now in record mode. All keystrokes will be recorded in the macro.
- 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
- Insert a Smart Wait. Click the Smart Wait button and do the following:
- Check Field Count
- Check Input Field Count
- Enter OfficeVision/VM in the Keyword field (note: a Wait
is case sensitive). Substitute a keyword that is unique
to the first screen of the host application.
- Enter 5000 in the Timeout field (5 second wait)
|| 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.
- Add a prompt for the menu item. Click Prompt and do the following:
Don't edit the row and column position. The cursor is already where it needs
to be to enter OfficeVision commands. If you need to adjust the location
of where the prompt will be placed for your application, either adjust
the values in the window, or click Cancel, move your cursor to the right place
with your mouse (not with the arrow keys) and click the Prompt button again.
If you are not using OfficeVision for this exercise, your cursor should
be at the location where you enter menu commands.
- Name the prompt Enter Menu Choice.
- Enter filelist as the default value. Add a default menu command.
- 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.
- Press Enter. The filelist command is entered. Press the key that will send the
command to the host.
- Press PF11. This should bring you into XEDIT mode for the first file in the list.
- Click Stop. You're done! Do any steps you want recorded in the macro and then
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.