Calling a DataStage job from a java program

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
niremy
Participant
Posts: 23
Joined: Tue Sep 22, 2009 3:17 am

Calling a DataStage job from a java program

Post by niremy »

Hello,

I'd like to run DataStage job from a scheduler written in java (quartz) and I'd like to know if there is an API somewhere for calling DataStage jobs in a java program.

Thanks for your response.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Your best bet, for pure scheduling, is probably to use the JNI to ultimately issue your call via the widely used "Job Control" API, which is available for C++.

ERnie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
niremy
Participant
Posts: 23
Joined: Tue Sep 22, 2009 3:17 am

Post by niremy »

Thanks eostic.

My problem is I'm not sure I will have a client on the computer I will run the java webserver.

I've read somewhere on dsxchange that we can turn some DS jobs into webservices. I looked into the official documentation bundled with Datastage but I only found how to use webservice inside a job and not turning a job into a webservice.

Can somebody help me with this issue ?
Sgiri1
Participant
Posts: 43
Joined: Sat Nov 08, 2008 10:58 pm
Location: Tambaram

Post by Sgiri1 »

niremy
Participant
Posts: 23
Joined: Tue Sep 22, 2009 3:17 am

Post by niremy »

I forgot to bring back my solution to the problem:

I finally used an ssh connection and call the dsjob command.
The java library I used was ganymed-ssh2

Thanks for your participation.
sambarand
Premium Member
Premium Member
Posts: 22
Joined: Mon Apr 10, 2006 11:03 am

Calling a DataStage job from a java program

Post by sambarand »

Hello

could you please share the details of how you used the ssh connection to invoke the datastage job on the remote server.

Thanking you in advance.
Sam
IBM Global Services
niremy
Participant
Posts: 23
Joined: Tue Sep 22, 2009 3:17 am

Post by niremy »

Hello sambarand,

I doubt there's much more to say but I can give you some details.

The ganymed-ssh2 library (first result with google) is supplied with docs and examples. I used those docs and examples to build my java class.

For the ssh command, I simply used the dsjob command with the good parameters for invoking my job.

The rest is up to you. I can give you some more help if you are blocked somewhere, but I can't give you my code :p
sambarand
Premium Member
Premium Member
Posts: 22
Joined: Mon Apr 10, 2006 11:03 am

Post by sambarand »

Hello Niremy

Thanks allot for the information ... any advise on the options we have for managing the password used to logon to the remote server ?
Sam
IBM Global Services
Post Reply