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.
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.
1234JOB INPUT PERSNL IF GROSS GT 0 PRINT PAY-RPT END-IF
| Delimiter | Space rule | Example |
|---|---|---|
| Space | Separates words | IF STATUS EQ |
| Period-space (. ) | Ends statement; space required after period | STOP. JOB INPUT |
| Comma | At least one space after comma | USING(FA, FB) |
| Colon | Space after colon not required | FILEA:FLD1 or FILEA : FLD1 |
| Left parenthesis | Space after ( not required | (RECORD-COUNT) |
| Equal sign | Spaces optional around = | NUM=10 or NUM = 10 |
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.
1WS-A = 1. WS-B = 2. WS-C = WS-A + WS-B
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.
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.
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.
123WS-TOTAL = GROSS + BONUS - DEDUCT WS-AVE = WS-TOTAL / WS-COUNT WS-TAX = WS-TOTAL * 0.15
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 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 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.
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.
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.
1. The basic delimiter within Easytrieve statements is:
2. Period-space (. ) is used to:
3. At least one space must follow delimiters except:
4. A line containing only blanks is treated as:
5. Arithmetic operators require: