Calling a Java Program from DataStage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
IFMTCS
Participant
Posts: 8
Joined: Fri Feb 18, 2005 2:03 am
Contact:

Calling a Java Program from DataStage

Post 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.
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post 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.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Calling a Java Program from DataStage

Post by chulett »

IFMTCS wrote:Is there any Stage in DS to call a java program
Yes - if you purchase the JAVA Pack.
-craig

"You can never have too many knives" -- Logan Nine Fingers
lkthoma
Participant
Posts: 21
Joined: Wed Mar 08, 2006 8:47 am

Post 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.
lkthoma
Post Reply