Original Message:
Sent: Tue February 20, 2024 02:37 PM
From: Frank Swarbrick
Subject: Link editing big amount of compiled objects for Cobol library
Did you compile the C modules with both DLL and EXPORTALL options? I think those are required to build a "side-deck" (.x file) that is used by the binder to recognize each DLL function. So when you run the bind step it will create both lib.so and lib.x. Then under Unix you'd link it to the Cobol program like this:
cob2 -v -o test1 test1.cbl lib.x
note that I specified lib.x instead of lib.so. If you link lib.so directly you are not really using a DLL.
For JCL, in the link step include both of the following input cards:
SETOPT PARM(DYNAM=DLL,CASE=MIXED)
INCLUDE /src/lib.x
(change /src to whatever Unix directory contains lib.x)
I think this is all correct. I don't have a C compiler, so can't test it all out.
Frank
------------------------------
Frank Swarbrick
Original Message:
Sent: Mon February 19, 2024 05:44 AM
From: Piotr Synowiec
Subject: Link editing big amount of compiled objects for Cobol library
Hi Roy,
this is basically continuation of my previous issues.
I have over 1000 C files with single functions per file.
I compiled them with xlc with options -c -O2 -Wl, DLL in Unix shell.
I have now corresponding object modules for each function
I prepare the shared library by
xlc -o lib.so o/* -Wl,DLL
I'm not sure if this is the same process as link edit
I can successfully compile Cobol program and run it in Unix shell by
cob2 -v -o test1 test1.cbl lib.so
Not sure why my colleagues can't use this lib file with JCL
Jon below stated something about main module bu I do not have such thing just all single functions
Regards,
Piotr
------------------------------
Piotr Synowiec
Original Message:
Sent: Wed February 14, 2024 02:56 PM
From: Roy Bae
Subject: Link editing big amount of compiled objects for Cobol library
Hello Piotr,
To understand your situation better, do you mean that you want to create a module by linking all objects in APP.OBJ in USS (or MVS) ? Otherwise, could you add more details using an example? Thanks!
------------------------------
Roy Bae
Original Message:
Sent: Wed February 07, 2024 07:40 AM
From: Piotr Synowiec
Subject: Link editing big amount of compiled objects for Cobol library
Good Morning,
I have compiled objects in APP.OBJ data set with over 100 objects
I need to create a link edit version of library for Cobol.
Could anybody help me to figure it out ?
Regards,
Piotr
------------------------------
Piotr Synowiec
------------------------------