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


Debugging edit macros with ISREMSPY

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

When you run an edit macro, the editor screen is not displayed until the macro completes. To view the status of the data being edited during execution of the edit macro, invoke the program ISREMSPY from within the running macro.

ISREMSPY displays a simulated editor panel in which the data is presented as it exists at the time ISREMSPY is started. You can also see the cursor location and the last edit macro command executed. In most cases, the line that has the cursor on it is indicated by an arrow in the line command field.

Within an ISREMSPY display you can issue the commands RESET and FIND. RESET restores the display to the current editor state, including scroll and cursor location. FIND locates a string within the data being display.

FIND does not support all the operands of the FIND command of the real editor; it only supports the search string as an operand. The string may be in quotes, and embedded quotes should not be doubled. Pressing the RFIND key will repeat the last search. Only the first 256 bytes of each line are searched by the FIND command.

Because ISREMSPY is a simulated edit session, it may not display precisely as the editor would. For example, the numbers in the line command field are always incremented by one, and may not accurately reflect the numbers displayed in the real edit session. Similarly, there are some cases such as TENTER and INSERT, where the cursor location may not be correct.

ISREMSPY can be invoked in several ways:
  • You can invoke it as a TSO command directly from within an edit macro.

    CLIST example:

    ISREMSPY
    REXX example:
    Address TSO 'ISREMSPY'
  • You can define a breakpoint for ISREDIT in dialog test (option 7.8) and then run the macro under dialog test (option 7.1). When the breakpoint is triggered, you can type TSO ISREMSPY to view the current state of the edit data. This technique can be used to look at edit data during execution of a macro without having to modify the edit macro source and is particularly useful for debugging program macros (macros not written in CLIST or REXX).
  • You can define ISREMSPY as a program macro using the editor DEFINE command and then use ISREMSPY as an editor command.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014