Compilation is the quality gate of the Easytrieve lifecycle. Before a report can run in production, the source must pass the compiler's syntax and semantic checks and produce valid object code. This page focuses on the compile phase itself: what the compiler reads, what it validates, what it writes, and how beginners should read listings to fix errors quickly. If you understand compilation, later link and runtime failures become easier to separate from source problems.
Compilation transforms Easytrieve source statements into object code the runtime can use. Along the way, the compiler builds tables of files, fields, procedures, and reports. It checks that activity logic references valid fields, that report names exist, that statement combinations are legal, and that options are consistent with the installed product level. A successful compile does not guarantee correct business results, but it does guarantee the source is structurally acceptable to the language processor.
Batch compilation usually executes PGM=EZTPA00 with STEPLIB pointing to Easytrieve product libraries, SYSIN supplying source, and SYSPRINT receiving the listing. The first lines of the input stream may contain PARM statements that control compile mode. Broadcom documentation recommends EZTPA00 for new JCL instead of older PGM=EZT or PGM=EZTCOM names.
12345//EZTCOMP EXEC PGM=EZTPA00 //STEPLIB DD DSN=DEV.EASYTRIEVE.CBAALOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=DEV.EZT.SOURCE(SALESRPT),DISP=SHR //SYSLIN DD DSN=&&OBJ,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)
| PARM | Effect |
|---|---|
| SYNTAX | Fast syntax validation; useful during active editing |
| COMPILE | Full compile producing object code, often to SYSLIN |
| LINK(name) | Compile and request linked module name for load library |
| COMPAT | Enable compatibility behavior for migrated legacy source |
PARM is not decorative. It changes what the processor does with the same source member. If a developer expects compile-only but the source or options table causes compile-and-go behavior, the job may run immediately and create confusion about which phase failed.
Many compile failures originate in the Library section. Overlapping field positions, invalid lengths, missing file definitions, or bad macro expansions create cascading errors later in the listing. When you see multiple undefined field messages, inspect FILE and macro definitions before rewriting report logic.
123456789PARM COMPILE FILE EMPLOYEE EMP-ID 1 6 N EMP-NAME 7 30 A EMP-SALARY 37 7 P 2 REPORT SALRPT TITLE 'Employee Salary Listing' LINE EMP-ID EMP-NAME EMP-SALARY
This small program compiles only if field declarations are valid and report references exist. A typo such as EMP-NAMES instead of EMP-NAME in LINE would fail semantic validation even though the FILE section is correct.
SYSPRINT is your primary compile artifact. Scan it in this order: options used, source lines as read, first error or warning, cross-reference clues, and final summary severity. Severity E usually blocks success. Severity W warns about suspicious but sometimes legal conditions. Fix the first E before assuming later messages are independent problems.
Not every compile failure is a typo. Missing options table datasets, unavailable macro libraries, wrong STEPLIB maintenance level, or absent product datasets can stop compilation before meaningful source validation occurs. Compare failing JCL with a known good compile job when the source did not change.
| Outcome | Typical next step |
|---|---|
| SYNTAX success | Continue editing or submit full compile |
| COMPILE success with SYSLIN | Run binder to create load module |
| LINK requested | Verify module in application load library |
| Compile-and-go success | Review runtime output and counts immediately |
Compilation is the teacher checking your worksheet before it goes in the class folder. The teacher makes sure your name is on it, the answers follow the rules, and nothing is missing. If the teacher finds mistakes, you fix the worksheet first. Only then does it get graded or passed to the next step.
1. Compilation validates Easytrieve source against:
2. PARM SYNTAX is typically used to:
3. The compile listing is usually written to:
4. Undefined field errors usually mean:
5. Compile-only output for linking is commonly placed on: