MacroSpy: View editor during a macro

MacroSpy lets you view the contents of edit data during the execution of an edit macro.  When called from an edit macro, MacroSpy displays a simulated edit session.  You can see where the cursor is, scroll around in the data, and see labels, excludes, and all special edit lines.
You can not change data when you are seeing the MacroSpy simulated edit panel, but there is a very basic FIND/RFIND capability.

This function is superceded by ISPF's built-in ISREMSPY command.

MacroSpy as a TSO XMIT format load module.

To get the program using Netscape or Internet Explorer, select the link above with the right mouse button and select 'Save Link As...' or Save Target as...'.

See the installation instructions below for more information.

Function

To view the current state of the ISPF editor, even from within a macro.

Calling Syntax from an ISPF edit macro:

REXX: Address TSO "MACROSPY"

CLIST: MACROSPY

Program (syntax varies): Call ispexec('SELECT ',11,'CMD(MACROSPY)');

Calling syntax from ISPF Dialog test:

Set a breakpoint at the ISREDIT service and when the breakpoint is hit, type

TSO MACROSPY

Output

An ISPF Panel which simulates an edit session..

Installation

  1. Copy macrospy.xmi to your PC in BINARY format
  2. Upload the file in BINARY to a FIXED 80 SEQUENTIAL file named MACROSPY.XMI
  3. On TSO, type RECEIVE INDA(MACROSPY.XMI) and at the prompt respond DA(MACROSPY.LOAD)
  4. Copy MACROSPY.LOAD to any accessible load module data set (STEPLIB, LINKLIB, ISPLLIB, LPA, etc)

Sample Screen

This example shows various error and indicator lines. The line with the cursor is pointed to by an arrow in the line number area and the actual location of the cursor is indicated as a white underlined character.

 Command: F APO FIRST                          MACROSPY           Line 1 of 49
 -------------------------------------------------------------------------------
 EDIT       SYS99162.T150651.RA000.NADEL.R0124191           Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 000002
 000003 FUNCTION -
 000004   THE HELP COMMAND PROVIDES FUNCTION, SYNTAX, AND OPERAND INFORMATION
 ==CHG>   ON COMMANDS.
 000006
 000007 SYNTAX -
 000008          HELP   'COMMAND NAME'  FUNCTION  SYNTAX
 000009                OPERANDS('KEYWORD LIST') POSITIONAL(NN) ALL
 000010                MSGID('KEYWORD LIST')
 ==ERR>
 000012   REQUIRED - NONE
 000013   DEFAULTS - ALL IF FUNCTION, SYNTAX, AND OPERANDS NOT SPECIFIED.
 000014   ALIAS    - H
 - - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
 000018   NOTE     - 'KEYWORD LIST' IS OPTIONAL WHEN OPERANDS IS USED.
 000019
 .LBL   SYNTAX INTERPRETATION -
 ----->   1. USER SUPPLIED VALUES ARE IN APOSTROPHES. TWO SETS OF APOSTROPHES
 000022      MEANS THE VALUE SHOULD BE SUPPLIED WITHIN A SET OF APOSTROPHES.
 000023   2. WORDS WITHOUT APOSTROPHES ARE TO BE ENTERED AS SHOWN.
 000024   3. COMMAS, PERIODS, PARENTHESES, AND ASTERISKS ARE TO BE ENTERED AS
 000025      SHOWN.
 000026   4. EXCLUSIVE CHOICES ARE INDICATED BY SLASH (/).

This screen was created with the following macro:

/* REXX - example to show MACROSPY in use */
Address isredit
macro
"RESET"
'XSTATUS 14 = X'
'XSTATUS 15 = X'
'XSTATUS 16 = X'
'LABEL 10 = .LWL 0'
'LABEL  4 = .LWX 0'
'LABEL 19 = .LBL 0'
"C ' ' '  ' 72 ALL .LWL .LWL"
"C ' ' ' '  ALL .LWX .LWX"
"F APO FIRST"
Address tso macrospy