Tim Brown wrote:

>Can a batch job capture the results of a JES2 command into a sequential dataset

Yes. Try this (stripped down for brevity) REXX:

(You need to solicite messages to your REXX and have some time to do a wait for 
messages.)

/*REXX*/
msg_stat = msg('on') 
say "Init console interface"
CN = "E123"||mvsvar(sysname)

"CONSPROF SOLDISP(NO) SOLNUM(9999)"
"CONSOLE ACTIVATE NAME("cn")"

if rc <> 0 then
do
 say "CONSOLE Activation problem - " rc  
 exit 12 
end 
    
    CMD = '$DQ' 
    SAY 'Command to be run : ' CMD  
 
    "CONSOLE SYSCMD("cmd")    CART("crt")" 
    msgrc = getmsg('dmsg.','sol',crt,,60) 

    if msgrc = 0 then 
      do t =1 to dmsg.0 
         SAY DMSG.T 
      end
    else  
      do  
         say "ERROR - unable to retrieve console msg -- RC" msgrc
         "CONSOLE DEACTIVATE" 
         exit 12 
      end 
"CONSOLE DEACTIVATE"  
EXIT 0   

Modify above to write your things to a dataset and place your REXX somewhere 
where you can use it in a batch job.

HTH!

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to