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.
I noticed that while I traced the above EXEC that it looked like I got the
messages back to my terminal screen. So I tried OUTTRAP. No luck.
address TSO 'CONSOLE ACTIVATE'
X = OUTTRAP(CNSL.)
address CONSOLE 'D GRS,C'
X = OUTTRAP('OFF')
Say 'CNSL.0' CNSL.0
address TSO 'CONSOLE DEACTIVATE'
In this EXEC my CNSL. Did get set to "0".
Thank you, Dave
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN