Page 1 of 1
java calling a datastage job
Posted: Thu Feb 03, 2005 8:03 pm
by rajiivnb
Hi,
Is there any way of calling a datastage job in the java programming.Have any of you faced this scenerio??? if so please lemme know to make my work easier.
Regards,
raji
Posted: Thu Feb 03, 2005 8:36 pm
by kcbland
Sure, just use the dsjob command line program. I'm sure you know how to execute unix commands, so dsjob is no different.
Posted: Thu Feb 03, 2005 9:43 pm
by rajiivnb
Hi Kenneth,
Yes i do agree i could pass thru command line but again how will the response from datastage would be captured in the java program.Is there any plug ins available to take care of this interface ..Please clarify on this more.
thanks in advance
Rdgs,
raji
Posted: Thu Feb 03, 2005 11:35 pm
by ray.wurlod
There is a C-callable API (called DSAPI) documented in both the
Server Job Developer's Guide and the
Parallel Job Developer's Guide.
While there is no explicit Java API, or set of classes, I'm sure you could make use of the DSAPI from Java.
But it won't make your work easier. Instead of leveraging all the error handling and other idiot-proofing that "they" have invested into
dsjob, you seek to re-invent the wheel (given that there's no Java API).
So I think your best solution is to make system calls to
dsjob. I suggest the
Runtime class
exec() method. You can research this on the Web, for example
here.
Posted: Fri Feb 04, 2005 11:30 am
by dsxuserrio
Rajiiv
What is your intention?? Are you trying to use an applet to invoke dsjobs or are you trying to run multiple threads of your java application? Assuming you are able to invoke and run the datastage jobs from java, how are you planning to call the java program itself??
If it is from UNIX you can aswll write a shell script to call dsjob commands.
Thanks
dsxuserrio
Posted: Fri Feb 04, 2005 12:36 pm
by kduke
I think I posted code to do it using DsObjects. Do a search. That code is also posted in VB. This way you do not need dsjob loaded on all your clients. It maybe more difficult to code though.