In either case, address ISPEXEC at the beginning wouldn't hurt. I noticed the missing macro after I posted it.
This is Q&D code for a single member; if I had to do it for production I'd make it more general. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Paul Gilmartin [0000000433f07816-dmarc-requ...@listserv.ua.edu] Sent: Tuesday, January 12, 2021 11:51 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Request for help with removing sequence numbers from PDS members On Tue, 12 Jan 2021 16:20:17 +0000, Seymour J Metz wrote: >ISREDIT is only valid for an edit macro. You need on script to invoke EDIT and >a second script running as an IMACRO for the edit. If they are in SYSPROC then >you need to start the first comment with REXX. > Is the initial command environment ISPEXEC? My experience has been it's TSO. > /* Outer script */ > parse upper arg dataset > "CONTROL ERRORS RETURN" > 'EDIT DATASET('dataset') MACRO(STRIPED')' > /* Tailor above to suit your needs */ > > /* Inner script */ > 'CONTROL ERRORS RETURN' > ADDRESS ISREDIT > 'UNNUMBER' > The first command must be MACRO. > 'SAVE' > 'END' These might be combined in a single EXEC (untested): /* Rexx */ address ISPEXEC /* at least for documentation. */ "CONTROL ERRORS RETURN" call INITIAL parse upper arg dataset /* Logic to enumerate members? */ 'EDIT DATASET('dataset') MACRO(STRIPED')' /* Unbalanced "'"? ) /* Tailor above to suit your needs */ EXIT /* Initial Macro script */ INITIAL: ADDRESS ISREDIT 'MACRO' IF RC<>0 RETURN /* Is NUMBER needed before UNNUMBER if not all members are numbered? */ 'UNNUMBER' 'SAVE' 'END' EXIT -- gil ---------------------------------------------------------------------- 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