Coding standards are the written rules your organization adds on top of Broadcom's language syntax so every Easytrieve program reads like it came from one disciplined team. Two developers can both write valid JOB and REPORT code that compiles yet one uses cryptic field names, scatters FILE definitions, and ships DEBUG options to production while the other follows site conventions reviewers expect. Standards cover naming, formatting, comments, error handling, macro and PROC patterns, compile procedures, and promotion checklists. They speed code review in Endevor, reduce audit findings, and shorten on-call diagnosis when incidents span dozens of payroll and finance report programs. This page helps beginners understand why enterprises publish Easytrieve standards manuals, what typical rules contain, how standards connect to naming and formatting tutorials in this section, and how to apply a review checklist before your first production promotion.
Broadcom defines what is syntactically legal: PROC must end with END-PROC, reserved words cannot be field names, FILE definitions require documented clauses. Coding standards define what is acceptable on your LPAR: field prefixes by application, maximum PROC length, mandatory program headers, forbidden DISPLAY in production paths. Violating language rules fails compile; violating standards fails peer review or change board policy. Beginners need both manuals—the Language Reference for correctness, the site standards PDF for consistency.
| Category | Example rules | Tutorial |
|---|---|---|
| Naming | Prefixes by file type; PROC verbs; no single-letter fields | Naming standards |
| Formatting | Indent PERFORM bodies; column-align IF/END-IF | Formatting standards |
| Comments | Header block; business why not syntax what | Comments best practices |
| Structure | Thin JOB; macros for shared FILE; no god PROC | Modular design |
| Errors | Mandatory EOF handling; error counters; no silent skip | Error handling pattern |
| Compile/promote | Prod PROC name; no DEBUG FLOW; regression list | Compilation tutorial |
Standards often mandate prefixes: input file fields start with IN-, report work fields with WR-, counters with CNT- or TOT-. Procedure names use verb-noun form: CALC-FED-TAX, WRITE-DETAIL. Labels for GOTO exits end with purpose: SKIP-RECORD, END-JOB-INPUT. Reserved words and ambiguous product names stay forbidden. Names are limited length—avoid exceeding maintainability when site rules cap identifier size. New hires learn prefixes once and navigate unfamiliar programs faster during incident bridge calls.
Consistent indentation makes Endevor diffs meaningful. Standards specify spaces versus tabs (often spaces on mainframe ISPF), whether FILE blocks align FIELDS, and where macro invocations sit (top of member after header). REPORT activities separate TITLE, LINE, and procedure hooks with banner comments. Mixed styles in one application area force reviewers to waste cycles on whitespace instead of logic.
12345678* --- FILE DEFINITIONS (macros) --- %PERSNL-FILE DSN=HR.PERSNL.MASTER * --- JOB PROCESSING --- JOB INPUT PERSNL PERFORM VALIDATE-RECORD PERFORM UPDATE-ACCUMULATORS END
Production standards usually require explicit EOF handling, invalid record branches that increment ERROR-COUNT, and SYSPRINT or audit file messages with record keys—not silent GOTO that drops data. Some sites mandate STOP RUN or controlled abend when error rate exceeds threshold; others write exception files for morning rework. Pick one pattern per application and document it. Mixing styles within one nightly chain confuses reconcile staff.
Standards name the JCL PROC for development versus production compiles. Development may include DEBUG, MAP, or extended LIST; production strips diagnostics that inflate CPU and output. Promotion checklist items: compile return code zero, macro regression list executed, peer review approval, operations runbook updated if schedule or DSN changed, test totals attached to ticket. Skipping gates is how DEBUG FLOW reaches month-end production.
When Broadcom adds reserved words or deprecates clauses, update standards and scan programs during migration waves. Compatibility tutorial pages list version traps. Standards should reference current release number and link to internal migration playbook. Static PDF standards without owners become ignored; assign a quarterly review.
Coding standards are classroom rules for writing. Everyone uses the same margin size, puts their name at the top, and writes in neat letters so the teacher can read any paper quickly. If one person uses secret codes and tiny scribbles, grading takes forever and mistakes hide. Standards do not stop you from telling the story—they help everyone read it the same way.
1. Site coding standards exist primarily to:
2. Field names in production code should:
3. Production compiles typically require:
4. Code review should verify:
5. Reserved words and new syntax releases mean standards must: