New mainframe developers often ask whether Easytrieve cares about uppercase versus lowercase the way UNIX shell scripts or Java do. The answer is layered: the Easytrieve compiler generally treats keywords and identifiers without case distinction, yet Broadcom documents reserved words in uppercase and recommends mixed or lowercase for your own names. Platform differences—EBCDIC on z/OS, ASCII on open systems, case-sensitive macro files on UNIX—add nuance when programs move between environments. This page separates compiler behavior from shop standards and from comparison semantics that affect business data.
Easytrieve keywords—JOB, IF, DEFINE, REPORT, MOVE, END-IF—appear in manuals in uppercase. In practice, coding if status eq 'a' usually compiles the same as IF STATUS EQ 'A'. Reserved words cannot be used as field names regardless of case you might try. EXECUTE, SET, and LOGICAL-RECORD became reserved in 11.6 function mode; a field named execute conflicts whether you spell it uppercase or lowercase.
1234job input persnl if gross gt 0 print pay-rpt end-if
Lowercase keywords may compile but violate readability standards at most sites. Code review tools and senior maintainers expect keywords aligned with documentation. Treat case-insensitive acceptance as a compiler convenience, not a style guide.
Field names may use A through Z in uppercase or lowercase per Statement Overview. EMPNO, empno, and EmpNo typically refer to the same symbol if defined once. Deliberately defining two fields differing only by case is not supported practice and creates maintenance risk. Labels on JOB, PROC, and GOTO targets follow the same identifier rules.
| Element | Compiler case handling | Shop standard |
|---|---|---|
| Keywords (IF, JOB) | Generally case-insensitive | UPPERCASE |
| Your field names | Generally case-insensitive | mixedCase or lowercase |
| Literals in quotes | Exact characters preserved | Match data file encoding |
| UNIX macro files | Case-sensitive filesystem | Match exact file name case |
| JCL DD names | External to Easytrieve | Follow z/OS conventions |
Using Best Practices recommends unique, uncommon, lowercase or mixed-case words for fields, files, and labels. Easytrieve reserves uppercase hyphenated common English words. Future releases may add new reserved words from that pool. Naming a field STATUS or TOTAL risks collision with language or system fields; ws-status or custTotal reduces that risk and makes case conventions visually distinct from keywords in source listings.
Alphanumeric literals preserve exact characters between quotes. IF REGION EQ 'NORTH' does not match a field containing north unless data or comparison functions normalize case. Easytrieve does not automatically fold case in all comparison contexts. Incoming file data often arrives uppercase from legacy COBOL systems; your literals must match that encoding. When integrating mixed-case web data, explicit translation may be required.
123IF DEPT-CODE EQ 'ACC' * matches ACC only—not acc or Acc unless data already matches END-IF
Multiple Platform Considerations notes EBCDIC on the mainframe versus ASCII elsewhere. Numeric values sort above letters in EBCDIC but below letters in ASCII—affecting INSTREAM tables and ordered comparisons more than keyword case. Migration reviews should validate table order and comparison logic, not assume PC test results match production collating sequence.
ISPF often displays source in uppercase unless your edit profile preserves mixed case. Saving lowercase field names may appear uppercase on screen while the dataset retains original bytes—confusing until you understand editor caps lock behavior versus compiler symbol tables. Standardize one convention per development team and enforce it in code review rather than fighting editor defaults.
TITLE literals print exactly as coded. Lowercase headings in quotes appear lowercase on spool unless a translation step uppercases them. Field masks may affect display case for alphabetic data but do not change stored values. Operations staff searching SDSF for PAYROLL LISTING need the TITLE case you actually coded in the REPORT section.
Easytrieve special command words like IF and JOB are like street signs—the city expects them one way, but you might write them in small letters and drivers still understand. Your own box labels on packages should look different from street signs so nobody confuses them. Words inside quote stickers must match exactly what is printed on the package—big letters and small letters are not the same sticker. On some computers, file names are like name tags where capital A and small a are two different people.
1. Easytrieve reserved keywords are typically documented as:
2. Broadcom recommends field names use:
3. On UNIX, macro file names are:
4. Alphanumeric literal comparison to a field:
5. Coding job instead of JOB: