running the java code in datastage7.5

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

running the java code in datastage7.5

Post by prasson_ibm »

Hi,
I have a java code with name Sum.java

code:-
class Sum1
{
int RetSum(int a1 , int a2)
{
return a1+a2;
}
}

class Sum
{
public static void main(String args[])
{
Sum1 a=new Sum1();
System.out.println(a.RetSum(10,20));
}
}

when i coplied this code it generates two class files
Sum.class and Sum1.class

I want to call this code in transformer.
Is it possible to do this,if it is please help me how to do ..??

Regards
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

External functions are documented for c calls. I would think that if you make a library with an entrypoint for this java program and declare c-type parameters and results then it should work. But you need to link your output files to object code and I don't know how to do that with java.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Please only post the same question one time!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hadn't seen this one yet. :evil:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply