Issue address ISPEXEC "CONTROL ERRORS RETURN" before the ISREDIT "MACRO". That way the error won't stop the exec. You can test the rc from the MACRO command to see if you're in an environment that supports ISREDIT commands.
-----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Charles Mills Sent: Thursday, September 4, 2025 12:01 PM To: [email protected] Subject: How avoid ISREDIT MACRO error in nested EDIT macro? I have relatively little ISPF development experience. I have written a largely-successful EDIT macro. It opens a BROWSE window, so it is not impossible for a user to invoke the macro from within the BROWSE session.(It's illogical to do so -- it's not a "supported usage" -- but you know how users are!) The EDIT macro contains Address ISREDIT "MACRO" . If the macro is invoked from within the macro-initiated BROWSE I get an error on the above statement, which is kind of ugly. MACRO command is invalid The MACRO command must be specified only once in a macro. Error message ID . : ISRE749 Last return code . : 12 How do I avoid that? IOW, how from within the EDIT macro can I determine that ISREDIT "MACRO" would be superfluous or illegal? Or how do does the EDIT macro determine that it has been reentered? I can't do any EDIT MACRO commands because the MACRO environment *may* not have been started. Kind of a chicken and egg situation. Charles ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
