Statements are the verbs of Easytrieve—FILE describes data, JOB reads it, IF filters it, REPORT and PRINT shape output. This cheat sheet groups statements by purpose with minimal syntax patterns so you can find the right keyword during development without opening a manual. Placement column reminds whether each statement lives in Library or Activity. For semantics, error messages, and extended examples, follow links to individual statement tutorials. Statement set reflects Broadcom Report Generator 11.6 batch and report focus; online SCREEN statements included for completeness.
| Statement | Syntax sketch | Purpose |
|---|---|---|
| PARM | PARM options... | Compile/runtime options—LIST, DEBUG, COMPAT |
| FILE | FILE name org... / fields | Declare file and record layout |
| DEFINE | DEFINE name type... | Working storage fields |
| REPORT | REPORT name options / TITLE LINE | Report layout definition |
| MACRO | MACRO name ... %MACRO | Macro definition (compile-time) |
12345FILE PAYROLL FB(200 20000) EMP-ID 1 5 N DEFINE WS-TOTAL W 9 P 2 REPORT PAY-RPT LINESIZE 132 LINE 01 EMP-ID WS-TOTAL
| Statement | Syntax sketch | Purpose |
|---|---|---|
| JOB INPUT | JOB INPUT file | Batch read loop on primary file |
| GET | GET file | Read next record (secondary/manual) |
| PUT | PUT file | Write record to output file |
| OPEN | OPEN file | Open file explicitly when required |
| CLOSE | CLOSE file | Close file explicitly |
| READ | READ file | Read variant per release/access method |
| Statement | Syntax sketch | Purpose |
|---|---|---|
| IF / END-IF | IF cond ... END-IF | Conditional execution |
| ELSE | ELSE ... | Alternative branch |
| DO / END-DO | DO WHILE cond | Loop while true |
| PERFORM | PERFORM proc | Call PROC |
| GOTO | GOTO label | Branch to label—use sparingly |
| EXIT | EXIT | Leave PROC or loop |
| STOP | STOP | End program |
| SELECT / CASE | SELECT / WHEN | Multi-way branch per release |
| Statement | Purpose |
|---|---|
| MOVE | Copy between fields |
| ADD / SUBTRACT | Accumulate numeric fields |
| COMPUTE / assignment | Expression evaluation where supported |
| VALUE on DEFINE | Initialize working storage |
| Statement | Purpose |
|---|---|
| Emit lines from named REPORT layout | |
| TITLE | Page header lines inside REPORT |
| LINE | Detail or heading row columns |
| FOOTING | Page footer lines |
| SKIP | Vertical spacing lines |
| CONTROL | Field attribute for control breaks |
| BEFORE-LINE / AFTER-LINE | Report event PROC hooks |
| BEFORE-BREAK / AFTER-BREAK | Control break PROC hooks |
| Statement | Purpose |
|---|---|
| SORT | Order records by keys ascending/descending |
| SORT control fields | DUPLICATES, DYNALLOC per syntax |
| DISPLAY | Debug output to listing or log |
| CALL | Invoke external program |
| LOOKUP | Table search patterns per release |
| Statement | Purpose |
|---|---|
| SCREEN | Online activity block |
| BEFORE-SCREEN | Pre-display PROC |
| AFTER-SCREEN | Post-input PROC |
| INITIATION / TERMINATION | SCREEN start/end hooks |
12345678PARM LIST FILE FILE INFILE ... REPORT RPT1 ... JOB INPUT INFILE IF condition PRINT RPT1 END-IF STOP
Statements are action cards. FILE card describes the box of records. JOB card says read every record. IF card says only do the next cards when a rule matches. REPORT card draws the paper template; PRINT card actually puts words on paper for this record. The cheat sheet is all action cards sorted by type so you pick the right card fast.
1. FILE belongs in:
2. JOB INPUT primarily:
3. REPORT versus PRINT:
4. PROC END-PROC wraps:
5. SORT statement: