Less than compares ordering: is the left value smaller than the right? Payroll uses it for threshold checks—IF GROSS < MINIMUM-WAGE triggers exception reports. Inventory jobs test IF ON-HAND < REORDER-POINT before PRINT replenishment lists. The symbolic < operator parallels keyword LT from Broadcom manuals. Strict less than excludes equality: IF SCORE < 60 fails when SCORE is exactly sixty; use <= when passing scores include the boundary. Numeric comparisons use numeric magnitude with implied decimals. Alphabetic comparisons use collating sequence—on z/OS typically EBCDIC ordering where space and punctuation sort before letters depending on code page. Beginners confuse < with assignment or treat alphabetic compare as case-insensitive English sorting without verifying site rules. This page teaches syntax, LT equivalence, field-to-field limits, interaction with arithmetic in conditions, THRU contrast, sort-order assumptions, and testing patterns for limit-driven batch logic.
Less than appears between operands in conditions: IF AGE < 18, IF BALANCE < 0, IF EFF-DATE < CUTOFF-DATE. Evaluates true when left operand orders before right. False when equal or greater. Use inside IF ELSE-IF DO WHILE blocks.
12345678JOB INPUT PAYROLL IF GROSS < MIN-WAGE PRINT UNDERPAY-RPT END-IF IF HOURS < STD-HOURS PRINT PART-TIME-RPT END-IF
| Form | Example | Boundary behavior |
|---|---|---|
| Symbolic < | IF AMT < 100 | |
| Keyword LT | IF AMT LT 100 | |
| Symbolic <= | IF AMT <= 100 | |
| Keyword LE | IF AMT LE 100 |
Packed P 2 currency compares by monetary value: 99.99 < 100.00 is true. Negative numbers order below positive: IF BALANCE < 0 detects overdraft. IF TAX < FLOOR-TAX compares two fields—both must share compatible numeric types. Implied decimal alignment matters: P 2 value 1.50 < N 3 literal 200 compares converted values per product rules—test edge cases in development. Zero boundary: IF COUNT < 1 triggers when COUNT is zero but not when COUNT is one.
IF LAST-NAME < M selects names collating before letter M in the active sequence. EBCDIC differs from ASCII ordering—portable assumptions fail across platforms. Punctuation and spaces sort relative to letters per code page—IF CODE < 0 may treat digit zero differently than alphabetic A depending on type. Fixed-length fields compare full width including trailing spaces—shorter effective names still carry blanks that influence order. Case: lowercase versus uppercase position depends on collating table.
IF ACTUAL < BUDGET flags underspend. IF CURR-DATE < EXPIRE-DATE finds active records when dates stored in comparable internal formats—see internal date representation page when FILE dates use special packed layouts. IF SALES < QUOTA drives commission exception lists. Both operands should represent same unit—comparing hours to dollars with < is a logic bug even when compiler accepts types.
123456DEFINE MIN-WAGE W 5 P 2 VALUE 7.25 JOB INPUT PAYROLL IF GROSS < MIN-WAGE PRINT WAGE-EXCEPTION END-IF
IF REG-HRS + OT-HRS < STD-HRS sums before compare—addition binds tighter than < per order of evaluation. IF (BASE + BONUS) < CAP groups subexpression. IF A < B + C evaluates right side sum first. Parentheses document intent for auditors reading procedural code during compliance reviews.
IF AGE < 18 selects everyone below eighteen with no lower bound stated—includes zero and negatives if present. IF AGE EQ 13 THRU 17 selects closed interval. Combine for band gaps: IF AGE LT 13 OR AGE GT 17 handles outside teen band. Business rules written as under eighteen map directly to < 18; rules saying eighteen and under need <= 18.
IF STATUS <> A includes all statuses ordering after A and before A in collating sequence—not the same as IF STATUS < A which includes only values strictly before A. Numeric IF AMT <> 100 includes amounts above and below hundred; IF AMT < 100 only below. Pick operator matching policy language precisely.
Less than in IF does not require sorted input. Reports using CONTROL breaks need sorted keys but that is separate from < threshold tests. When IF KEY < PRIOR-KEY detects sequence violations, input should be ascending by KEY—validation pattern for file quality checks.
Less than means comes before on a number line or in the dictionary order the computer uses. Five is less than ten, so five stands to the left of ten. If the rule says kids under eighteen, the computer checks is your age number smaller than eighteen? Exactly eighteen is not smaller—it is equal—so strict less than says no unless the rule says eighteen or younger, which uses a different sign. Letters have an order too—whether A comes before B depends on the computer alphabet list for your mainframe.
1. IF AGE < 18 means:
2. LT is:
3. IF GROSS < LIMIT flags:
4. Alphabetic IF CODE < M orders by:
5. IF A < B < C style chaining: