THANK YOU!

   I added the CONSPROF and it works:

"CONSPROF SOLDISPLAY(NO)"
"CONSPROF UNSOLDISPLAY(NO)"
address TSO 'CONSOLE ACTIVATE'
"CONSOLE SYSCMD(RO *ALL,D GRS,C)"
mrc = getmsg('CNSL.','SOL',,,3)
Do i = 1 to CNSL.0
   Say i  CNSL.i
   If i // 20 = 0 Then Do
         Say "Press 'ENTER' to clear the screen"
         Pull resp
         clr
                       End
End
'CONSOLE  DEACTIVATE'
"CONSPROF SOLDISPLAY(YES)"

   
Q).  Should I set UNSOLIDISPLAY to "YES"?  I guess I don't know what it was.


      Thanks Again,  Dave



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Mark Zelden
Sent: Wednesday, October 02, 2013 2:05 PM
To: [email protected]
Subject: Re: TSO REXX and GRS Commnad Output

On Wed, 2 Oct 2013 18:52:27 +0000, Hansen, Dave L - Eagan, MN 
<[email protected]> wrote:

>Dear REXX people,
>
>   I am trying to get the result from a GRS command into an array.  We are 
> running z/OS V1R13 and the TSO/E REXX Reference shows some "Examples".  It 
> shows mcode = getmsg('dispmsg.','sol',,,120).  So the stem dispmsg. will have 
> the solicited messages.  I tried to get this EXEC to work.  I traced it.  The 
> GRS command works and produces four messages:
>
>   ISG343I 09.19.51 GRS STATUS
>   NO ENQ RESOURCE CONTENTION EXITS
>   NO REQUESTS PENDING FOR ISGLOCK STRUCTURE
>   NO LATCH CONTENTION EXISTS
>
>   My Return code is 4.  Perhaps the return code tells me how many messages I 
> got back.  My EXEC dies on the Do i = 1 to CNSL.0 with Bad arithmetic 
> conversion.  CNSL.0 shows up as "CNSL.0" in the trace.
>
>address TSO 'CONSOLE ACTIVATE'
>address CONSOLE 'D GRS,C'
>mrc = 0
>msgindex = 0
>/* RETRIEVE OUTPUT COMMAND */
>mrc = getmsg('CNSL.','SOL',,,3)
>Do i = 1 to CNSL.0
>   msgindex = msgindex + 1
>   msg.msgindex = CNSL.i
>End
>msg.0 = msgindex
>Do i = 1 to msg.0
>   Say msg.i
>End
>address TSO 'CONSOLE  DEACTIVATE'
>
>
>Q).  What am I missing?  Why doesn't CNSL. Get populated?  I saw the EXAMPLE 4 
>and tried to get that to work with solicited messages.
>
>

You are authorized to use console, correct?  If you do it interactively (not 
tracing the REXX exec) do you get the response back at the terminal?  
Have you tried to set CONSPROF as part of your exec?   Try adding this:  

"CONSPROF UNSOLDISP(NO) SOLDISP(NO)"  

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS  
mailto:[email protected]     
ITIL v3 Foundation Certified                                     
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html
Systems Programming expert at http://search390.techtarget.com/ateExperts/
----------------------------------------------------------------------
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

Reply via email to