MainframeSupports
tip week 10/2007:

For over three years ago I wrote a tip about how you can create your own hypertext EDIT macro. In that tip I indicated that these kind of EDIT macros are pretty common for browsing, viewing or editing a dataset, but there is nothing wrong in using the same idea for other purposes:

/* REXX: XCMD */
ADDRESS ISREDIT
"MACRO"
"(LRECL) = LRECL"
"(LINENO, POSNO) = CURSOR"
IF POSNO > 0 & POSNO <= LRECL
THEN DO
  "(MYLINE) = LINE "LINENO
  ADDRESS ISPEXEC
  "SELECT CMD("STRIP(MYLINE)") SUSPEND"
END
ELSE
  SAY 'CURSOR NOT IN DATA'
EXIT

This EDIT macro will execute the contens of the line in which the cursor is placed as a TSO command. A very simple trick. In practise this EDIT macro can replace menu item 6 in ISPF. And it is much easier to use, just point at the line containing the command and there is no limit in the number of commands that will be remembered. And you do not have to locate menu item 6 in order to execute a long TSO command. Editing of an existing command is easily accomplished. And best of all: you can invent your own features.

Remember that you can use a function key to execute the EDIT macro with. How to do this is described in the hypertext tip. My own version of the hypertext macro is able to EDIT, VIEW and execute TSO commands. Thus I am able to use the same function key for both purposes.

Previous tip in english        Sidste danske tip        Tip list