Easytrieve Function Categories Index

Easytrieve built-ins are easier to learn when grouped by job task rather than alphabet. Need a report header date? Open the date category. Need absolute variance? Open numeric. Need to strip trailing spaces? Open string—even when the answer is INDEX loops rather than a TRIM function. This index maps ten Broadcom-style families to tutorial pages in this section. Each category page lists representative functions, macros, and procedural fallbacks, explains Report Generator versus Easytrieve Plus differences, and links forward to per-function depth as those pages are published. Beginners arriving from COBOL FUNCTION or SQL should expect a smaller native catalog and more overlay or macro patterns. Production programmers should bookmark this page as the routing table before grep-searching a three-thousand-page Application Reference cold.

Progress0 of 0 lessons

How to Use This Index

Pick a category row below when you know the problem domain. Read that category index for function names, syntax patterns, and alternatives. Return here when a search fails—your need may span categories. Date formatting sometimes lives under conversion; sign tests under numeric; page numbers under report. Cross-links on each category page show related families.

  1. Identify task type—text, calendar, number, display, validation, I/O, environment, report.
  2. Open matching category tutorial from the table below.
  3. Confirm function or macro name against your site Application Reference.
  4. Compile a one-line test before embedding in production JOB logic.
  5. If no built-in exists, follow fallback pattern documented in that category.

Complete Category Map

Ten function families and tutorial entry points
CategoryTypical tasksRepresentative capabilitiesTutorial path
StringExtract, case change, scan, length, padOverlay, INDEX, LCase$/UCase$ (R2SCRIPT), STRSRCH macro/functions/string
DateCurrent date, validation, date mathSYSDATE, SYSDATE-LONG, %DATECALC, %DATEVAL/functions/date
NumericSign, absolute value, min/max, roundingABS, MIN, MAX, INTEGER on assignment/functions/numeric
MathRoots, powers, logarithms**, SQRT where documented, arithmetic expressions/functions/math
ConversionType change, radix, packed displayAssignment promotion, EDIT to display/functions/conversion
FormattingPicture masks, report column layoutMASK on DEFINE, EDIT patterns/functions/formatting
TestingNumeric class, blank detectionIF comparisons, procedural validators/functions/testing
FileStatus, sequence, file metadataFILE statement context, error PROC patterns/functions/file
SystemJob time, user id, environmentSYSDATE-LONG, SYSUSERID constant, TIME patterns/functions/system
ReportPage, line, report writer aidsTITLE literals, control break helpers/functions/report

String Category

String work in classic Report Generator relies heavily on Library overlay fields—MONTH as two bytes inside DATE-OF-BIRTH—and INDEX with OCCURS 1 A for byte walks. Easytrieve Plus and R2SCRIPT add LCase$, UCase$, and Command$ for script tooling. Legacy STRSRCH macro from release 6.4 may be copied to 11.x for character search but is third-party and unsupported. Choose string category when parsing delimited files, trimming trailing spaces, or building concatenated messages. Expect procedural code more often than one-call builtins.

Date Category

SYSDATE returns current system date for headers and audit stamps. SYSDATE-LONG extends precision for timestamp-style values per release documentation. Date arithmetic often uses %DATECALC macro to add or subtract days; %DATEVAL validates date strings before compare. Overlay MONTH DAY YEAR on numeric date fields avoids function calls when layout is fixed. Choose date category for cycle cutoffs, age calculations, and period headers—always align internal format before IF compares.

Numeric and Math Categories

Numeric category covers ABS for variance, MIN and MAX for bounds, sign handling on currency, and INTEGER ROUNDED TRUNCATED modifiers on assignment statements. Math category extends to exponentiation with ** and documented roots like SQRT on Plus installations. Payroll jobs live mostly in numeric; statistical jobs touch math. Implied decimal on P fields propagates through expressions—define receiving fields with correct scale.

text
1
2
3
WS-VAR = ABS(BUDGET - ACTUAL) WS-CAP = MIN(REQUEST, LIMIT) WS-POW = BASE ** 2

Conversion and Formatting Categories

Conversion moves data between types—character digits into N fields, packed into display via assignment rules, binary into printable form. Formatting applies MASK on DEFINE or EDIT strings so SYSPRINT and report columns show commas, decimals, and sign placement. Conversion answers what is stored; formatting answers what the operator reads. Errors in conversion surface as runtime data exceptions; formatting errors show misaligned columns on paper.

Testing Category

Testing validates before compute—numeric class checks, blank detection, range membership. Classic code uses IF with relational operators and procedural loops when no NUMERIC() function exists. Data quality pipelines route bad records to exception files. Testing category links to patterns that gate MOVE and arithmetic on untrusted input fields from external partners.

File, System, and Report Categories

File category documents runtime file context—status after READ, name resolution, multi-file sequencing—in error PROCs and audit logic. System category covers job environment values such as SYSUSERID and time stamps for headers. Report category ties to report writer—page numbers, line counts, break state—in TITLE and LINE expressions. Batch operators depend on these for traceable spool output without hard-coded job names.

Report Generator Versus Easytrieve Plus

Catalog expectations by product level
AspectReport GeneratorEasytrieve Plus
String builtinsOverlay, INDEX, MOVE primaryExpanded Application Reference index
DateSYSDATE, macros commonAdditional date functions per release
Numeric/mathABS, operators, assignment modifiersBroader math function set
DiscoveryProgramming Guide + macrosApplication Reference function index

Choosing Category Versus Statement

Functions compute inside expressions. Statements—MOVE, FILE, SORT—drive flow and I/O. When task is copy field to field, MOVE may beat a function. When task is compute absolute variance, ABS inside assignment wins. When task is read next record, no function replaces JOB INPUT. Misclassification sends beginners hunting functions for problems statements already solve cleanly.

Per-Function Pages Roadmap

This index and category pages provide family-level depth. EASYTRIEVE_PAGES checklist calls for individual pages per function with purpose, syntax, arguments, return type, performance, examples, mistakes, alternatives, and edge cases. As those pages publish, category indexes will link to them by name. Until then, category pages list representative names and fallback patterns sufficient for beginner production work.

Common Category Routing Mistakes

  • Searching math category for string trim—use string and INDEX patterns.
  • Assuming SQL function names exist unchanged in Easytrieve.
  • Using conversion when formatting alone is needed for display.
  • Ignoring macros such as %DATECALC when date functions are absent.
  • Skipping site manual because a web example used Plus-only names.
  • Calling system functions per record when once-per-job suffices.

Explain It Like I'm Five

This page is the map of toy boxes. One box has letter toys for words and names. One has calendar toys for birthdays and today. One has number toys for bigger-smaller and plus-minus. One has ruler toys for measuring. You look at the map first, walk to the right box, then pick the exact toy. If your box does not have the toy you wanted, the map shows another way to build it with blocks you already have.

Exercises

  1. Route absolute variance check to the correct category and name one capability.
  2. Route trailing-space removal to string category and name fallback pattern.
  3. Route pay period header date to date category and name two SYSDATE-related items.
  4. Explain difference between conversion and formatting categories with one example each.
  5. List three steps before using a Plus-only function name in production.

Quiz

Test Your Knowledge

1. You need to format today's date for a report title. Start at:

  • Date functions index
  • File functions index
  • Math functions index
  • JCL only

2. ABS and MIN belong to which category?

  • Numeric functions
  • String functions
  • Report functions
  • File functions

3. When no built-in substring function exists, fall back to:

  • Field overlay and INDEX loops
  • SQL only
  • Cannot process strings
  • REPORT TITLE only

4. Function availability differs between sites because:

  • Product level and release vary
  • All sites identical
  • Functions are JCL-only
  • Functions compile away

5. EDIT masks and display conversion appear in:

  • Formatting and conversion categories
  • System functions only
  • Operators section
  • SCREEN section only
Published
Read time16 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve function family taxonomy; site catalogs vary by product levelSources: Broadcom EZT Plus Application Reference, Easytrieve Report Generator 11.6 Programming GuideApplies to: Easytrieve built-in function category navigation