Getting S0C4 abend when Easytrieve program is calling a COBOL program from 50 years ago.
Example:
12.39.57 JOB19457 IEA995I SYMPTOM DUMP OUTPUT 735
735 SYSTEM COMPLETION CODE=0C4 REASON CODE=00000011
735 TIME=12.39.57 SEQ=52112 CPU=0000 ASID=003E
735 PSW AT TIME OF ERROR 078D2000 0001E09C ILC 4 INTC 11
735 ACTIVE MODULE ADDRESS=00000000_0001E088 OFFSET=00000014
735 NAME=name of Cobol program
735 DATA AT PSW 0001E096 - D00C9845 10004374 000496F0
735 AR/GR 0: 008F85F4/00000118 1: 00000000/0001D0A4
735 2: 00000000/98F1752C 3: 00000000/0002201C
735 4: 00000000/18F2DBE4 5: 00000000/98F2DBEC
735 6: 00000000/0001D090 7: 00000000/0001C26C
735 8: 00000000/0001C258 9: 00000000/000223E8
735 A: 00000000/00022570 B: 00000000/18F172C0
735 C: 00000000/0002201C D: 00000000/0000CE10
735 E: 00000000/00022650 F: 01000002/0001E088 735 END OF SYMPTOM DUMP
12.39.57 JOB19457 IEF450I ZBMBTGNV XCNV0140 - ABEND=S0C4 U0000 REASON=00000011 736
How can this be resolved? What parameters could affect this?
Easytrieve Report Generator, release 11.6
The key was learning that the called program was from the 1970s, thereby explaining that ENVIRONMENT N was truly fine as it is not LE COBOL. The resolution was therefore to check the AMODE parameter.
Confirming it was set to CALL(AMODE31), changing AMODE31 to N for the option file via the JOB06OP2 JCL in the CBAAJCL library or by adding CALL AMODE24 to the PARM statement of this particular program resolved the problem.
Documentation link for the AMODE31/AMODE24 parameter is documented via this link:
https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/ca-easytrieve-report-generator/11-6/installing/install-easytrieve-for-z-os/configuring/configure-your-system/updating-the-table/execution-options.html#concept.dita_e75dc3c9cc7a0cfbe2350919fb8ef28e3697e092_amode31AMODE31zOSonly
Had there not been a successful override on the PARM statement, the solution would have included creating a second option file with AMODE31 N and added an //EZOPTBL DD statement to the JCL of the program and also ensured via JOB06OP1 that the correct option file is still linked into the EZTINI member of the CBAALOAD library.