Compilation transforms Easytrieve source—FILE, REPORT, ACTIVITY, SCREEN, and PROC statements—into object code the runtime can execute. The process is triggered by JCL executing EZTPA00, governed by PARM lines and the options table, and documented on SYSPRINT for every developer fixing errors. This page walks through phases from SYSIN bytes to load module handoff so beginners understand what the compiler actually does.
PARM is not optional metadata—it switches compiler mode. Examples from Broadcom workflows:
| PARM | Effect |
|---|---|
| SYNTAX | Validate syntax; quick check without full object build |
| COMPILE | Full compile; object to SYSLIN for later link |
| LINK(name) | Compile and link module name for load library |
| COMPAT | Enable compatibility behaviors for migrated 6.4 code |
PARM may appear as the first statement in SYSIN before FILE statements. Shop standards sometimes inject PARM via proc skeleton so developers never omit it.
The compiler reads FILE definitions first, building a dictionary of record layouts: start position, length, type (A alphanumeric, N numeric, P packed decimal, etc.), and file attributes. W fields (working storage) and PROC definitions register next. Errors here— overlapping fields, invalid lengths—cascade into later sections. Fix Library before debugging REPORT logic.
Activity statements (IF, READ, SORT, PERFORM, CALL) and Report statements (LINE, CONTROL, SUM, TITLE) reference fields from Library. The compiler verifies:
Validated program transforms to object code—machine instructions plus metadata for Easytrieve runtime services (buffer management, report formatting engine, sort calls). You do not see assembler source unless options request low-level listing; most developers interact only with SYSPRINT summary and error messages.
On z/OS, object goes to SYSLIN for binder input. On distributed platforms per Broadcom docs, object format differs and EZT command may auto link-edit for standalone executables.
Severity E (error) prevents successful compile unless options allow warnings-only proceed. W (warning) flags suspicious but legal constructs—review during migration.
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
PARM COMPILE tells EZTPA00 to produce linkable object without running the report. Omit PARM or use compile-and-go JCL to execute after compile. TITLE and LINE define report layout validated during Report section processing.
| Mode | Use when |
|---|---|
| Compile-only + link | Production promotion, change control, repeat execution |
| Compile-and-go | Development test, ad hoc, small data verification |
| SYNTAX only | Pre-commit check in edit workflow |
Before parsing source, compiler loads options from EZOPTBL or EZTINI default. Options may set default listing width, compatibility flags, SQL behavior, and diagnostic level. Global options reduce repetitive PARM coding but can surprise developers when a global flag differs from 6.4 expectations—document options changes in migration run books.
Object in SYSLIN is not executable until IEWL binder resolves external references to Easytrieve runtime routines in CBAALOAD and writes a load module. The load module name comes from PARM LINK(name). Execute step uses PGM=name with STEPLIB concatenation described in JCL execution tutorial.
Compiling is translating your Easytrieve recipe into machine instructions the kitchen robot understands. The compiler reads the recipe (SYSIN), checks you did not ask for sugar in the soup by mistake (errors), writes a note about problems (SYSPRINT), and gives the robot a card to follow (object code). Link-edit puts that card in the right folder (load library) so the batch job can find it tomorrow night.
1. The Easytrieve compiler is invoked when JCL runs PGM=
2. PARM SYNTAX is used to:
3. Compiler output object for linking goes to:
4. The compile listing appears on:
5. Undefined field errors usually mean: