Reserved words are tokens the Easytrieve language owns—you cannot declare them as your own field names without compile errors or migration surprises. They include statement keywords (IF, JOB, REPORT), automatic procedure hook names (BEFORE-LINE, AFTER-SCREEN), system fields (SYSDATE, EOF), and special constants. Beginners collide with reserved words when choosing obvious names like SET or DATE; veterans hit new conflicts when Broadcom adds keywords in 11.x function mode. This cheat sheet compresses the highest-impact reserved words into quick-scan tables for desk reference, interview review, and migration scanning. For full tutorials on individual words, use the reserved words section index; for official completeness, open Broadcom Symbols and Reserved Words for your release.
These words introduce statements or activities. Using them as field names breaks compile or causes ambiguous parse errors.
| Word | Role | If you need a field name |
|---|---|---|
| JOB | Batch activity | JOB-ID, JOB-CODE (with prefix) |
| REPORT | Report activity | RPT-ID, RPT-NAME |
| FILE | File definition | FILE-NUM, FL-NAME |
| IF / ELSE / END-IF | Conditional logic | IF-FLAG, WS-IF-COND (avoid IF alone) |
| PERFORM | Call procedure | PERFORM-CNT (rare need) |
| PROC / END-PROC | Procedure delimiters | PROC-NAME as label only, not field |
| SORT | Sort activity/statement | SORT-KEY, SORT-SEQ |
| SCREEN | Online activity | SCR-ID, SCREEN-CODE with prefix |
| GET / READ / WRITE | I/O verbs | GET-CNT, READ-FLAG |
| DISPLAY | SYSPRINT output | DISP-CNT if truly needed |
| CALL | External program | CALL-CODE |
| MACRO / MEND | Macro prototype | MACRO-ID (not MACRO) |
| LIBRARY | Library section | LIB-VERSION |
| SET | Assignment keyword (11.6+ reserved) | FL-SET, WS-SET-VAL |
The report writer calls these procedure names automatically. You code the PROC body; you do not PERFORM them from JOB logic for normal report flow.
| Name | When invoked |
|---|---|
| BEFORE-LINE | Before each detail line prints |
| AFTER-LINE | After each detail line |
| BEFORE-BREAK | Before control break group |
| AFTER-BREAK | After break—subtotals common here |
| BEFORE-REPORT | Report start hook (release-dependent names) |
| AFTER-REPORT | Report end hook |
| Name | When invoked |
|---|---|
| INITIATION | Once when SCREEN activity starts |
| BEFORE-SCREEN | Before each terminal display cycle |
| AFTER-SCREEN | After user input received |
| TERMINATION | When SCREEN activity ends |
GOTO SCREEN, REFRESH, and RESHOW are invalid inside BEFORE-SCREEN per Broadcom screen procedure rules—memorize for interviews and code review.
| Field | Meaning |
|---|---|
| SYSDATE | Current system date |
| SYSTIME | Current system time |
| SYSUSER / SYSUSERID | User context (release naming varies) |
| EOF | End-of-file condition for named file |
| LINE-NUM / PAGE-NUM | Report line or page counters (context-dependent) |
| LOW-VALUES / HIGH-VALUES | Special constant references |
Words newly reserved or enforced in recent Broadcom releases break legacy programs that used them as field names. Scan and rename before function-mode compile.
12345* BAD (11.6 function mode) DEFINE SET 5 N * BETTER DEFINE FL-SET-FLAG 5 N
Comparison and arithmetic operators (EQ, NE, GT, GE, LT, LE, AND, OR, NOT) are keywords in expressions—not field names. END-IF closes IF blocks; END closes activities. Confusing END with END-PROC causes structure errors beginners see in compile listings.
Activities: JOB, REPORT, SORT, SCREEN. I/O: FILE, GET, READ, WRITE, OPEN, CLOSE. Control: IF, ELSE, END-IF, PERFORM, PROC, END-PROC, GOTO, EXIT, STOP. Report layout: TITLE, LINE, SKIP, PRINT. Hooks: BEFORE-LINE, AFTER-BREAK, BEFORE-SCREEN, AFTER-SCREEN, INITIATION, TERMINATION. System: SYSDATE, SYSTIME, EOF. Migration watch: SET.
Reserved words are like the teacher's special words on the classroom board—you cannot name your pet hamster “Homework” if the teacher uses that word every day for assignments. Pick a different hamster name with a prefix sticker so nobody confuses the pet with the assignment word.
1. Reserved words cannot be used as:
2. BEFORE-LINE is reserved because it names:
3. SYSDATE provides:
4. SET as a user field name fails in 11.6 because:
5. To fix reserved word conflict you should: