Reputation: 484
I'm trying to compile load modules from C code on IBM z/OS using xlc compiler. So far I have just shared object like library
xlc -c src/func1.c -o obj/func1.o
xlc -o lib/func1.o obj/func1.o
and I can compile my Cobol test running that function and it works
cob2 -v -o test test.cbl lib/func1.o
Could anybody explained me if this object is what is called load module ? If not, is it possible to create load modules in unix shell with xlc compiler from C code and how ?
Upvotes: 0
Views: 191
Reputation: 51
In z/OS Unix, the executables are normally generated as program objects (generally newer and better than load modules). To get a load module, you need to output the result to a PDS (partitioned dataset) and ensure that you are not using any program object required features (like using the GOFF object file format). You can output to a PDS by giving the output name to be a PDS. Ex. cob2 -o “//’my-pds-name(mymember)’” test.cbl lib/func1.o
Hope this helps, z/OS XL C/C++ Compiler team
Upvotes: 3