Easytrieve White Space

White space—spaces and blank lines—is the invisible syntax that separates Easytrieve words so the compiler knows where JOB ends and INPUT begins. Unlike languages that use semicolons, Easytrieve relies on spaces, period-space terminators, line ends, and continuation characters to bound statements. Extra spaces around equals signs are usually tolerated; missing spaces around arithmetic operators are not. Blank lines count as comments. This page explains where spaces are required, where they are optional, and how teams use indentation and blank lines to make eighty-column source readable for the next developer who inherits the program.

Progress0 of 0 lessons

Space as the Basic Delimiter

Words in Easytrieve statements—keywords, field names, literals, symbols—start at a non-blank character and end at a delimiter or statement boundary. Space is the primary delimiter between words on a line. Multiple consecutive spaces typically collapse to word separation in practice; alignment columns in edited source are stylistic. The compiler tokenizes on defined delimiter rules, not fixed columns within the statement area except where continuation rules apply.

text
1
2
3
4
JOB INPUT PERSNL IF GROSS GT 0 PRINT PAY-RPT END-IF

Delimiter Spacing Rules

White space requirements by delimiter
DelimiterSpace ruleExample
SpaceSeparates wordsIF STATUS EQ
Period-space (. )Ends statement; space required after periodSTOP. JOB INPUT
CommaAt least one space after commaUSING(FA, FB)
ColonSpace after colon not requiredFILEA:FLD1 or FILEA : FLD1
Left parenthesisSpace after ( not required(RECORD-COUNT)
Equal signSpaces optional around =NUM=10 or NUM = 10

Multiple Statements on One Line

Period-space lets you chain statements on one eighty-character record when each is short. COST = FIXED + VARIABLE. PRICE = COST + PROFIT fits when variables and names are compact. Overuse hurts readability—reserve same-line chaining for trivial assignments or generated macro lines. Each statement between period-space pairs must be syntactically complete.

text
1
WS-A = 1. WS-B = 2. WS-C = WS-A + WS-B

Blank Lines as Comments

A record containing only blanks is a comment. Use blank lines to separate Environment, Library, JOB activities, and REPORT blocks visually. Do not insert blank lines inside continued statements—continuation spans must be uninterrupted logical lines aside from comment prohibition. A blank line mid-continuation breaks parsing and produces confusing compile errors referencing the wrong token.

Indentation Conventions

Broadcom states you may indent statements for readability but require no specific indentation for compilation. Standard practice indents bodies of IF, DO, and JOB blocks two or four spaces. FILE field definitions often indent field lines under FILE. REPORT TITLE and LINE statements indent under REPORT. Consistent indentation helps reviewers spot unclosed END-IF blocks in diff tools and ISPF browse.

  • Environment and Library: usually column 1 keywords.
  • Nested IF bodies: +2 or +4 spaces per nesting level.
  • REPORT detail lines: align TITLE and LINE statement numbers.
  • Continuation lines: plus style often indents under parent statement.

Arithmetic Operator Spacing

Arithmetic operators—multiply, divide, add, subtract—must have a space on each side. GROSS * 0.10 is valid; GROSS*0.10 may fail or parse incorrectly because asterisk is also used in other contexts. Division and subtraction share symbols with continuation and unary signs; spacing disambiguates binary subtraction from negative numeric literals in expressions.

text
1
2
3
WS-TOTAL = GROSS + BONUS - DEDUCT WS-AVE = WS-TOTAL / WS-COUNT WS-TAX = WS-TOTAL * 0.15

Qualified Names and Spacing

FILEA:FLD1, FILEA : FLD1, and FILEA: FLD1 are equivalent qualified forms. Pick one style per program. Extra spaces consume columns in eighty-character lines—significant when names approach forty characters and statements approach column seventy-two.

Trailing Spaces

Trailing spaces on a source line may affect whether the last non-blank character is minus or plus for continuation. Editors that trim trailing spaces on save silently break continuation lines—a common frustration when PC-based editors upload to mainframe datasets. Verify continuation character is truly the last non-blank on the record in hexadecimal view if compile errors mention unexpected statement termination.

Inline Comments and White Space

Inline comments use period, one or more spaces, asterisk, then text: FIELD W 5 A . * Comment here. The spaces between period and asterisk are required by the pattern. Full-line comments use asterisk in the first non-blank column—see the comments tutorial for detail.

White Space in Literals

Spaces inside quoted alphanumeric literals are significant. 'NY' differs from 'NY ' and ' NEW YORK '. Do not trim literals assuming DISPLAY will pad unless field editing rules guarantee it. Numeric literals do not contain embedded spaces—123 456 is two tokens, not one number.

Common White Space Mistakes

  1. Missing spaces around + or * in arithmetic expressions.
  2. Period without following space—statement terminator not recognized for chaining.
  3. Blank line inserted inside continued statement.
  4. PC editor stripped trailing + continuation character.
  5. Tab characters displaying as single column misaligning continued tokens.

Explain It Like I'm Five

White space is the air between words so you can tell JOB and INPUT apart. A period with a space after it is like a period at the end of a sentence—then you can start a new sentence on the same line. Empty lines are blank pages that mean nothing to the computer but help people see sections. Inside quote stickers, spaces count as part of the sticker message—like spaces between your first and last name on a name tag.

Exercises

  1. Rewrite one line with three statements separated by period-space.
  2. Add proper spaces around operators in an unspaced expression.
  3. Show two valid colon qualification spacing styles for the same field.
  4. Explain why blank lines are forbidden inside continuations.
  5. Indent an IF block three levels using two spaces per level.

Quiz

Test Your Knowledge

1. The basic delimiter within Easytrieve statements is:

  • Space
  • Semicolon
  • Tab only
  • Newline only

2. Period-space (. ) is used to:

  • Terminate a statement and allow another on same line
  • Start comments only
  • Continue lines
  • End programs

3. At least one space must follow delimiters except:

  • Left parenthesis and colon
  • Every delimiter always
  • Single quote
  • Comma only on Tuesdays

4. A line containing only blanks is treated as:

  • A comment
  • Syntax error
  • STOP statement
  • FILE definition

5. Arithmetic operators require:

  • A space on each side of the operator
  • No spaces ever
  • Tab indentation
  • Column 72 alignment
Published
Read time11 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve 11.6 Statement Overview delimiter and spacing rulesSources: Broadcom Easytrieve Report Generator 11.6 TechDocs, Statement Overview, Words and DelimitersApplies to: Easytrieve spaces, blank lines, and delimiter spacing