On Wed, 2 Oct 2013 18:52:27 +0000, Hansen, Dave L - Eagan, MN 
<dave.l.han...@usps.gov> 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:m...@mzelden.com     
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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to