Easytrieve statements are built from words—keywords, field names, literals, symbols—separated by delimiters. Delimiters tell the compiler where one word ends and the next begins. They are not part of the word they touch: the period after a label is not part of the label name, and the colon in FILEA:FLD1 is not part of FLD1. Beginners who omit spaces after delimiters or embed commas inside identifiers get tokenization errors that look like mysterious keyword failures. This page walks through each delimiter, spacing rules, and practical examples from Library qualification to MASK parentheses.
Each Easytrieve statement consists of one or more words. A word begins with a non-blank character and ends at a delimiter or at the end of the statement area columns 1-72. Keywords like IF and FILE are words. EMPNO is a word. 'ACC' in quotes is a literal word. The compiler scans left to right applying delimiter rules to build tokens before checking grammar.
| Delimiter | Description | Example |
|---|---|---|
| Space | Basic separator between words | IF DEPT EQ ACC |
| Period (.) | Ends statement; label syntax; multi-statement lines | A = 1. B = 2 |
| Comma (,) | Optional readability in lists | DEBUG(STATE, FLOW) |
| Single quote | Encloses alphanumeric literals | DEPT EQ 'ACC' |
| Parentheses | Group parameters and expressions | MASK (A BWZ '$$,$$9.99') |
| Colon (:) | Qualifies file, record, or WORK | FILEA:FLD1 |
Spaces separate most tokens. Arithmetic operators also require spaces on both sides in documented examples: A + B not A+B unless grammar explicitly allows tighter forms. Multiple consecutive spaces are typically treated as one delimiter boundary. Missing space between a keyword and operand can concatenate tokens into invalid words.
When the same field name exists in multiple files or in both a file and working storage, qualify with file-name:field or WORK:field. Spaces around colon are flexible—FILEA:FLD1, FILEA : FLD1, and FILEA: FLD1 are documented valid forms. Qualification removes ambiguity for the compiler and for human readers tracing data lineage in multi-file jobs.
123IF FILEA:STATUS EQ 'A' ADD FILEA:AMOUNT TO WORK:TOTAL END-IF
When a statement accepts multiple parameters, parentheses group them so the compiler parses one parameter list. Without parentheses, only one parameter is assumed per grammar rules. MASK and DEBUG on PARM are classic examples where nested parentheses appear. Match opening and closing parentheses across continuation lines when statements span records.
Alphanumeric literals use single quotes. An embedded apostrophe doubles the quote: O'KELLY becomes 'O''KELLY'. The quotes are delimiters, not part of the stored value length calculation beyond the defined literal rules. Mismatched quotes extend literals to end of line incorrectly and produce confusing errors on the next statement.
Broadcom illustrates the same identifier with different delimiters: bare RECORD-COUNT, qualified FILEONE:RECORD-COUNT, parenthesized (RECORD-COUNT), quoted 'RECORD-COUNT', comma-terminated RECORD-COUNT, and period-terminated RECORD-COUNT. Each form plays a different grammatical role even though the human-readable name looks similar.
At least one space must follow all delimiters except left parenthesis and colon in documented cases. Left parenthesis acts as basic delimiter starting a grouped list. Colon may abut the qualifying name or field without mandatory spaces on both sides. These exceptions prevent awkward spacing in FILEA:FLD1 while keeping most tokens clearly separated.
Identifiers—field names and labels—cannot contain comma, quote, parentheses, or colon. If you need similar visual names, use hyphens: TAX-RATE not TAX:RATE as a single field name. Period is also a delimiter and cannot appear inside identifiers. This restriction drives shop naming standards for readable qualified references instead of punctuation in names.
Delimiters are spaces and punctuation that show where words start and stop in a sentence. Spaces between words are like gaps between blocks. Quotes wrap a exact phrase. Parentheses hold a group that belongs together. Colon means which box a label comes from. Period is a stop sign between sentences. The computer reads the sentence by finding those gaps—it does not swallow the punctuation as part of the word.
1. The basic delimiter between words in a statement is:
2. Colon (:) in FILEA:FLD1 is used for:
3. Delimiters are:
4. Multiple parameters must be enclosed in:
5. Alphanumeric literals are enclosed in: