Call Java function from 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
bunu1977
Participant
Posts: 35
Joined: Thu Oct 16, 2003 4:46 am

Call Java function from Datastage Job

Post by bunu1977 »

I am using Datastage 6.0.1

From Datastage I want to call a java function and pass two parameters.
The java function will return two values to datastage job towhich I ve write back to a text file.
How I ll do this?

Regds,
Dilip
Dilip Das
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
in case you can't use the external routine facility, which as I understand, is your case.
you can use a commnad line to run your java, returning the result via the return code or store it in a file and then read it.

if possible, you might concider implementing the function's logic in DS Basic.

any other solutions would make you specify on your configuration and what you want to acieve more clearly.

IHTH
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, if you must use Java, why can't it write the two values to a file? This is a much easier interface to manage - returning more than one value is always tricky! But if you can program it in Java chances are it can be programmed as easily in DataStage BASIC, as Roy points out, then you don't have to worry about deployment issues with your Java code - everything is contained within the DataStage environment.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ariear
Participant
Posts: 237
Joined: Thu Dec 26, 2002 2:19 pm

Post by ariear »

I'm not getting any incentive but ...... DataStage have a Java Pack (Starting from Version 6) :D
bunu1977
Participant
Posts: 35
Joined: Thu Oct 16, 2003 4:46 am

Post by bunu1977 »

Hi,

Can you pls tellme from where I can get the Java Pack for DataStage. ?

Regds,
Dilip
Dilip Das
bunu1977
Participant
Posts: 35
Joined: Thu Oct 16, 2003 4:46 am

Post by bunu1977 »

Shall I Have to get it separately or it is available with the datastage server installation package?

Regds,
Dilip
Dilip Das
Paul Preston
Participant
Posts: 24
Joined: Wed Apr 02, 2003 7:09 am
Location: United Kingdom

Post by Paul Preston »

Under the DSEngine directory on unix you should find a directory called unishared.load/uojsdk/lib and this should be included in your classpath for java. There are sample programs and some documentation in the subdirectories of unishared.load. There are java equivalent methods for most of the Basic functions and they are documented in ther UniObjects for Java Developers Guide part number 70-9041-951.
ariear
Participant
Posts: 237
Joined: Thu Dec 26, 2002 2:19 pm

Post by ariear »

Dilip,
First check the Ascential e.services site if there's a port for your Unix.
Then order it from your local rep. (But I'm not getting any incentive :( )
Post Reply