Page 1 of 1

running the java code in datastage7.5

Posted: Fri Jul 03, 2009 6:57 am
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

Posted: Fri Jul 03, 2009 7:33 am
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.

Posted: Fri Jul 03, 2009 7:36 am
by ArndW
Please only post the same question one time!

Posted: Fri Jul 03, 2009 7:38 am
by chulett
Hadn't seen this one yet. :evil: