Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I call a Java program from Enterprise COBOL? 1

Status
Not open for further replies.

amikantorow

Technical User
Mar 5, 2007
3
US
Hello,

How do I call a Java program from an Enerprise Cobol DB2
store procedure? I must pass it a string value?
 
Thanks, I saw this example in the Enterprise COBOL manual
I was not sure how to use it since I do not know Java at all.
Is InitialContext the name of the Java program?

Thanks,
Ami
 
Ami,
I think you'll need to talk to somebody at your installation about the Java program that you are calling. Unless this is the first time that this has been done at your install, there will be examples of what you are trying to do. It seems to me from what you have written that the Java program is already written. There may well be a Cobol program that already calls this specific Java program.

I'm not a Java programmer and have not written a Cobol program that interfaces with Java, so the following should be taken with extreme caution:

The example given on the IBM website looks to be calling a Java program called "MyConverter", this is narrowed down further to a paragraph (for want of a better analogy) called ConverterHome. The parameters appear to passed in variables referenced currencyConverter.dollarToYen or currencyConverter.yenToEuro.

As I said earlier, I know little about Java, but feel sure that others here with far more knowledge than me, may be able to correct my assumptions if incorrect.

Regards,

Marc

 
Thanks, this helps. I am the first one to do this at my shop.
I am the lucky choosen one. The java program is written
by a java programmer for my interface.

Be well and happy,
Ami
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top