问题
Can someone tell me the best way to run a piece of JCL on IBM zOS from a Java web app on a different server (Windows). I also need get a response code back from the job.
The 2 options at the moment are: 1) Using JES - But its hard to get the response back 2) Make a call through a DB2 procedure.
Is there another (better) way
回答1:
I"m not sure if this will help, but while I was looking for information about how to use FTP on z/OS to transfer files I saw the following article from IBM.
http://www.ibm.com/developerworks/systems/library/es-zosbatchjavav/index.html
Hope you find it helpful.
回答2:
I used 2 methods that work:
1- with ftp -i -v -n >> $LOGFILE on unix.
...
quote site FILETYPE=JES then put
JOBNAME=grep "It is known to JES as" $LOGFILE | awk '{print $7}'
quote site FILETYPE=JES get $JOBNAME.x getuser.out (x=1,2,3 or 4)
delete $JOBNAME
2- on v9 call ADMIN_JOB_SUBMIT
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z9.doc.admin%2Fsrc%2Ftpc%2Fdb2z_sp_admincommanddb2.htm
来源:https://stackoverflow.com/questions/1323538/how-to-submit-jcl-on-ibm-zos-through-java-web-app