System.loadLibrary from z/OS PDSE

General discussion on the JZOS batch launcher and toolkit
Post Reply
labdom
Posts: 3
Joined: Mon Dec 18, 2006 7:35 am

System.loadLibrary from z/OS PDSE

Post by labdom »

I attempted to rebuild the C++ code from an existing USS shared library using the XL and zOS binder with the intention to store the DLL inside a PDSE. By the program under jzos fails on the loadLibrary, not found. The suspicion is the module name :libAbcJni.so versus AbcJni.
From the IBM zOS doc, I discovered 2 references of such artifice:
1. DB2 store procedure written in Java, with explanation on how to set the external link from uss to the PDS: ln -e modName libAbcJni.so
2. some references to Java and CICS where it is explicitly said that the module name (in the PDSE) must be prefixed by lib and suffixed by .so.
I tried to mimic the samples without success, I have no idea what happens behind the scene at all.
Q? is this possible, what is the direction?
any input welcome
thanks
Dom.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

This is really not a JZOS question, but I'll try to help.

When you call the Java loadLibrary("X") method, the Java JVM will try to load and setup linkage to a DLL named "libX.so". So, in order to put JNI code in a PDSE, I believe that you will have to build a dll (.so file) and setup references in the DLL to the PDSE.

I haven't done this myself, but I would suggest looking at the XLC++ programmers guide and the Binder manuals for more information.
Post Reply