Search found 6 matches

by danik1956
Fri Dec 29, 2023 12:24 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Setting up JNI for calling Java from COBOL on z/OS
Replies: 14
Views: 4778

Re: Setting up JNI for calling Java from COBOL on z/OS

Here is the JCL we have used to compile & bind a COBOL program that invokes JNI services: //RUN EXEC IGYQCB,LIBPRFX=CEE,LIBPRF1=CEE, // PGMLIB='YOSI.TEST.LIB',GOPGM=HLWRLD64 //COBOL.SYSIN DD DSN=Z2V10.SAMP.LIB(CBLB#JNI),DISP=SHR //COBOL.SYSLIB DD DSN=Z2V10.SAMP.LIB,DISP=SHR // DD DSN=DANI.SOURCE...
by danik1956
Sun Nov 26, 2023 1:16 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Setting up JNI for calling Java from COBOL on z/OS
Replies: 14
Views: 4778

Re: Setting up JNI for calling Java from COBOL on z/OS

"When you are binding a COBOL program that calls external functions like JNI_CreateJavaVM (Java Native Interface) from a shared library or DLL (Dynamic Link Library), you need to provide the necessary information for the linker to resolve these external names. This typically involves specifying...
by danik1956
Thu Nov 23, 2023 4:26 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Setting up JNI for calling Java from COBOL on z/OS
Replies: 14
Views: 4778

Re: Setting up JNI for calling Java from COBOL on z/OS

Thanks for the detailed response.
One question relating to binding the COBOL program with the required JNI callable services.
What should be included in the BIND step so that external names like 'JNI_CreateJavaVM' would get resolved ?
by danik1956
Mon Nov 20, 2023 9:00 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Setting up JNI for calling Java from COBOL on z/OS
Replies: 14
Views: 4778

Re: Setting up JNI for calling Java from COBOL on z/OS

One more question related to using JNI with native COBOL on z/OS.
The IBM COBOL version 6.3 doc states that a 64-bit COBOL program can only call Java using JNI and not via INVOKE.
Can someone point me at some example for using JNI to call Java from a COBOL batch program compiled with LP(64) option ?
by danik1956
Thu Nov 16, 2023 10:55 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Setting up JNI for calling Java from COBOL on z/OS
Replies: 14
Views: 4778

Re: Setting up JNI for calling Java from COBOL on z/OS

Thanks. I found the relevant ZFS file at "IGY630.ZFS" and mounted it as /usr/lpp/cobol (read-only)
by danik1956
Wed Nov 15, 2023 9:57 pm
Forum: IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.
Topic: Setting up JNI for calling Java from COBOL on z/OS
Replies: 14
Views: 4778

Setting up JNI for calling Java from COBOL on z/OS

I have been looking at the following IBM sample program: https://www.ibm.com/docs/en/cobol-zos/6.3?topic=methods-example-invoking-java-from-batch-cobol-program To compile the sample program there is a required COPY named JNI. JNI.cpy is in the z/OS® UNIX file system in the include subdirectory of th...

Go to advanced search