S0C4 in Easytrieve

Document ID : KB000122899
Last Modified Date : 07/02/2019
Show Technical Document Details
Issue:
CA Easytrieve is failing with:
... 
SYSTEM COMPLETION CODE=0C4 REASON CODE=00000004
...
and/or:
...
EZABX007 Program PGMNAME ended with error code 840C4000. 
EZABX024 Program ended in PGMNAME. Check report procedures. Check flow table. 
EZABX011 The program encountered a protection exception (program interrupt code 4). 

...
When analyzing the dump you see the Abend occurs in EZOLETJAI or ETRSM +2114, for instance.
Resolution:
Please check whether FREE=CLOSE is being used at SYSOUT DD in your JCL - if yes, please remove FREE=CLOSE.
FREE=CLOSE should not be used when using SYSOUT again and again in the same program/application - it leads to a problem if there are several Easytrieve JOB or PROGRAM activities, using PRINTER/SYSOUT again and again within the same application, resp. job step.

Another possible reason is that Rocket Software's "Performance Essential" is being used.
It could be resolved by disabling it by adding the following DD:
...
//PSPOFF DD DUMMY
...
to the Abending job step.
Additional Information:
from: 
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.hasa300/has2v5_Spin_data_set_processing.htm 
"Coding FREE=CLOSE ...cut... causes JES2 to spin the data set for output processing when it is closed. JES2 then has the capability of performing output processing on the data set while the job continues execution." 
...