>> with Java. We need to know how to call our old existing COBOL routines
>> from Java.
Done that. It is easy.

>
>Warning, I have never done this and I don't speak COBOL, but... You need
>to make a JNI call from the IBM Java environment into a compiled program
>running in an LE-conforming environment. COBOL is (in theory) exactly
>that.
I did exactly that: JNI is indeed needed.


>
>All of the examples are probably C, but any language supported by LE
>ought to work. 
Well, indeed any language will do, but

>You might need to write a C stub to line up the
>parameters for your COBOL code and make the call to the COBOL
>subroutines from there. 
You __will__ need to write a C stub in any case, because that is what you 
do when you write JNI. From there, it is up to you what you call and how 
you call it. Calling LE supported stuff is easy: you just fetch() the 
module you need and, using a C function pointer, you call it as if it were 
a C function.

Do be aware that -- contrary to what is happening in Java -- you need to 
__tell__ the system when you're done with the references to the objects the 
system has passed to you and to the objects you created yourself in your 
JNI code.

> I don't think its likely to be brain surgery.
It's tedious if anything...

There is a book (from IBM, IIRC) that explains how it is done, but my 
memory is not able to recollect where I put it... It has JNI in its title...

Cheers,

Jantje.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to