Page 1 of 1
Calling a DataStage job from a java program
Posted: Mon Jan 11, 2010 4:46 am
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.
Posted: Mon Jan 11, 2010 6:45 am
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
Posted: Thu Jan 14, 2010 9:04 am
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 ?
Posted: Thu Jan 14, 2010 11:17 pm
by Sgiri1
Posted: Fri Mar 12, 2010 3:24 am
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.
Calling a DataStage job from a java program
Posted: Thu May 06, 2010 9:34 am
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.
Posted: Thu May 06, 2010 12:40 pm
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
Posted: Mon May 10, 2010 2:03 pm
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 ?