Easytrieve Deprecated Constants and Legacy Patterns

Deprecated does not always mean removed. In Easytrieve shops, deprecated constant patterns are idioms that compiled years ago but mislead maintainers on Broadcom 11.6: field names that became reserved words, report exits renamed between product lines, figurative constants applied to the wrong field types, and EOF tests in automatic JOB loops. Some legacy IBM documentation references BEFORE-DETAIL, FIRST-DETAIL, and POST-BREAK while Broadcom emphasizes BEFORE-LINE and field-class BREAK tests. This page catalogs patterns to retire, explains why they fail or confuse, and gives modern replacements aligned with current Language Reference material. Use it during migration, code review, and beginner training so new programmers do not copy fragile macros from retired manuals.

Progress0 of 0 lessons

Reserved-Word Collisions on Former Field Names

The most common compile failure after upgrade is not a removed ZERO synonym—it is a field or report title that equals a new reserved word. Broadcom migration lists include HIGH-VALUES, LOW-VALUES, SET, GRAPH, EXECUTE, BREAK-LEVEL, LOGICAL-RECORD, and others. Rename data fields; keep figurative constants only in IF and MOVE positions where syntax expects them.

Legacy field names that became reserved
Legacy field nameProblemSafer name
HIGH-VALUESConflicts with figurative constantHI-VALUE-FLAG or MAX-SENTINEL
LOW-VALUESConflicts with figurative constantLO-VALUE-FLAG or MIN-SENTINEL
SETReserved wordSET-CODE or SET-SW
GRAPHReserved wordGRAPH-DATA or CHART-VAL
NULLReserved in NULL tests and MOVENULL-FLAG only if not SQL nullable field

Deprecated Report Exit Names

IBM MU documentation pairs FIRST-DETAIL with BEFORE-DETAIL. CA-Easytrieve Plus examples in older binders use BEFORE-LINE extensively. Treat BEFORE-DETAIL as deprecated naming when targeting Broadcom 11.6 unless your compile proves otherwise. Map logic to BEFORE-LINE for detail-line decoration and BEFORE-BREAK for total-line preparation.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
* Legacy pattern (IBM style) — verify on your compiler BEFORE-DETAIL. PROC IF FIRST-DETAIL DISPLAY 'FIRST DETAIL LINE' END-IF END-PROC * Broadcom 11.6 style BEFORE-LINE. PROC IF FIRST-DETAIL DISPLAY 'FIRST DETAIL LINE' END-IF END-PROC

If FIRST-DETAIL itself fails compile, replace with equivalent LEVEL and page-break detection per your release manual or use DTLCTL FIRST for control-value repetition only.

Deprecated EOF Patterns in Automatic Input

IF EOF PAYFILE inside automatic JOB INPUT expecting to process the last record differently is a logic error on modern Broadcom. Automatic retrieval ends the JOB cycle and invokes FINISH when no next record exists. Use FINISH procedure for trailer logic. Use controlled GET loops only when you truly manage retrieval yourself.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
* Deprecated for automatic input JOB INPUT PAYFILE IF EOF PAYFILE DISPLAY 'DONE' END-IF * Preferred JOB INPUT PAYFILE FINISH DONE-PROC PRINT PAY-RPT DONE-PROC. PROC DISPLAY 'DONE' END-PROC

Unsafe Figurative Constant Misuse

These patterns were never correct but persist in copied macros. Treat them as deprecated in reviews even if they compile.

  • MOVE HIGH-VALUES to packed amount fields expecting largest valid number.
  • MOVE LOW-VALUES to character fields expecting blanks.
  • IF NAME ZERO on all-blank alphabetic names instead of IF NAME SPACES.
  • Arithmetic on fields after MOVE LOW-VALUES into packed columns.
  • Assuming DUPLICATE searches entire file without sort on key.

Deprecated NULL Substitutions

Pre-SQL batch habits die hard: moving spaces or zeros into nullable columns to mean missing. Broadcom distinguishes MOVE NULL, MOVE SPACES, and MOVE ZERO with different indicator results. Export layouts that flatten NULL to spaces without a parallel flag are deprecated for regulated data because auditors cannot reconstruct unknown values.

Replace deprecated null handling
Deprecated approachModern approach
MOVE SPACES to mean missing phoneMOVE NULL TO PHONE on nullable field
IF PHONE SPACES for SQL nullIF PHONE NULL
Arithmetic with unchecked nullable amountIF AMT NULL branch before SUM
Flat file with spaces onlyParallel NULL-IND flag column

Obsolete Spellings and Style

ZERO, ZEROS, and ZEROES remain valid synonyms—not deprecated. What is deprecated is mixing all three in one application without style rules. SPACE versus SPACES likewise remains valid. Document one spelling per constant family in coding standards. Deprecated style is inconsistency that breaks grep-based audits during Y2K-style migrations.

Hard-Coded Hex Instead of Figurative Constants

Old programs used VALUE X'FFFFFFFFFFFFFFFF' instead of MOVE HIGH-VALUES. Functionally similar on fixed-length fields but deprecated for maintainability because length changes require editing every literal. Figurative constants expand to receiver length automatically. Mark hard-coded all-FF patterns for refactor when touching modules.

Research Log for Uncertain Constants

When release documentation is ambiguous, append an entry to a shop research log rather than guessing in production source. Include constant name, sample program, compile listing snippet, runtime result, and Broadcom case or manual section if available. This tutorial series defers uncertain edge cases to that log per project checklist rules.

text
1
2
3
4
5
6
# EASYTRIEVE_CONSTANT_RESEARCH.log (example entry) # Date: 2026-07-12 # Topic: FIRST-DETAIL on Broadcom 11.6 LPAR TEST1 # Result: Compiles in BEFORE-LINE; behavior matches IBM doc # Action: Update shop standard to prefer BEFORE-LINE label # Reference: IBM MU reserved keywords; Broadcom 11.6 BEFORE-LINE

Migration Replacement Summary

  1. Rename fields colliding with new reserved words.
  2. Move automatic-input EOF branches into FINISH procedures.
  3. Replace BEFORE-DETAIL labels with BEFORE-LINE when required.
  4. Use correct figurative constant for data type—SPACE, ZERO, HIGH, LOW.
  5. Adopt IF NULL and MOVE NULL for SQL nullable columns.
  6. Sort before DUPLICATE logic; do not scan whole file.

Common Review Findings

  1. Macro copied from 1990s binder still uses BEFORE-DETAIL.
  2. Field named SET prevents compile after 11.6 upgrade.
  3. LOW-VALUES normalized to spaces without exception report.
  4. NULL amounts exported as zero in regulatory feeds.
  5. DUPLICATE counts on unsorted input producing false negatives.

Explain It Like I'm Five

Deprecated patterns are old rules that do not work with the new teacher. Maybe you named your toy box HIGH-VALUES but now that is a magic word only the teacher can say. Maybe you kept raising your hand for another card when the game automatically stops and calls FINISH. We replace old rules with new ones that match the current rulebook.

Exercises

  1. Find a reserved-word collision in sample legacy source and propose renames.
  2. Rewrite automatic JOB EOF logic using FINISH.
  3. List three unsafe figurative constant misuses and corrections.
  4. Draft a research-log entry for an uncertain FIRST-DETAIL test.
  5. Compare deprecated NULL-as-spaces export with flagged export design.

Quiz

Test Your Knowledge

1. Using HIGH-VALUES as a field name after upgrade fails because:

  • HIGH-VALUES became a reserved figurative constant keyword
  • HIGH-VALUES was removed from the language
  • Only JCL can use HIGH-VALUES
  • Packed decimal forbids keywords

2. A deprecated pattern is:

  • Testing EOF on automatic JOB INPUT expecting a final iteration
  • MOVE ZERO to numeric counters
  • IF GROSS NOT ZERO before PRINT
  • CONTROL REGION on reports

3. Legacy BEFORE-DETAIL examples should be reviewed for:

  • Replacement with BEFORE-LINE on Broadcom 11.6
  • Deletion of all report procedures
  • Conversion to JCL
  • Removal of CONTROL statements

4. Treating LOW-VALUES as blank spaces is:

  • Unsafe—bytes differ from EBCDIC space
  • Recommended for all character fields
  • Required by Broadcom
  • Same as MOVE SPACES

5. Replacing NULL with spaces in SQL extracts without documentation is:

  • Deprecated practice—loses unknown-value semantics
  • Required by Broadcom
  • Identical to MOVE NULL
  • Needed for every numeric field
Published
Read time14 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom 11.6 migration reserved words; IBM legacy report keywordsSources: Broadcom 11.6 Symbols and Reserved Words, Release Notes, IBM Easytrieve keywords, CA migration guidesApplies to: Deprecated Easytrieve constant and figurative patterns