4

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

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
irishguy
  • 671
  • 1
  • 9
  • 24

2 Answers2

7

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.

jwmajors81
  • 1,430
  • 4
  • 20
  • 36
  • I have used FTP with FILETYPE=JES to do pretty much what was asked by paxdiablo and described in the article you referenced. It works very well. Good answer. – NealB Dec 08 '09 at 22:08
  • This is what I ended up using and it worked very well. Its crazy IBM dont provide an api for this. – irishguy Jul 10 '10 at 07:47
  • it works very well indeed, you can even monitor the job's status in jes – redDevil Mar 28 '13 at 05:29
0

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

Ben
  • 188
  • 2
  • 16