java calling a datastage job

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajiivnb
Participant
Posts: 77
Joined: Fri Sep 10, 2004 8:38 am
Location: India

java calling a datastage job

Post 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
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
rajiivnb
Participant
Posts: 77
Joined: Fri Sep 10, 2004 8:38 am
Location: India

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsxuserrio
Participant
Posts: 82
Joined: Thu Dec 02, 2004 10:27 pm
Location: INDIA

Post 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
dsxuserrio

Kannan.N
Bangalore,INDIA
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
Post Reply