z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Initial macros

z/OS ISPF Edit and Edit Macros
SC19-3621-00

The editor runs an initial macro after the data is first read but before the data is displayed. An initial macro can be used to do tasks such as initializing empty data sets, defining program macros, and initializing function keys.

For example, if you want caps mode on even if the data contains lowercase data, create an initial macro with a CAPS ON command. The editor first reads the edit profile and the data, then it sets caps mode to correspond to the data. Next, it runs your initial macro, which overrides the edit profile setting of caps mode.

To store an initial macro name in the edit profile, use the IMACRO command:
IMACRO initmac
See IMACRO—Specify an Initial Macro for more information on the IMACRO command.

To execute an initial macro for the current session, use one of these methods:

  • Type the macro name in the INITIAL MACRO field on the Edit Entry panel:
    INITIAL MACRO ===> initmac
  • Specify the initial macro name on the EDIT service call:
    ISPEXEC EDIT DATASET(dsname) MACRO(initmac) ...

Once the initial macro is stored in a profile, it runs at the start of each edit session that uses the profile. It can be overridden by an initial macro typed in the INITIAL MACRO field on the Edit Entry panel or specified on the EDIT service call. You can type NONE in the INITIAL MACRO field to suppress the initial macro defined in the profile.

Note:
  1. If the current profile is locked, the IMACRO command cannot be run.
  2. Remember that commands referencing display values (DISPLAY_COLS, DISPLAY_LINES, DOWN, LEFT, RIGHT, UP, LOCATE) are invalid in an initial macro because no data has been displayed.
  3. If the initial macro issues either an END or CANCEL command, the member is not displayed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014