ISPF edit macro
A REXX or CLIST program that runs inside the ISPF editor and changes the member being edited.
Also written edit macro, ISREDIT, ADDRESS ISREDIT, IMACRO, initial macro
An edit macro is a small program that runs inside the ISPF editor, usually written in REXX. You type its name on the editor's command line, and it works on the member you are editing: finding text, changing lines, inserting new ones, checking the content.
The macro begins with ISREDIT MACRO, and sends commands to the editor with ADDRESS ISREDIT. Most editor commands are available, such as "FIND", "CHANGE" and "SAVE", together with commands for reading and changing individual lines and moving the cursor. The macro can combine them with REXX logic, so it can make decisions about each line.
Typical uses are making the same set of changes to many members, adding a standard header to new programs, or checking JCL against site rules. A macro can also run automatically whenever a member is opened, called an initial macro, set in the edit profile.
Macros live in a library allocated to SYSPROC or SYSEXEC, like other execs. A good first macro is one that does a task you repeat every day, such as a set of FIND and CHANGE commands.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- REXXA readable scripting language used across the mainframe for automation, tooling and quick one-off tasks.
- ISPF editorThe full-screen text editor used to write and change JCL, COBOL, REXX and anything else held in a dataset.
- FIND and CHANGEThe ISPF editor commands for finding text and replacing it, typed on the command line.
- REXX execA REXX program, stored as a member in a library and run by name from TSO or ISPF.
- ISPF dialog servicesThe ISPF functions a program or exec can call to show panels, keep tables and use other ISPF features, through ISPEXEC.