ISPF has an ISPEXEC command in support of clists; '"ISPEXEC CONTROL ERRORS RETURN"' is equivalent to 'ADDRESS ISPEXEC "CONTROL ERRORS RETURN"' with more overhead. That rc 20 means that it is not running under ISPF. Under ISPF, the initial environment is ISPEXEC.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Jeremy Nicoll [[email protected]] Sent: Monday, January 11, 2021 11:02 AM To: [email protected] Subject: Re: Request for help with removing sequence numbers from PDS members On Mon, 11 Jan 2021, at 15:37, Sean Gleann wrote: > Many thanks to all who responded. > I opted to adapt and (try to) use the REXX that Andy Styles gave, but I'm > tripping up over something that has to be one of those 'simple, basic' > things. > The "ISPEXEC CONTROL ERRORS RETURN" command gives me RC(20) as a result. > I think I've got to use an 'ADDRESS ISPEXEC' command or something like that > at the start of the REXX, but attempts at variants of this give the same > result. The code should either have "address ispexec control errors return" "address ispexec whatever ispf command is next" etc (where every ispf command is prefaced by 'address ispexec'), or "address ispexec" "control errors return" "whatever ispf command is next" etc, where one sets the addressing environment to ispexec before issuing a series of commands all intended to be executed under the ispexec environment. If you also have non-ispf commands following that you will need to set their environments appropriately. And of course it needs run in an ispf environment, so either foreground ispf or (if in bactch) with all the appropriate batch ispf datasets allocated. -- Jeremy Nicoll - my opinions are my own. ---------------------------------------------------------------------- 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
