I think you're out of luck. The normal method would be to retrieve variable ZERRMSG, which gives you the message id.
But ISPF only sets ZERRMSG if the ISPF service returns a return code of 8 or higher. Saving a data set isn't an error, so it doesn't set ZERRMSG. -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Weizman arbel Sent: Thursday, May 11, 2023 10:20 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: ispf , way to achieve the last ispf msgid from rexx >Have you looked at ZERRMSG, ZERRSM, and ZERRL? It takes an effect when there is an error/message And it doesn't return the last MSGID. MSGID Includes the last message code (code-id) for example: after save command Inside edit dataset the message is "Data set saved" the msgid="ISRE017 " I would like the message code "ISRE017 " On Thu, 11 May 2023 10:10:18 +0000, Seymour J Metz <sme...@gmu.edu> wrote: >Have you looked at ZERRMSG, ZERRSM, and ZERRL? > > >-- >Shmuel (Seymour J.) Metz >http://mason.gmu.edu/~smetz3 > >________________________________________ >From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of >Weizman arbel [wwar...@gmail.com] >Sent: Thursday, May 11, 2023 1:23 AM >To: IBM-MAIN@LISTSERV.UA.EDU >Subject: ispf , way to achieve the last ispf msgid from rexx > >Hello , > >from rexx >Which command / way to achieve the last ispf msgid > >example: >The result of the command msgid >' The message ID of the last message was "ISRE017 " ' > >I would like to achieve the "ISRE017" >from rexx > > >thanks, > weizman > >---------------------------------------------------------------------- >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 ---------------------------------------------------------------------- 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