Page 1 of 1

Datastage job trigger using java

Posted: Wed Sep 19, 2007 1:45 pm
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

Posted: Wed Sep 19, 2007 3:56 pm
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.

Posted: Wed Sep 19, 2007 4:49 pm
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.

Posted: Wed Sep 19, 2007 5:53 pm
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.

Posted: Wed Sep 19, 2007 5:59 pm
by chulett
This is true in the 7.x version or only in 8.x? :?

Posted: Wed Sep 19, 2007 6:20 pm
by lstsaur
I am using 7.5.1A.

Posted: Wed Sep 19, 2007 7:39 pm
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

Posted: Wed Sep 19, 2007 7:43 pm
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

Posted: Mon Jul 21, 2008 2:07 am
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