Datastage job trigger using java

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
gstungare
Participant
Posts: 12
Joined: Wed Aug 31, 2005 4:52 am

Datastage job trigger using java

Post by gstungare »

Hi,

We have a requiremen where in we want to trigger datastage job based on the input selected from screen.
The screen would be designed in java.
I want to know if there are some application already using this kind of thing and also how should we approcah this.




Regards,
Gaurav
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

AFAIK there is no such option to select the value from a screen and pass it on to a datastage job.
If your Java application could return the same output as a return code or redirect it to a file, it can be picked up by a datastage job.
Last edited by narasimha on Wed Sep 19, 2007 5:29 pm, edited 1 time in total.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The "best" approach is to have your DataStage job exposed as a web service. Then you can invoke it from anywhere, anywhen.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

The way I have done it is that since the DataStage Job Control APIs are already exposed as a Web Service, my JSF program will call this service and execute the job selected from the job list returned by the Web Service. This way you don't have to worry about which job needs to be exposed as a Web Service especially like my application which has almost 600 jobs.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This is true in the 7.x version or only in 8.x? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

I am using 7.5.1A.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The job control api's are only exposed as a Web Service in 7.x and only via RTI. This capability does not exist in v8 WISD, but as anyone using RTI/WISD knows, a job can be directly exposed as a Service itself and kicked off directly (w/o needing job control syntax [attach to project, etc.]).

Ernie
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

I should have also answered the original question..... as Ray notes, using RTI or WISD, you could use an EJB or Web Services call from your java code to invoke the DataStage job, as I note in the prior message. That's the most elegant method and perhaps the easiest, since you can avoid some of the complexities of DS Job Control.

Alternatively, if you are good with JNI, you could call C from your java code, and then inside that C code use the standard Job Control C API that is well documented.

..or...find the best way to exit to the command line and simply kick off a shell with the job control commands in their shell implementation.

Ernie
Nisusmage
Premium Member
Premium Member
Posts: 103
Joined: Mon May 07, 2007 1:57 am

Post by Nisusmage »

lstsaur wrote:The way I have done it is that since the DataStage Job Control APIs are already exposed as a Web Service, my JSF program will call this service and execute the job selected from the job list returned by the Web Service. This way you don't have to worry about which job needs to be exposed as a Web Service especially like my application which has almost 600 jobs.
Hello Istsaur,
This would be perfect for our environment. I'm battling to find out how we can expose all of the jobs and projects to a web service. Please can you give me the detail steps of how you configured your DS server to expose the DS API to web Services?

I've been searching DSXchange and the help files but I'm just coming up empty.

Please help.

Regards,
Gary
~The simpliest solutions are always the best~
~Trick is to understand the complexity to implement simplicity~
Post Reply