Page 1 of 1

Invoke JCL through Datastage

Posted: Wed May 20, 2009 10:24 pm
by ag_ram
Hi,

I am using Datastage EE v8.0.1 on AIX. Can you please let me know if we can invoke a JCL through datastage job, sequencer or UNIX script.

Thanks.

Posted: Thu May 21, 2009 12:02 am
by ray.wurlod
Assuming that the JCL is on a mainframe, almost certainly not. On the other hand, if you are using EE MVS edition, then you can edit the JCL templates therein so that they can invoke other JCL after the generated JCL has been transferred to the mainframe. But that transfer is not effected under DataStage control.

Posted: Thu May 21, 2009 12:12 am
by ag_ram
Thanks Ray!

Posted: Thu May 21, 2009 12:29 am
by aartlett
You can invoke JCl on a mainframe by FTP'ing it to a particular service on the Mainframe.The Sysadmins of the mainframe should be able to help. I've not done it from Datastage but had written a Java program a while ago to do it. The guts of it was a simple FTP to the Mainframe and then executing it, much the same as you would to invoke a script on a remote unix box.

I can't recall the exact procedure (it was 10 years ago) but I may be able to dig out the Java commands I used.

I would suggest you talk to the Sysadmins first as they may have procedures already in place.

Posted: Thu May 21, 2009 12:55 am
by ray.wurlod
Don't forget to allow about 2 years to overcome the politics involved in executing (becoming allowed to execute) "foreign" code on "their" mainframe! Expect to have to walk through your code no fewer than five times.

Posted: Thu May 21, 2009 1:27 am
by bobyon
Are you creating the JCL statements with DataStage, or just need to execute an existing job? If the latter, have you considered using a mainframe job scheduler such as CA7 or Zeke. You should be able to trigger the execution of a JCL job upon the successful completion of your DataStage job; assuming it was originally executed via JCL on the mainframe.

If that concept has promise for you, let me know and I can try to explain the technique more fully.

Posted: Thu May 21, 2009 11:35 am
by cppwiz
Tell the mainframe admins you want to FTP the JCL into the JES spooler. It's fairly common and once you get through the bureaucracy it works well.

Posted: Thu May 21, 2009 12:26 pm
by lstsaur
Worked in mainframe env. for the past 30 years, this is the first time I have heard the "mainframe admins". Who are they?

Posted: Thu May 21, 2009 6:02 pm
by aartlett
cppwiz wrote:Tell the mainframe admins you want to FTP the JCL into the JES spooler.
That's the service I was thinking of :), thanks Cppwiz for remembering it, saved me unarchiving and digging in my old code.

This is the easiest way to do it. You must remember to set the transfer mode to ascii (not binary) so that it will convert your ascii 7bit/8bit to EBCDIC that the mainframe uses, other than that it is very straight forward. Have a Mainframe guy check you JCL (if you aren't a Mainframe JCL coder) before you finish the allocation, use Procs etc where possible, all the usual words :)

Good luck.