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
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.