On Thu, 4 Sep 2025 15:33:47 -0500, Charles Mills <[email protected]> wrote:
>It's invoked via function key as a Primary Command. > It needs ISREDIT MACRO to work. Parse Arg will not work. >I don't think "how it was invoked" contains the answer. You're nesting REXX execs, not ISREDIT macros. This is why ISREDIT MACRO fails. PARSE SOURCE will tell you if the exec has been called from another exec or from the command interface somehow (e.g. Primary command). If = command, then ISREDIT MACRO else PARSE ARG. I believe ADDRESS ISPEXEC SELECT CMD(xxxx arg1 arg2). will nest ISREDIT MACRO and if = command then ISREDIT MACRO else PARSE ARG should handle correctly. Using shared variables will not handle this case. I believe that the macro nesting level can be returned but not positive. I don't know what happens if you place the ISREDIT MACRO in the second exec instead of the first. You can use the ISPEXEC CONTROL ERRORS RETURN but I don't think you see the error message when ISREDIT MACRO fails. It may have failed for other reasons such as ISREDIT environment does not exist. I believe the error message is available in a REXX variable. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
