Unix on the Mainframe: COB2 compiler, for Java calling COBOL Unix on the Mainframe: COB2 compiler, for Java calling COBOL unix unix

Unix on the Mainframe: COB2 compiler, for Java calling COBOL


After conferring with IBM, it turns out I had a couple things missing.

You must have a STEPLIB environment field set to the location of your COBOL compiler on the mainframe, so it can find your IGYCRCTL module.

Second, like other COBOL 5+ compiling, you must allocate a gargantuan amount of space in order to compile. 2 GB is not enough. Since I don't have permission to reallocate this in Unix, I ran a BPXBATCH job with REGION=0M.

After those two changes, -c compiles came out as normally. The "workaround" I provided in the question is completely incorrect. You must use:

sh ${COB2HOME}/bin/cob2 -c -qdll,thread,case=mixed ${DIR}/${COBPROG}.cbl

as your compile step, and the rest is just linkage.