Every Easytrieve program passes through compile, link, and execute phases before operations teams schedule it in production. Errors can appear at any point along that path, and each phase leaves different clues. A beginner who treats every failure as a runtime bug will waste time editing source when JCL allocation failed first. A developer who ignores return codes will promote broken load modules. This page teaches you how to classify failures by lifecycle phase, read the right diagnostic output, use Broadcom debug options responsibly, and hand off incidents to operations with useful evidence.
Lifecycle error handling starts with classification. Ask which phase was running when the job ended. A compile step that ends RC=12 never reached execution. A link-edit step with S878 or unresolved external symbols never produced a valid load module. An execute step that ends RC=0 may still have written warning messages you should not ignore. Mapping symptoms to phases prevents random changes and speeds recovery.
| Phase | Where to look | Common examples |
|---|---|---|
| Compile | SYSPRINT compiler listing, EZTPA00 messages | Undefined field, invalid REPORT syntax, missing macro library |
| Link-edit | Binder listing, SYSLIN, link step SYSPRINT | Unresolved external, wrong object library, missing runtime module reference |
| Execute | SYSPRINT runtime messages, Error Analysis report, JES output | File open failure, S0C7 data exception, empty VSAM treated as error |
| Operations | Scheduler logs, SDSF, change-control records | Wrong production dataset, missed promotion, class routing hiding output |
Compile errors stop before object code is accepted. The compiler validates Library definitions, Activity logic, REPORT layouts, and PARM options. Messages reference source line numbers when possible. The most efficient fix strategy is to read the first error, correct the root cause—often a missing DEFINE or misspelled FILE name—and recompile. Many subsequent errors disappear once the first definition problem is resolved.
12345678PARM LINK(MYPAYRPT) FILE PERSNL FB(150 1800) EMPNO 1 5 N EMPNAME 6 8 A JOB INPUT PERSNL IF DEPT EQ 'BAD' PRINT EMPNAME END-IF
If DEPT was never defined in the FILE layout or as working storage, the compiler flags an undefined field. If PERSNL DD is missing in JCL that is a runtime or allocation issue, not a compile issue—the compiler may still accept the source. Keeping compile failures separate from JCL failures avoids editing working source when the job never compiled successfully in the first place.
After a clean compile, the link-edit step combines object modules into an executable load module. Failures here often look like system abends or binder messages rather than Easytrieve source line references. Unresolved external symbols mean the binder could not find a referenced module—commonly an Easytrieve runtime entry or a called COBOL subprogram. Wrong SYSLIN input or missing object data sets produce immediate link step failures without any execute attempt.
Link errors are owned jointly by developers and build support. Developers confirm the program CALL statements and subprogram names. Build teams confirm object libraries, binder control cards, and promotion of the resulting load module to the correct LOAD library used at execute time. A compile success followed by execute S806 often means the link output never reached the STEPLIB data set the runtime job uses.
Execute-time errors occur when the load module runs against real files and real JCL DD statements. File-not-found conditions usually mean the DD name in JCL does not match the FILE name in source, or the data set does not exist in that environment. Data exceptions such as S0C7 indicate invalid numeric data or arithmetic on non-numeric fields. VSAM empty-file behavior depends on site options such as MTVSERR—some installations treat an empty VSAM input as an immediate abnormal termination.
Easytrieve prints runtime diagnostics to SYSPRINT. When the program abends and ABEXIT processing is active, you may also receive an Error Analysis report with program name, abend code, and optional statement flow information. Treat SYSPRINT as the primary developer transcript and the Error Analysis report as the structured abend summary.
Broadcom documents the Error Analysis report for abnormal terminations when ABEXIT SNAP or ABEXIT NOSNAP is specified on the PARM statement. SNAP requests a dump in addition to the report; NOSNAP produces the report without a dump. The report identifies the program, describes the error that caused termination, and may include a flow table when FLOW tracing was active. Message EZABX016 shows recently executed statement numbers, newest first, which helps you locate the failing instruction in a large program.
12345PARM LINK(PAYAUD) ABEXIT(SNAP) DEBUG(STATE,FLOW) FLOWSIZ(20) FILE PERSNL FB(150 1800) GROSS 40 7 P 2 JOB INPUT PERSNL TOTAL = TOTAL + GROSS
In this pattern, ABEXIT SNAP enables dump and analysis output on abend. DEBUG STATE records the statement number of the instruction executing at failure time. DEBUG FLOW maintains a rolling table of recent statement numbers. FLOWSIZ controls how many entries the flow table retains. During testing these options are invaluable; in high-volume production they add storage and CPU cost, so sites often rely on lighter defaults.
| Option | Purpose | Tradeoff |
|---|---|---|
| STATE | Save current statement number for abend messages | Small per-line storage overhead |
| FLOW | Trace recently executed statement numbers | Subroutine call per executable line; disable after test |
| FLDCHK | Extra field validity checking during execution | Helps catch data problems early; adds runtime cost |
| PMAP / DMAP | Print map diagnostics for procedure or data maps | Useful at compile or test; verbose output |
z/OS jobs return a condition code summarizing step severity. Easytrieve compile steps commonly use RC=4 for warnings and RC=12 or higher for errors. Operations may treat RC=4 as success with review or as failure depending on shop standards. Runtime programs may complete with RC=0 while SYSPRINT contains file status messages you should investigate. Do not equate “job green” with “business correct.”
Batch schedulers often propagate the highest return code from any step. A compile step RC=12 prevents downstream execute steps from running in well-controlled pipelines. When debugging ad hoc jobs, confirm which step actually failed before opening the wrong listing. JESJCL shows step completion codes in order.
Many “Easytrieve failures” never enter Easytrieve logic. S013 allocation errors, missing STEPLIB, wrong DISP on a GDG, and security access denials fail during JCL processing or dataset open before meaningful program output appears. These require JCL and operations correction, not source edits. Conversely, a perfectly allocated file with corrupt packed decimal data is a program and data-quality issue solved with FLDCHK during test, better input validation, or upstream data fixes.
Mature shops document who acts on each failure type. Developers own source defects and unit-test reruns. Build services own link and promotion gaps. Operations owns scheduler definitions, production dataset availability, and spool routing. Incidents handed to operations should include job name, job ID, failing step, return code, abend code if any, relevant DD names, and whether SYSPRINT or Error Analysis output was captured before spool purge.
Change control ties lifecycle error handling to audit. When a production payroll job fails after a promote, compare compile listing dates, load module timestamps, and JCL proc versions against the last successful cycle. Rollback decisions depend on evidence, not guesses about which programmer edited which member last night.
Making an Easytrieve report is like baking a cake in a factory. First someone writes the recipe—that is your source. The compiler checks the recipe for mistakes. The linker puts the finished mix into a box you can ship—the load module. The oven run is execution. If the recipe has a typo, fix the paper before baking. If the oven never turned on, that is a JCL problem, not a recipe problem. Lifecycle error handling means knowing which kitchen step failed and looking at the right clipboard for clues.
1. A compile-time error is usually fixed by:
2. DEBUG(STATE,FLOW) on the PARM statement helps because:
3. A module-not-found error at execute time often indicates:
4. The Error Analysis report is produced when:
5. Production jobs should generally: