Easytrieve Case Sensitivity

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.

Progress0 of 0 lessons

Keywords and Reserved Words

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.

text
1
2
3
4
job 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 and Labels

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.

Case behavior summary
ElementCompiler case handlingShop standard
Keywords (IF, JOB)Generally case-insensitiveUPPERCASE
Your field namesGenerally case-insensitivemixedCase or lowercase
Literals in quotesExact characters preservedMatch data file encoding
UNIX macro filesCase-sensitive filesystemMatch exact file name case
JCL DD namesExternal to EasytrieveFollow z/OS conventions

Broadcom Best Practice: Avoid Uppercase English Words

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.

Literals and Data Comparisons

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.

text
1
2
3
IF DEPT-CODE EQ 'ACC' * matches ACC only—not acc or Acc unless data already matches END-IF

Platform and Collating Differences

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.

  • z/OS batch: EBCDIC data, typically uppercase business text in legacy files.
  • UNIX/Windows Easytrieve: ASCII literals assumed without mainframe conversion.
  • Macro invocation on UNIX: %TEST loads TEST.mac, not test.mac.
  • Portable code avoids relying on collating quirks tied to one platform.

ISPF and Editor Display

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.

Case in Report and DISPLAY Output

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.

Migration Checklist

  1. Audit field names against new 11.6 reserved words regardless of case.
  2. Verify macro file name case on UNIX build servers.
  3. Compare sample file data case to literal comparisons in IF statements.
  4. Re-sort INSTREAM tables for target platform collating sequence.
  5. Document team standard: keywords UPPER, identifiers mixed or lower.

Common Case-Related Mistakes

  1. Assuming IF matches 'ABC' to abc in file data without verification.
  2. Naming fields with reserved English words in uppercase—TOTAL, COUNT, SET.
  3. Macro not found on UNIX because test.mac was coded but file is TEST.mac.
  4. Mixing uppercase keywords with lowercase fields inconsistently across modules.
  5. Expecting Java-style strict case sensitivity for all Easytrieve symbols.

Explain It Like I'm Five

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.

Exercises

  1. Rewrite a paragraph of source using uppercase keywords and mixed-case field names.
  2. List three reserved words that would be risky as uppercase field names.
  3. Explain why 'Yes' and 'YES' are different literals.
  4. Describe UNIX macro filename case sensitivity in one sentence.
  5. Propose a naming standard for a team of ten Easytrieve developers.

Quiz

Test Your Knowledge

1. Easytrieve reserved keywords are typically documented as:

  • Uppercase
  • Lowercase only
  • Case-sensitive on z/OS
  • Random case

2. Broadcom recommends field names use:

  • Mixed or lowercase to avoid future reserved word clashes
  • ALL UPPERCASE only
  • All numeric
  • No letters

3. On UNIX, macro file names are:

  • Case-sensitive—TEST.mac differs from test.mac
  • Always uppercase
  • Ignored
  • Same as z/OS

4. Alphanumeric literal comparison to a field:

  • Depends on field type and collating sequence
  • Always ignores case
  • Always case-sensitive on all platforms
  • Uses JCL CLASS

5. Coding job instead of JOB:

  • Usually accepted as the same keyword
  • Always a syntax error
  • Creates a new field
  • Only valid in comments
Published
Read time12 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve 11.6 best practices and platform considerationsSources: Broadcom Easytrieve Report Generator 11.6 TechDocs, Using Best Practices, Multiple Platform ConsiderationsApplies to: Easytrieve keyword, identifier, and platform case behavior