0

In some of my macroes I would like to be able to tell whether the macro is invoked manually by the user typing its name on the command line or if it has been invoked by a command EDIT DATASET(..) MACRO(macro-name).

Per Beliing
  • 73
  • 1
  • 7
  • There is an ISPF shared pool variable ZEDITCMD, which holds the command that was used to invoke edit. Maybe this has enough information to tell you what you need to know? Can't test myself at the moment. – phunsoft Apr 21 '23 at 15:55
  • zeditcmd is a great thought but doesn't provide what the OP is asking for. i tried it and whether the edit macro is invoked from the edit command line or via the initial macro - the results are the same. i looked around and couldn't find anything but that doesn't mean there isn't something. – Lionel B Dyck Jul 17 '23 at 13:47
  • I've looked at this again and there may be a way using the ZEDITCMD that isn't perfect but it may be adequate. I found that entering the edit macro command on the Edit command line the zeditcmd has the macro name in lowercase while when invoked using MACRO(macro-name) it is uppercase. – Lionel B Dyck Jul 18 '23 at 14:17

0 Answers0