Page 1 of 1

Calling a Java Program from DataStage

Posted: Fri May 26, 2006 4:06 am
by IFMTCS
Is there any Stage in DS to call a java progarm and pass values to the java progarm and get the output into a sequential file.

Posted: Fri May 26, 2006 6:10 am
by jhmckeever
You can wrap your Java program as a custom wrapped stage, just like you would any other command you would execute from the shell. Just make the wrapped command something like:

Code: Select all

 java myProg parameters 
If your java program writes to STDOUT you can connect this to a sequential file stage. See Custom Stages in the Parallel Job Developers Guide.

HTH,
J.

Re: Calling a Java Program from DataStage

Posted: Fri May 26, 2006 6:50 am
by chulett
IFMTCS wrote:Is there any Stage in DS to call a java program
Yes - if you purchase the JAVA Pack.

Posted: Fri May 26, 2006 9:48 am
by lkthoma
Something I have done that is a bit cheesy is to call a unix script, and pass the variables into it. And then in the unix script, execute the java program.