Easytrieve Greater Than Operator (>)

Greater than tests whether the left value exceeds the right—IF GROSS > LIMIT flags high earners, IF HOURS > 40 drives overtime review, IF BALANCE > 0 includes only positive accounts. Broadcom Getting Started and report tutorials use IF GROSS GT 0 before PRINT to skip zero-pay lines. Symbolic > and keyword GT express the same strict ordering relation. Strict greater excludes equality: IF AGE > 65 passes sixty-six but fails when AGE is exactly sixty-five; use >= for senior eligibility including sixty-five. Numeric greater compares magnitude with implied decimals. Alphabetic greater follows collating sequence. Beginners invert > and < in limit checks or use > when policy means at least—should be >=. This page teaches syntax, GT equivalence, overtime and cap patterns, field-to-field ceiling tests, arithmetic interaction, THRU contrast, and validation approaches for threshold-driven Easytrieve batch jobs.

Progress0 of 0 lessons

Basic Syntax

Greater than appears in conditional expressions: IF AMOUNT > 1000, IF DATE > CUTOFF, IF SCORE > PASS-LEVEL. True when left operand orders after right. False when equal or less.

text
1
2
3
4
5
6
7
8
JOB INPUT PERSNL IF GROSS > 0 PRINT PAY-RPT END-IF IF OT-HOURS > 0 PRINT OVERTIME-RPT END-IF

> Versus GT

Greater than operator forms
FormExampleAt equality
Symbolic >IF AMT > 100
Keyword GTIF AMT GT 100
Symbolic >=IF AMT >= 100
Keyword GEIF AMT GE 100

Numeric Greater Than

Currency IF GROSS > 50000 selects high earners above fifty thousand dollars at field scale. Credit IF BALANCE > CREDIT-LIMIT flags over-limit accounts. Percent IF RATE > MAX-RATE triggers compliance review. Negative numbers: IF LOSS > -100 is true for -50 because -50 exceeds -100 on the number line. Compare packed fields at implied decimal— 100.01 > 100.00 at P 2. Validate FILE numerics before compare on untrusted extracts.

Overtime and Hours Threshold Pattern

IF TOTAL-HRS > 40 is classic overtime detection when TOTAL-HRS includes regular plus overtime components. IF REG-HRS > 40 tests regular hours only—business rule picks field. Strict forty means exactly forty hours does not print—some contracts use >= 40 for at-least-forty triggers. Document boundary choice in program header comments for labor auditors.

text
1
2
3
4
JOB INPUT TIME IF REG-HRS + OT-HRS > STD-HRS PRINT OT-EXCEPTION END-IF

Alphabetic Greater Than

IF LAST-NAME > S selects names collating after S. Range reports sometimes combine IF CODE > M AND CODE < T for band between M and T exclusive of endpoints—mind strict boundaries versus THRU inclusive ranges. ZIP or region codes stored alphabetic compare as character strings not integers—IF ZIP > 50000 as alphabetic differs from numeric five thousand interpretation.

Field-to-Field Ceiling Tests

IF ACTUAL > BUDGET overspend. IF CLAIM > POLICY-MAX insurance exception. IF TEMP > THRESHOLD environmental alert when sensor FILE feeds Easytrieve validation job. Both fields must represent same measurement unit and compatible types.

Greater Than With Arithmetic

IF GROSS + BONUS > LIMIT evaluates sum before compare. IF A > B * C multiplies before test. Parentheses clarify: IF (BASE + ADJ) > CAP. See order of evaluation when mixing arithmetic and relational operators in one condition.

Strict Greater Versus THRU Upper Bound

IF SCORE GT 90 selects above ninety excluding ninety itself. IF SCORE EQ 90 THRU 100 includes top band with endpoints. Policy saying over ninety maps to > 90 or GT 90. Policy saying ninety or above maps to >= 90 or GE 90—not the same test.

Positive Filter Pattern

IF GROSS GT 0 from Broadcom samples ensures only paying employees appear on listing—zero and negative gross excluded. Simpler than IF GROSS NE 0 when only positive values exist in business data; negative gross would pass NE but fail GT 0—choose operator matching data quality rules.

Common Greater Than Mistakes

  • Using > when policy includes equals—need >=.
  • Inverting > and < on limit checks.
  • Comparing alphabetic codes as numbers without conversion.
  • Wrong literal decimal scale on P 2 comparison.
  • Mixing > and GT without convention.
  • Assuming sorted file required for simple threshold IF.

Explain It Like I'm Five

Greater than means bigger or comes later in line. Ten is greater than five. If the rule says only kids taller than four feet may ride, exactly four feet is not taller—it is equal height—so strict greater than says wait until you are a tiny bit over. The computer checks is your number bigger than the limit number? For letters it uses its alphabet line order to decide who comes after whom.

Exercises

  1. Write IF GROSS > 0 filter matching Broadcom positive pay pattern.
  2. Contrast IF HRS > 40 with IF HRS >= 40 for overtime policy.
  3. Write IF ACTUAL > BUDGET field-to-field overspend test.
  4. Combine IF CODE > M AND CODE < T for open interval band.
  5. Rewrite IF AMT GT 500 using symbolic > only.

Quiz

Test Your Knowledge

1. IF GROSS > LIMIT means:

  • GROSS exceeds LIMIT
  • GROSS equals LIMIT
  • Assign LIMIT to GROSS
  • GROSS is below LIMIT

2. GT is:

  • Keyword greater than
  • Generate table
  • Grand total only
  • Get text

3. IF HOURS > 40 detects:

  • Overtime above forty hours
  • Exactly forty hours
  • Under forty hours
  • Zero hours only

4. Broadcom filtered report sample uses IF GROSS GT 0 to:

  • Include positive pay amounts
  • Exclude all pay
  • Sort the file
  • Define FILE

5. IF A > B compares:

  • Ordering of two values
  • String concatenation
  • Assignment
  • MOD remainder
Published
Read time15 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve 11.6 symbolic > greater than in conditional expressionsSources: Broadcom Easytrieve Report Generator 11.6 Getting Started, Language Reference relational operatorsApplies to: Easytrieve greater than operator (>)