Identifiers are the names you assign to data fields, job activities, procedures, reports, and branch targets. Every IF that references EMPNO, every PERFORM that calls CALC-TAX, and every GOTO that jumps to CHECK-REGION depends on identifier rules the compiler enforces before execution. Broadcom allows long descriptive names up to 128 characters, forbids certain delimiter characters inside names, and requires qualification when the same name appears in multiple files. Naming well on day one prevents rename migrations when reserved words or duplicate symbols surface at compile time.
In Easytrieve syntax, identifiers are words that name objects: field names in FILE and DEFINE, labels on JOB and PROC statements, REPORT names, SCREEN names, and statement labels used with GOTO. They differ from keywords, which have fixed language meaning, and from literals, which are constant values in quotes or numeric form. The compiler resolves identifiers against symbol tables built from Library and activity declarations.
Field names may contain up to 128 characters from alphabetic A-Z, digits 0-9, and special characters except delimiters. The first character must be alphabetic, numeric, or national (#, @, $). The name cannot be all numeric—12345 alone is invalid because the compiler would confuse it with a numeric literal. At least one alphabetic or special character distinguishes field names from numbers.
| Name | Valid? | Note |
|---|---|---|
| EMPNO | Yes | Classic short name |
| WS-TOTAL-COUNT | Yes | Hyphen often used in working storage |
| #REGION-CODE | Yes | National character allowed at start |
| 12345 | No | All numeric—not allowed |
| FILEA:EMPNO | Qualified reference | Not a single identifier—qualification syntax |
Identifiers cannot contain comma, single quote, left parenthesis, right parenthesis, or colon. These characters serve delimiter roles in qualification, literals, and parameter lists. If business terminology includes punctuation, translate to hyphens or abbreviations in field names: CUST-ID not CUST:ID as an unqualified name.
All working storage field names must be unique. All field names within one FILE definition must be unique. The same name may appear in two files or in both a file and working storage only when you qualify references: FILEA:FLD1, WORK:FLD1. The compiler uses qualification to choose the correct symbol. Unqualified duplicate definitions produce compile errors or ambiguous references depending on context.
123456789FILE FILEA FB(80 800) STATUS 1 1 A FILE FILEB FB(80 800) STATUS 1 1 A IF FILEA:STATUS EQ 'A' MOVE FILEB:STATUS TO WS-HOLD END-IF
Labels identify PROGRAM, JOB, SCREEN, SORT, PROC, REPORT, and GOTO targets. Labels follow similar length and character rules but cannot consist entirely of numeric characters. proc-name. PROC combines label identifier with PROC keyword. Statement labels for GOTO may appear on their own line before executable statements inside an activity.
Reserved words are keywords you cannot use as field names—IF, JOB, REPORT, EXECUTE, and many system field names like SYSDATE. Non-reserved keywords may sometimes serve as field names in appropriate context, but using them harms readability. Prefer business-oriented names and check reserved lists when compile errors flag invalid field declarations.
Upgrading to Easytrieve 11.6 function mode added reserved words such as EXECUTE, SET, and LOGICAL-RECORD. Legacy programs using those strings as field names fail until renamed. Plan identifier audits during migration: search source libraries for new reserved words and rename fields with consistent prefixes before mass recompile.
Identifiers are name tags on boxes and doors in a warehouse. Each box gets one clear name so workers find the right parts. If two boxes had the same name, you would add the aisle name before the box name— that is qualification. Some names are reserved for fire exits and you cannot use those for boxes—that is reserved words. Names cannot include punctuation that the warehouse uses for signs, like commas and colons in the wrong places.
1. Easytrieve identifiers include:
2. Field names may be up to:
3. An identifier cannot consist of:
4. Colon inside an identifier name is:
5. Duplicate field names across files require: