Easytrieve Reserved Words

Reserved words are the fixed vocabulary of Easytrieve—IF, JOB, REPORT, END-PROC, SYSDATE, BEFORE-LINE, and hundreds more documented in Broadcom Symbols and Reserved Words. They introduce statements, name report hooks, and expose system values. You cannot declare a user field named IF or EXECUTE without conflicting with the language. Releases add reserved words over time; 11.6 migration lists broke legacy programs that used SET or LOGICAL-RECORD as innocent field names. This page explains reserved versus non-reserved keywords, major categories, migration impact, and how to fix conflicts before production compile.

Progress0 of 0 lessons

Keywords vs Reserved Words

All reserved words are keywords, but not all keywords are reserved. Keywords are words with specific meaning to Easytrieve. Reserved keywords additionally cannot be used as field names. Non-reserved keywords might legally appear as identifiers in some contexts, though doing so confuses maintainers. When in doubt, treat language vocabulary as off limits for field naming and choose business-specific names instead.

Categories of Reserved Words

Major reserved word categories
CategoryExamplesRole
Statement keywordsIF, JOB, FILE, REPORT, PERFORM, END-IFIntroduce statements and blocks
Report PROC hooksBEFORE-LINE, AFTER-BREAK, TERMINATION, REPORT-INPUTName report writer event procedures
Screen PROC hooksBEFORE-SCREEN, AFTER-SCREEN, INITIATIONName screen activity procedures
System fieldsSYSDATE, SYSTIME, SYSPRINT, PAGE-NUMBERBuilt-in values referenced in logic and reports
Constants conceptsLOW-VALUES, HIGH-VALUES, DUPLICATE, EOFSpecial comparison and control values

Statement Keywords Beginners Use Daily

Library and Activity programming relies on reserved statement words: PARM, FILE, DEFINE, JOB, PROGRAM, SORT, SCREEN, IF, ELSE, END-IF, DO, END-DO, CASE, END-CASE, MOVE, ADD, PRINT, WRITE, READ, EXECUTE, STOP, GOTO, PERFORM, PROC, END-PROC, REPORT, TITLE, LINE, CONTROL, SUM. These tokens are never valid as field names. Compile errors citing unexpected keyword often mean a field was named like a statement word.

Report and Screen Reserved PROC Names

Report procedures use reserved label names paired with PROC: REPORT-INPUT filters records before detail printing; BEFORE-BREAK and AFTER-BREAK surround control breaks; BEFORE-LINE and AFTER-LINE bracket detail lines; ENDPAGE handles page boundaries; TERMINATION runs at report end. Screen activities use INITIATION, BEFORE-SCREEN, AFTER-SCREEN, and TERMINATION similarly. These names are reserved because the product invokes them automatically—you do not PERFORM them like user PROCs.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
REPORT PAY-RPT LINESIZE 80 TITLE 01 'PAYROLL' LINE 01 EMPNO GROSS REPORT-INPUT. PROC IF GROSS LE 0 SKIP END-IF END-PROC TERMINATION. PROC DISPLAY 'REPORT COMPLETE' END-PROC

System Field Reserved Words

System fields expose runtime information without DEFINE declarations. SYSDATE and SYSTIME supply current date and time for report titles. PAGE-NUMBER and LINE-NUMBER support formatting. RECORD-COUNT may reflect file statistics in documented contexts. Reference these names in LINE or TITLE statements; do not DEFINE a conflicting user field with the same spelling.

11.6 Migration Reserved Words

Moving from older releases to 11.6 function mode introduced additional reserved words. Broadcom New Reserved Words documentation lists fields that break if used as user names, including BREAK-LEVEL, DRAW, ELEMENT-RECORD, END-REPEAT, EXECUTE, GRAPH, HIGH-VALUES, INITIATION, LOGICAL-RECORD, LOW-VALUES, NOTITLE, SET, SUMMARY-INDEX, and SYSUSERID. Inventory source libraries before migration: search for these tokens in FILE and DEFINE lines and rename with prefixes like WS- or FL-.

Symbols Table and Delimiters

Symbols and Reserved Words also documents punctuation symbols—period, comma, colon, quotes, parentheses, plus and minus continuation—not as field names but as syntax symbols with reference codes. The R marker in documentation indicates reserved status. Consult the official alphabetical list when compile errors reference an unfamiliar token—you may have hit a newly reserved word or system field.

Avoiding Reserved Word Conflicts

  • Prefix working storage fields: WS-SET-FLAG not SET.
  • Avoid statement verbs as names: USE RUN-MODE not EXECUTE as a field.
  • Run migration scans before enabling 11.6 function mode compile.
  • Align copybook field names with enterprise dictionary reserved-word checks.
  • When a word must appear in reports, use literals in TITLE not field names.

Reserved vs Non-Reserved in Practice

Some words feel like English and tempt naming—ORDER, COUNT, DATE. Check the reserved list before committing names in shared copybooks. A field named DATE might conflict with date type syntax or system conventions depending on release. Prefer EMP-HIRE-DATE over DATE alone. Report PROC name BEFORE-LINE is always reserved; user PROC CALC-LINE is safe.

Common Reserved Word Mistakes

  1. DEFINE field named IF or END-IF from autocomplete errors.
  2. Legacy field SET breaking after 11.6 upgrade.
  3. User PROC labeled BEFORE-LINE conflicting with report hook name.
  4. Attempting to DEFINE SYSDATE instead of referencing system field.
  5. Importing COBOL copybook names that match Easytrieve reserved vocabulary.

Explain It Like I'm Five

Reserved words are official command words the Easytrieve robot already knows. You cannot name your toy box IF or JOB because those words tell the robot to do special jobs. Some words are also special report helper names the robot calls by itself, like BEFORE-LINE. When the robot learns new command words in an upgrade, old box names that match them must get new stickers so the robot does not get confused.

Exercises

  1. List five statement keywords and explain why each cannot be a field name.
  2. Rename field EXECUTE to WS-EXECUTE-FLAG for 11.6 compatibility.
  3. Identify which report PROC runs at end of report processing.
  4. Write TITLE line using SYSDATE without defining SYSDATE in Library.
  5. Plan a source scan for three 11.6 new reserved words before migration.

Quiz

Test Your Knowledge

1. Reserved words in Easytrieve:

  • Cannot be used as field names
  • Are optional comments
  • Replace JCL
  • Only appear in COBOL

2. Non-reserved keywords:

  • May sometimes be used as field names in context
  • Never appear in programs
  • Are only in JCL
  • Disable compilation

3. BEFORE-LINE and REPORT-INPUT are:

  • Reserved report PROC identifiers
  • JCL DD names
  • Sort keys
  • Tape labels

4. EXECUTE became reserved in 11.6, meaning:

  • Legacy field named EXECUTE may fail compile until renamed
  • All programs must use EXECUTE
  • JCL is required
  • Reports are disabled

5. The full reserved word list is in:

  • Symbols and Reserved Words documentation
  • JES messages only
  • ISPF PDF only
  • DD statement reference
Published
Read time13 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve 11.6 Symbols and Reserved Words and New Reserved Words migrationSources: Broadcom Easytrieve Report Generator 11.6 TechDocs, Symbols and Reserved Words, New Reserved WordsApplies to: Easytrieve reserved keyword and system field usage