Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Console in batch

105 views
Skip to first unread message

R.S.

unread,
Apr 3, 2002, 9:08:39 AM4/3/02
to
I'd like to issue some MVS commands from TSO and get the output form
these commands.
I can exec such a clist
CONSOLE SYSCMD(D A,L),NAME(JOHN)
CONSOLE SYSCMD(D T)
CONSOLE DEACTIVATE
The above clist works very well when invoked from TSO/ISPF, but invoked
from batch (IKJEFT01) it works, but the output is NOT in SYSTSPRT.
How can I get out form the commands in dataset ? It can bye SYSTSPRT or
any other ddname.
--
Radoslaw Skorupka
mailto:R.Sko...@bremultibank.com.pl
Lodz, Poland

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Robert Zenuk

unread,
Apr 3, 2002, 12:23:51 PM4/3/02
to
Here is a bare bones example:

REXX EXEC named COMMAND

/* rexx */
arg command
console = mvsvar("SYMDEF","JOBNAME")
"CONSOLE ACTIVATE NAME("console")"
"CONSPROF UNSOLNUM(500)"
"CONSPROF SOLDISPLAY(NO)"
"CONSOLE SYSCMD("command") CART(CART)"
CRC = getmsg('MSG.','sol','CART',,5)
IF CRC <> 0 THEN
do
Say 'CONSOLE SYSCMD has failed RC='CRC
Exit(CRC)
end
"CONSOLE DEACTIVATE"
do i=1 to msg.0
say msg.i
end

JCL:

//CMDTEST JOB (0000),TESTER,MSGCLASS=X,REGION=0M,NOTIFY=&SYSUID
//*******************************************************************
//* TSOBATCH JOB TO RUN REXX IN BATCH *
//*******************************************************************
//REXXEXEC EXEC PGM=IKJEFT01,PARM='COMMAND D A,L'
//SYSEXEC DD DSN=SYS1.LOCAL.EXEC,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY


Hope This Helps,
Robert Zenuk
robz...@aol.com

0 new messages