It worked, but the problem is CONSOLE SYSCMD(mvscmd) must be code with exact
mvs command, ie. mvscmd must be any specific mvs command, it can't be
substituted by a string variable.
What I want to do is:
read an input file which contains several mvs cmd.
then run CONSOLE SYSCMD(syscmd) where syscmd is the cmd I read from input file
then display cmd output.
Anyone has the experience?
Regards
Victor
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to list...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Anyone has the experience?
Regards
Victor
This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna
Cmd = "D U,,,A20,1"
"CONSOLE SYSCMD(" || Cmd || ") CART('DA01')"
Would work no differently than what you have below.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-...@bama.ua.edu] On Behalf
Of Victor Zhang
Sent: Monday, October 18, 2010 5:31 AM
To: IBM-...@bama.ua.edu
Subject: Rexx command to execute MVS console commands
----------------------------------------------------------------------
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-...@bama.ua.edu] On Behalf Of Veilleux, Jon L
Sent: Monday, October 18, 2010 8:53 AM
To: IBM-...@bama.ua.edu
Subject: Re: Rexx command to execute MVS console commands
You need to unquote the command. Here's an example that should work.
/*REXX*/
cmd.1='d a,l'
cmd.2='d t'
cmd.3='d d,t'
"CONSOLE ACTIVATE"
do x=1 to 3
cmd.x =strip(cmd.x )
_cmd_ = "D U,,,A20,1"
_mvscmd_ = "CONSOLE SYSCMD(" !! _cmd_ !! " CART('DA01')"
Interpret _mvscmd_
I haven't tried it myself.
-----Urspr�ngliche Nachricht-----
Von: IBM Mainframe Discussion List [mailto:IBM-...@bama.ua.edu] Im Auftrag von Victor Zhang
Gesendet: Montag, 18. Oktober 2010 14:31
An: IBM-...@bama.ua.edu
Betreff: Rexx command to execute MVS console commands
Anyone has the experience?
Regards
Victor
__________________________________________________________________________________________________________________________________________
Atos Origin GmbH, Theodor-Althoff-Stra�e 47, D-45133 Essen, Postfach 100 123, D-45001 Essen
Telefon: +49 201 4305 0, Fax: +49 201 4305 689095, www.atosorigin.de
ING Bank AG, Frankfurt/Main: Konto 001 014 0937, BLZ 500 210 00, Swift / BIC INGBDEFF, IBAN DE74 5002 1000 0010 1409 37
Gesch�ftsf�hrer: Winfried Holz, Vorsitzender des Aufsichtsrats: Peter Hollfelder, Handelsregister Essen HRB 19354, Ust.-ID.-Nr.: DE147861238
___________________________________________________________________________________________________________________________________________
Why? What's the problem you're trying to solve by doing so? Without (I
hope) restarting the decades-old INTERPRET wars, it's only rarely
necessary, and certainly not in this case.
--
zMan -- "I've got a mainframe and I'm not afraid to use it"
Please provide me a sample jcl to run rexx console program.
Thanks
Victor
//MVSJCL JOB (ACCNT#),
// CLASS=T,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=&SYSUID,
// TIME=1440
//PROCVTV EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC DD DISP=SHR,DSN=userid.REXX.EXEC
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%REXXMVS D A,L
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-...@bama.ua.edu] On Behalf Of Victor Zhang
Sent: Tuesday, October 19, 2010 2:20 AM
To: IBM-...@bama.ua.edu
Thanks
Victor
This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna
----------------------------------------------------------------------
>Try the INTERPRET command:
Why? It's almost always the wrong answer.
>_cmd_ = "D U,,,A20,1"
>_mvscmd_ = "CONSOLE SYSCMD(" !! _cmd_ !! " CART('DA01')" Interpret
>_mvscmd_
It's not my dog.
>I haven't tried it myself.
Try it ;-)
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
ISO position; see <http://patriot.net/~shmuel/resume/brief.html>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)