You are correct; you have to call an EDIT macro from within EDIT. However, you can write a macro that tests how it was invoked and behaves accordingly.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Bob Bridges <robhbrid...@gmail.com> Sent: Thursday, August 6, 2020 8:51 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Edit Macro No one else has mentioned it, so I may be all wet, but don't you have to have an ISPF environment to run an ISPF Edit macro? IKJEFT01 won't do it....I thought. --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* Never dare your little brother to paint the family car. -from "Deep Thoughts From Kids" contest, ages 4-15 years */ -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Steely.Mark Sent: Thursday, August 6, 2020 18:36 I have this edit macro EICUPDT: ********************************* Top of Data **** ISREDIT MACRO (NUM1) ISREDIT COPY EICLIST 20 20 BEFORE 1 ISREDIT COPY EICLIST &NUM1 &NUM1 BEFORE 1 EXIT: + EXIT CODE(0) ******************************** Bottom of Data ** When I am in a edit member session and I enter this command "EICUPDT 3" from the command line the Macro works as expected. All this does is copy 2 lines from EICLIST. It always copies line 20 but I supply a number for the other line to copy. I am trying to execute this in batch. I have done this in the past but I never needed to pass a parm. //TSOBTCH1 EXEC PGM=IKJEFT01 //SYSTSPRT DD SYSOUT=* ....... //SYSTSIN DD * PROFILE PREFIX(xxxxxx) ISPSTART CMD(%EDITREX1 XXX0111.DATA(DATAXX) - EICUPDT PARM(1)) /* //* Here is EDITREX1: ********************************* Top of Data ***************************** /* REXX */ TRACE IR /* ------------------------------------------------------------------ */ /* All REXX reserved words are shown in CAPS and all user */ /* defined variables are shown in 'lower case'. */ /* ------------------------------------------------------------------ */ PARSE ARG filename macro1 macro2 ADDRESS ISPEXEC "EDIT DATASET('"filename"') MACRO("macro1") "macro2 ******************************** Bottom of Data *************************** I added macro2 to accept the parm value. This is the results: >O> "EDIT DATASET('XXX0111.DATA(DATAXX)') MACRO(EICUPDT) PARM(1)" <--- This is the last line that the trace produced ISRP124 Macro parameter error -/-The parameter specified by PARM keyword of the EDIT service could not be resolved. READY I have tried several different ways. Too many to show here. Any help would be appreciated. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN