views:

413

answers:

2

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  A: 

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
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
This is what I ended up using and it worked very well. Its crazy IBM dont provide an api for this.
A: 

Actually, it is quite easy. Have your java app instantiate an ftp object of your choice and have it pointed your mainframe's internal reader. You can basically have your java app string together some jcl, open an ftp connection to your mainframe and use the internal reader as your destination file name. Works great.

lucrboyer