Easytrieve Statements by Functional Category

Easytrieve exposes dozens of statement keywords. Alphabetical indexes help when you already know the spelling from a compile error. Category indexes help when you know the job—define a file, sum a column, break on department, show a screen—but not which keyword Broadcom chose. This page groups statements into functional families: environment options, data definition, file I/O, arithmetic and data movement, control flow, reporting, report events, modular procedures, sorting, tables, screens, and database access. Each row links to a dedicated tutorial with syntax, examples, quizzes, and common mistakes. Use it alongside statements reference for A–W lookup and statements overview for section-based skeleton. Production programmers bookmark both category and alphabetical views because maintenance tasks arrive as problems, not as sorted vocabulary lists.

Progress0 of 0 lessons

How to Navigate Categories

  1. Identify your task phase—define data, read records, branch, format report, online screen.
  2. Open the matching category table below.
  3. Click statement name for deep tutorial when published.
  4. Verify statement placement in Environment Library or Activity per program structure rules.
  5. Cross-check terminator grammar on statement-specific page.

Environment and Program Control

Environment category
StatementPurposeTutorial
PARMCompile and execute options, DEBUG, ABEXIT/syntax (PARM in overview)
PROGRAMName program activity entry/statements/job
EXECUTERun named activity from driver/activity-section
STOPEnd program execution/statements/stop

Definition and Library

Definition statements describe shape of data before runtime logic executes. They belong in Library section—not inside IF blocks. FILE names the logical file and record layout prefix. DEFINE declares fields with type and offset. TABLE builds in-memory lookup structures. MACRO defines compile-time text substitution when your release supports it.

Definition category
StatementPurpose
FILEDeclare file organization and buffer
DEFINEField name type offset length
TABLEIn-memory table for LOOKUP
MACROMacro definition or call

File I/O and Record Processing

I/O statements move records between datasets and program fields. OPEN prepares file. READ GET sequential or keyed access. WRITE PUT output. CLOSE releases. SELECT filters during report or sort. ACCESS opens database or extended file types on Plus installations. Job driver JOB INPUT ties loop to primary file.

I/O category
StatementPurpose
OPENOpen file for processing
READRead next sequential record
GETRead keyed or relative record
WRITEWrite output record
CLOSEClose file
ACCESSDatabase or extended access path
JOB INPUTDeclare driver file for activity

Data Movement and Arithmetic

MOVE assigns field values. ADD increments accumulators—ADD A TO B distinct from assignment A = A + B style. PARSE splits delimited strings. DISPLAY writes diagnostics to SYSPRINT. Arithmetic also appears in assignment expressions with operators—see operators section for + - * / ** MOD.

Data movement category
StatementPurpose
MOVEMove or assign between fields
ADDAdd value to numeric field
PARSEParse structured or delimited text
DISPLAYDiagnostic line to SYSPRINT

Control Flow

Control flow steers which statements run. IF ELSE END-IF conditional blocks. DO END-DO and WHILE loops. CASE multi-way branch. GOTO LABEL transfer—use sparingly. END closes various blocks per preceding keyword context.

Control flow category
StatementPurpose
IF / ELSE / END-IFConditional execution
DO / END-DOLoop block
WHILECondition-driven loop
CASEMulti-value branch
GOTO / LABELUnconditional branch target

Reporting and Layout

Declarative report statements define output appearance. REPORT starts subactivity. TITLE heading lines. LINE detail columns. CONTROL break field. SUM totals. PRINT in JOB selects records for named report. TOTAL may appear in report grammar per release.

Reporting category
StatementPurpose
REPORTStart report definition block
TITLEPage or section headings
LINEDetail column layout
PRINTSelect record for report
CONTROLControl break field (in REPORT)
SUMAccumulate on report breaks

Report Event PROCs

Report events are not always standalone top-level statements—they are PROC modules with reserved names the report writer invokes. AFTER-BREAK runs after control break processing. BEFORE-LINE runs before each detail line. See procedures tutorial for full event list and placement immediately after REPORT subactivity.

Report event category
Event PROC nameWhen invoked
REPORT-INPUTEach selected record before detail
BEFORE-BREAKBefore control break output
AFTER-BREAKAfter control break totals
BEFORE-LINEBefore detail line print
AFTER-LINEAfter detail line print
TERMINATIONEnd of report processing

Modular Procedures and Calls

Modular category
StatementPurpose
PROC / END-PROCDefine procedure module
PERFORMInvoke user PROC
CALLCall external program
RETURNReturn from called routine

Sort and Screen Categories

SORT activity statements reorder files—see sort tutorials. SCREEN activity defines terminal layouts. BEFORE-SCREEN and AFTER-SCREEN event PROCs bracket display and input—mirror report event pattern for online transactions.

Screen category
StatementPurpose
SCREENDefine screen activity and layout
BEFORE-SCREENLogic before screen display
AFTER-SCREENLogic after operator input
INITIATIONScreen activity startup PROC

Category Versus Section Placement

Category tells what the statement does. Program section tells where it may appear. FILE is definition category but Library section only. PRINT is I/O and reporting category but Activity procedural logic. REPORT is reporting category but declarative block at JOB end. Compile errors often mean right category wrong section—move statement rather than rename it.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
* Definition (Library) → Activity (procedural) → Report (declarative) FILE PAYROLL ... DEFINE fields... JOB INPUT PAYROLL IF GROSS GT 0 ADD GROSS TO WS-TOTAL PRINT PAY-RPT END-IF REPORT PAY-RPT TITLE 'PAYROLL' LINE EMP-NO GROSS

Explain It Like I'm Five

Categories are drawers in a tool chest. Hammer drawer has tools for hitting—ADD and MOVE. Ruler drawer has tools for measuring layout—LINE and TITLE. Door drawer has tools for going different ways—IF and GOTO. Alphabetical list is every tool sorted by name. Category list is tools sorted by what job they help you do.

Exercises

  1. Classify FILE IF PRINT into category names from this page.
  2. Name three report event PROCs and when each runs.
  3. Explain difference between category view and section placement.
  4. Pick control flow category and list four statements.
  5. Sketch minimal program naming one statement from definition activity and report categories.

Quiz

Test Your Knowledge

1. FILE and DEFINE belong to which category?

  • Definition / Library
  • Control flow only
  • JCL
  • Report events only

2. IF DO WHILE and GOTO are:

  • Control flow statements
  • Report TITLE lines
  • DD statements
  • Macro only

3. AFTER-BREAK and BEFORE-LINE are:

  • Report event hooks
  • File OPEN verbs
  • Environment PARM
  • Sort keys

4. This page differs from alphabetical statements reference by:

  • Grouping by job task not letter
  • Listing JCL only
  • Replacing Language Reference
  • Covering operators only

5. Minimal batch program uses categories:

  • Definition, activity driver, reporting
  • Screen only
  • SQL only
  • Macro only
Published
Read time17 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve 11.6 statement families and Activity Programming structureSources: Broadcom Language Reference, EZT Plus Application Reference statement indexApplies to: Easytrieve statements grouped by functional category