Add the double vertical bars between the CHANG and the ED as follows:
SAY 'ABC.TESTCOMM.ASMLIB('LEFT(STRIP(MEMBR,T," ")||")",9)' WAS CHANG',
|| 'ED TODAY, ' ZLM4DATE' AT 'MTIME 'BY 'ZLUSER
Ren
-----Original Message-----
From: TSO REXX Discussion List [mailto:
TSO-...@VM.MARIST.EDU] On Behalf Of Shaughnessy, Mike
Sent: Monday, October 21, 2013 12:40 PM
To:
TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] TSO REXX and GRS Commnad Output
Hello REXX experts,
A while back I asked for help with the strip command and received many
suggestions, advice and examples. Thanks for everybody's help.
I have it stripping now but I do have one small issue. My code is next.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
SAY 'ABC.TESTCOMM.ASMLIB('LEFT(STRIP(MEMBR,T," ")||")",9)' WAS CHANG',
'ED TODAY, ' ZLM4DATE' AT 'MTIME 'BY 'ZLUSER
My output file is as such: Notice the space in the word changed.
Anyone have an idea on how to eliminate that space using my above code?
ABC.TESTCOMM.ASMLIB(AAID) WAS CHANG ED TODAY, 2013/10/21 AT
10:56:31
ABC.TESTCOMM.ASMLIB(ADCDE) WAS CHANG ED TODAY, 2013/10/21 AT
10:56:37
ABC.TESTCOMM.ASMLIB(ADCDEF) WAS CHANG ED TODAY, 2013/10/21 AT
10:56:42
-----Original Message-----
From: TSO REXX Discussion List [mailto:
TSO-...@vm.marist.edu] On Behalf Of Vitonis, Tony
Sent: Wednesday, October 02, 2013 3:46 PM
To:
TSO-...@vm.marist.edu
Subject: Re: [TSO-REXX] TSO REXX and GRS Commnad Output
This program called CONSCMD works for me:
/* REXX */
Main:
PARSE ARG Command
ADDRESS TSO "CONSOLE ACTIVATE"
ADDRESS CONSOLE Command
Timeout = 5 /* seconds */
GetRC = Getmsg("Response.","SOL",,,Timeout)
IF GetRC = 0 THEN
CALL ReportResults
ELSE
SAY "GETMSG returned RC" GetRC
ADDRESS TSO "CONSOLE DEACTIVATE"
RETURN
ReportResults:
PROCEDURE EXPOSE Response.
DO i = 1 TO Response.0
SAY Response.i
END
RETURN
-----
TSO %CONSCMD D GRS,C --> produces
ISG343I 15.43.26 GRS STATUS 694
NO ENQ RESOURCE CONTENTION EXISTS
NO LATCH CONTENTION EXISTS
-----Original Message-----
From: TSO REXX Discussion List [mailto:
TSO-...@VM.MARIST.EDU] On Behalf Of Hansen, Dave L - Eagan, MN
Sent: Wednesday, October 02, 2013 2:52 PM
To:
TSO-...@VM.MARIST.EDU
Subject: TSO REXX and GRS Commnad Output
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 TSO-REXX subscribe / signoff / archive access instructions,
send email to
LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to
LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to
LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to
LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX