It is now time for a tip about EDIT macros. In this week I will tell you about how to process line commands in your personal EDIT macro. As usual I will start with an example that show you all the nice details:
There may be spelling errors because the EDIT macro is a rewrite of a lot more complicated version. This EDIT macro is also missing the procedure ISPF_MESSAGE.
Option NOPROCESS is mandatory on the MACRO command in order to make your EDIT macro understand and accept line commands. Next you have to include command PROCESS to indicate which line commands you want to accept and how. I have chosen a block command (RANGE) called S. You can use existing line command and you can have more of them separated by blanks.
The return code from the PROCESS command determines what to do next. Return code 0 is OK and now you have access to the two system defined labels .ZFRANGE and .ZLRANGE when you use option RANGE on the PROCESS command. .ZFRANGE indicates the first line in the block and .ZLRANGE the last line. The meaning of the other return codes are indicated in the example. The EDIT macro function RANGE_CMD returns the line command in use. You have to use it with return code 0 from the PROCESS command if you have chosen to use more than one line command.