Charles ,

I was incorrect here:

READY

CONSPROF SOLDISP(NO) SOLNUM(400)
CONSOLE ACTIVATE
CONSOLE SYSCMD($S PRT1) CART('PRT10001')
CONSOLE SYSCMD($S PRT2) CART('PRT20002')
EXEC MY.EXEC(CHKPRT) 'PRT10001' EXEC
EXEC MY.EXEC(CHKPRT) 'PRT20002' EXEC

The exec you invoke (CHKPRT) checks whether the printers were started
successfully. The exec uses the arguments you pass on the invocation (CART
values) as the CART on the GETMSG function. Figure 1
<https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.ikja300/ikja300179.htm?view=kc#ikja300-gen179__chkprt>
shows
the example exec.
Figure 1. Example exec (CHKPRT) to check start of printers

/* REXX exec to check start of printers */
ARG CARTVAL
GETCODE = GETMSG('PRTMSG.','SOL',CARTVAL,,60)
IF GETCODE = 0 THEN
  DO
    IF POS('$HASP000',PRTMSG.1) ¬= 0 THEN
      SAY "Printer started successfully."
    ELSE
      DO INDXNUM = 1 TO PRTMSG.0
        SAY PRTMSG.INDXNUM
      END
  END
ELSE
  SAY "GETMSG error retrieving message.  Return code is" GETCODE
EXIT


On Fri, May 22, 2020 at 12:40 PM scott Ford <idfli...@gmail.com> wrote:

> Charles:
>
> I think that should be 'address mvs' ...scott
>
> On Fri, May 22, 2020 at 12:35 PM Charles Mills <charl...@mcn.org> wrote:
>
>> Message handling is fine, other than one very specific problem that is
>> inherent in the Rexx code posted.
>>
>> Note this is a Friday Folly, not a "real question." I know the answer
>> (after 2+ hours of debug struggle!).
>>
>> Charles
>>
>>
>> -----Original Message-----
>> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
>> Behalf Of Joe Monk
>> Sent: Friday, May 22, 2020 9:07 AM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Friday Follies/Why won't this work?/TSO Rant #387
>>
>> Check your message handling ...
>>
>> Joe
>>
>> On Fri, May 22, 2020 at 11:00 AM Seymour J Metz <sme...@gmu.edu> wrote:
>>
>> > <eg>
>> >      I called my congressman and he said quote
>> >      I'd like to help you son, but you're too young to vote.
>> > </eg>
>> >
>> >
>> > --
>> > Shmuel (Seymour J.) Metz
>> > http://mason.gmu.edu/~smetz3
>> >
>> > ________________________________________
>> > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
>> behalf
>> > of Charles Mills [charl...@mcn.org]
>> > Sent: Friday, May 22, 2020 10:02 AM
>> > To: IBM-MAIN@LISTSERV.UA.EDU
>> > Subject: Friday Follies/Why won't this work?/TSO Rant #387
>> >
>> > What is wrong with this Rexx? (I spent about two hours debugging before
>> I
>> > solved it.) The problem is right here on this page: the answer is NOT
>> > something in RACF or JES2. It's not something missing: it's a sin of
>> > commission, not a sin of omission. The below will never work. That is,
>> the
>> > output will always be RC = 4 , Msgs = MYMSGS.0 , Msg.1 = MYMSGS.1. Why?
>> >
>> > /* Rexx to test command/response */
>> > MyCart = "MyCart01"
>> > "CONSPROF SOLDISP(NO) SOLNUM(400)"
>> > "CONSOLE ACTIVATE"
>> > Address Console
>> > "CART" MyCart
>> > "$DQ"
>> > RC = GETMSG('MYMSGS.','SOL',MyCart,,1)
>> > Say "RC =" RC ", Msgs =" MYMSGS.0 ", Msg.1 =" MYMSGS.1
>> > "CONSOLE DEACTIVATE"
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>>
>
>
> --
>
>
>
> *IDMWORKS *
>
> Scott Ford
>
> z/OS Dev.
>
>
>
>
> “By elevating a friend or Collegue you elevate yourself, by demeaning a
> friend or collegue you demean yourself”
>
>
>
> www.idmworks.com
>
> scott.f...@idmworks.com
>
> Blog: www.idmworks.com/blog
>
>
>
>
>
> *The information contained in this email message and any attachment may be
> privileged, confidential, proprietary or otherwise protected from
> disclosure. If the reader of this message is not the intended recipient,
> you are hereby notified that any dissemination, distribution, copying or
> use of this message and any attachment is strictly prohibited. If you have
> received this message in error, please notify us immediately by replying to
> the message and permanently delete it from your computer and destroy any
> printout thereof.*
>


-- 



*IDMWORKS *

Scott Ford

z/OS Dev.




“By elevating a friend or Collegue you elevate yourself, by demeaning a
friend or collegue you demean yourself”



www.idmworks.com

scott.f...@idmworks.com

Blog: www.idmworks.com/blog





*The information contained in this email message and any attachment may be
privileged, confidential, proprietary or otherwise protected from
disclosure. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, distribution, copying or
use of this message and any attachment is strictly prohibited. If you have
received this message in error, please notify us immediately by replying to
the message and permanently delete it from your computer and destroy any
printout thereof.*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to