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!

a cobol program invoke a java class

Status
Not open for further replies.

hero69

Technical User
May 20, 2003
9
CH
Hi

I have a problem when I will invoke a java class from Enterprise Cobol 3.2 (IBM). I get a system code 0019 and user code 0000.

cbl dll,thread
Identification division.
Program-id. "TSTHELLO" recursive.
Environment division.
Configuration section.
Repository.
Class HelloJ is "HelloJ".
Data Division.
* Set address of JNIEnv to JNIEnvPtr
* Set address of JNINativeInterface to JNIEnv
Linkage section.
* COPY JNI
Procedure division.
Display "COBOL program TSTHELLO entered"
Invoke HelloJ 'sayHello'
Display "Returned from java sayHello to TSTHELLO"
Goback.
End program "TSTHELLO".

Compiler and Options:
//COMPILE EXEC PGM=IGYCRCTL,
// PARM='SIZE(5000K),RENT,DLL,THREAD,DBCS,LIB'

Java-Class:
class HelloJ {
public static void sayHello() {
System.out.println("Hello World, from Java!");
}
}

Has someone any idee what the problme is?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top