Runtime errors strike after compile succeeded—when the job reads a truncated record, divides by zero in a packed field, hits end of file on the wrong pass, or VSAM returns a status your program never handles. The listing was clean yesterday; today production data includes one bad row and the step abends S0C7 at statement 000412. Operators see RC 12; developers need FILE-STATUS, statement numbers from STATE option, and the compile listing cross-reference. This index explains execution-phase failure families, how runtime messages differ from EZTC compile codes, abend and dump artifacts, FINISH DISPLAY patterns for operations, and triage when logic versus data versus JCL is at fault. Use compiler errors index when the compile step fails; use this page when the run step fails.
A clean compile proves source syntax and static semantics only. Runtime exercises real datasets, concurrent job schedules, empty GDGs, keys not found on VSAM READ, and numeric fields that contain spaces or LOW-VALUES from upstream extracts. Move mode versus locate mode file processing in 11.6 changes invalid reference symptoms—see migration notes when porting 6.4 programs. Always verify the run used the load module you just linked.
1234EZT nnnn message text on SYSPRINT FILE-STATUS = 23 (VSAM not found example — verify against your FILE doc) CEE3204S S0C7 Data exception during ADD Last statement executed: 000412 per STATE listing correlation
Prefixes vary by release and environment. Correlate message text with abend code in job log. When STATE was enabled at compile via PARM DEBUG STATE, abend summaries reference statement numbers matching the compile listing—essential for macro-heavy programs.
| Symptom | Likely cause | First check |
|---|---|---|
| OPEN failure | Missing DD, wrong DSN, DISP conflict | JCL DD and catalog |
| READ EOF unexpected | Empty file, wrong SORT order | Dataset row count; JOB INPUT logic |
| VSAM status 23 | Record not found on direct read | KEY value; PATH-ID for path calls |
| Wrong amounts on report | Layout mismatch not abend | DMAP versus actual LRECL; RECORD-LENGTH for variable |
| MTVSERR empty VSAM | Empty cluster when reads expected | MTVSERR execution option; file prep job |
System-defined FILE-STATUS, RECORD-COUNT, RECORD-LENGTH, and PATH-ID fields document runtime file state. Test FINISH procedures that DISPLAY status when any GET returns error—operations need plain language, not only abend codes.
S0C7 data exception often traces to ADD or SUB on packed fields with invalid nibbles— spaces in zoned fields, HIGH-VALUES in amounts, or divide by zero when divisor never validated. Guard with IF NUMERIC and IF field NE ZERO before math. SQL nullable fields need indicator checks before arithmetic. FLDCHK compile option catches some invalid references early but does not replace data validation.
123456IF DIVISOR NUMERIC AND DIVISOR NE ZERO QUOTIENT = DIVIDEND / DIVISOR ELSE MOVE ZERO TO QUOTIENT MOVE 'Y' TO ERR-FLAG END-IF
SORT activity invokes system sort. Wrong key length, unsupported format, insufficient work space, or missing SORTWK DD produce sort messages in SYSPRINT wrapped in Easytrieve step output. SORT(MSG(ALL)) on PARM surfaces detail during test. Keys must match defined file fields; binary keys need correct length in SORT statement. External presort jobs that omit sync with Easytrieve FILE layout cause silent wrong order—not always an error message.
MOVE 8 TO RETURN-CODE in FINISH exits cleanly with RC 8—batch scheduler may still alert. Distinguish from S0C4 protection exception. Document intentional RETURN-CODE values in runbooks: 0 success, 4 warning, 8 business validation failure, 12 severe. DISPLAY explanatory text before STOP so logs show reason without dump reading.
SCREEN activities may fail on map errors, missing terminal definitions, or EXECUTE nesting mistakes recursion cannot detect. CICS programs must remain conversational when CALL chains require it. Transaction dumps differ from batch CEEDUMP. AFTER-SCREEN validation should set message fields instead of abending when operator correctable.
| Aid | Purpose |
|---|---|
| PARM DEBUG STATE | Statement number at failure |
| PARM ABEXIT SNAP | Storage dump on abend—dev only |
| DISPLAY tracing | Branch and field snapshots |
| FLOW / TRACEIN options | Statement flow trace—high overhead |
| Compile listing XREF | Map statement number to source |
| FILE statistics LISTFIL | I/O counts at end of step |
Runtime errors happen when the robot tries to do the homework on real papers, not practice sheets. Maybe a page is torn (bad data), the folder is empty (EOF), or the robot tries to divide cookies among zero friends (divide by zero). The compile step only checked spelling; runtime checks whether the world outside makes sense. The job log is the robot's cry for help—read what it says before opening every toolbox.
1. Runtime errors occur during:
2. S0C7 abend usually indicates:
3. FILE-STATUS after failed READ helps determine:
4. RETURN-CODE set in FINISH to 8 means:
5. PARM DEBUG STATE helps runtime diagnosis by: