Easytrieve Compilation

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.

Progress0 of 0 lessons

What Compilation Accomplishes

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.

Starting a Compile Step

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.

jcl
1
2
3
4
5
//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 Modes Beginners Should Know

Common compile PARM values
PARMEffect
SYNTAXFast syntax validation; useful during active editing
COMPILEFull compile producing object code, often to SYSLIN
LINK(name)Compile and request linked module name for load library
COMPATEnable 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.

Compiler Phases in Plain Language

  1. Read options table defaults and PARM statements.
  2. Parse Library section: FILE, FIELD, W fields, PROC definitions.
  3. Expand macros if macro libraries are allocated.
  4. Parse activity, report, and optional screen sections.
  5. Validate references, types, and statement relationships.
  6. Generate object code and write listing plus summary to SYSPRINT.
  7. Write object to SYSLIN or continue to link or execute depending on mode.

Library Section Errors Come First

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.

text
1
2
3
4
5
6
7
8
9
PARM 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.

Reading the Compile Listing

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.

  • Confirm the listing shows the expected source member content.
  • Check whether macros expanded into unexpected lines.
  • Map each message to a source line number.
  • Review summary counts and highest severity at the end.
  • Archive listings for regulated changes when required by your shop.

Environment Problems That Look Like Source Errors

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.

Compile Outputs and Next Steps

Compile outcomes and what happens next
OutcomeTypical next step
SYNTAX successContinue editing or submit full compile
COMPILE success with SYSLINRun binder to create load module
LINK requestedVerify module in application load library
Compile-and-go successReview runtime output and counts immediately

Common Compile Errors

  • Undefined field or report name.
  • Invalid statement sequence or missing terminator.
  • Type mismatch in comparisons or arithmetic.
  • Macro not found or macro expansion failure.
  • Missing PARM or incompatible option for installed release.
  • Source member mismatch: job compiled different input than edited source.

Explain It Like I'm Five

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.

Exercises

  1. Submit a compile job with one intentional typo and locate the first error on SYSPRINT.
  2. Explain the difference between PARM SYNTAX and PARM COMPILE.
  3. List the compile DD statements and what each one supplies.
  4. Describe how a missing macro library can create many undefined field errors.
  5. Write a short compile success checklist before requesting link-edit.

Quiz

Test Your Knowledge

1. Compilation validates Easytrieve source against:

  • Language syntax and semantic rules
  • Only printer availability
  • Only RACF user names
  • Only tape mount status

2. PARM SYNTAX is typically used to:

  • Check source quickly without full production compile
  • Run CICS transactions
  • Format DASD volumes
  • Delete load modules

3. The compile listing is usually written to:

  • SYSPRINT
  • STEPLIB
  • Master catalog only
  • SYS1.PARMLIB

4. Undefined field errors usually mean:

  • A field was used before it was declared in the Library section
  • The printer is offline
  • JES is down
  • The job name is too long

5. Compile-only output for linking is commonly placed on:

  • SYSLIN
  • SYSIN
  • LNKLST
  • JES2 intradata
Published
Read time11 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve 11.6 compile listings, PARM behavior, and SYSLIN flowSources: Broadcom Easytrieve Report Generator 11.6 TechDocs, compile and link documentationApplies to: Easytrieve compilation on z/OS