RPGLE Arrays and Tables
Learn how fixed-size RPGLE arrays use DIM, one-based subscripts, and %ELEM to store and process ordered values safely.
Learn how fixed-size RPGLE arrays use DIM, one-based subscripts, and %ELEM to store and process ordered values safely.
Use RPGLE LEAVE and ITER correctly: exit a loop immediately, skip the rest of the current iteration, and keep loop-control paths easy to trace.
Learn how pre-test RPGLE DOW loops evaluate their while-condition before the body runs, why the body can execute zero times, and how to trace DOW iterations correctly.
Learn how post-test RPGLE DOU loops run their body first, evaluate the until-condition at ENDDO, and guarantee at least one execution.
Learn how counted RPGLE DO loops initialize an index, repeat a controlled block, advance through an inclusive limit, and avoid boundary mistakes.
Learn how RPGLE comparison operators and AND/OR logic build boolean conditions, how precedence and grouping actually work, and how to keep compound conditions readable.
Learn how RPGLE guard clauses and early exits can flatten nested conditions, expose the main path, and make procedure logic easier to verify.
Learn how RPGLE SELECT, WHEN, OTHER, and ENDSL express readable multi-branch decisions, with ordered evaluation and practical business examples.
Learn how RPGLE IF, ELSEIF, ELSE, and ENDIF choose one-way, two-way, and ordered decision paths through practical business examples.
Learn what RPGLE’s default (reference-style) parameter passing, VALUE, and CONST actually do to caller storage, with before/after worked examples and a scalar-versus-data-structure comparison.