View previous topic :: View next topic |
Author |
Message |
bonie Beginner
Joined: 18 Feb 2007 Posts: 5 Topics: 3
|
Posted: Fri Jan 31, 2014 6:38 am Post subject: Need a REXX exec to issue Console Commands |
|
|
Hi
Is there a way to execute MVS Console commands within REXX and get the output in a dataset.
For: I have to execute task checks by issuing command like \
D T,
D SMF
D CON etc every 30mins and check the output.
Any help is appreciated. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jan 31, 2014 12:19 pm Post subject: |
|
|
bonie,
Try this untested code
Code: |
/* REXX TO ISSUE CONSOLE COMMANDS */
CMD.1 = 'D T'
CMD.2 = 'D SMF'
CMD.3 = 'D CON'
"CONSOLE ACTIVATE"
DO X = 1 TO 3
"CONSOLE SYSCMD("CMD.X")"
MCODE=GETMSG('RESMSG1.','SOL',,,60)
IF RESMSG1.0 = 0 THEN DO
SAY 'NO MESSAGE RETURNED'
RETURN
END
ELSE
DO I=1 TO RESMSG1.0
SAY RESMSG1.I
END
RESMSG1.0=0
END
"CONSOLE DEACTIVATE"
EXIT
|
Kolusu |
|
Back to top |
|
|
bonie Beginner
Joined: 18 Feb 2007 Posts: 5 Topics: 3
|
Posted: Sat Feb 01, 2014 5:04 am Post subject: Worked fine..thanks |
|
|
Thanks Kolusu...it worked fine.. |
|
Back to top |
|
|
|
|