Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Entering MVS COMMANDS IN A BATCH REXX

Status
Not open for further replies.

peteibm

Programmer
May 17, 2004
2
US
Does any one know how to enter a MVS command such as
"d a,l" in a batch TSO-E rexx and return the results in order to parse it from the que.

Thanks.
 
You could use SDSF in batch to do it...or if you just want to find out if a certain job is running or not you could go diving down the control blocks in REXX to do it...or you could use the status command to do it.

/* rexx */
arg parm
tsom = outtrap(jobst.)
address tso "status "parm
tsom = outtrap('off')
actflg = 0
jj = 0
do i=1 to jobst.0
activ = index(jobst.i,'EXECUTING')
if activ <> 0 then do
jobn = word(jobst.i,3)
jobnl = pos('(',jobn)
jobn = substr(jobn,1,jobnl-1)
say jobn 'active'
jj = jj+1
job.jj = jobn
actflg = 1
end
end

Hope this helps
 
When you say "MVS command" I presume you mean "JES command".

First, you must have the authority to issue such a command.

Second, you must issue the command in the proper environment, probably CONSOLE:
Code:
address CONSOLE
"D A,L"

Third, recovering the results of such a command depends heavily on how those results are returned (if at all). Some software is written to return its data via the stack; others are not. You may have to do considerable experimenting.



Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
The reply from kevinf2349 worked great. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top