← Back to all articles

// Category

RPG Programming

RPGLE, free-format RPG, subprocedures, and modern patterns for IBM i development.

RPGLE Arrays and Tables
Learn how fixed-size RPGLE arrays use DIM, one-based subscripts, and %ELEM to store and process ordered values safely.
RPGLE LEAVE, ITER, and Loop Control
Use RPGLE LEAVE and ITER correctly: exit a loop immediately, skip the rest of the current iteration, and keep loop-control…
RPGLE DOW Loops Explained
Learn how pre-test RPGLE DOW loops evaluate their while-condition before the body runs, why the body can execute zero times,…
RPGLE DOU Loops Explained
Learn how post-test RPGLE DOU loops run their body first, evaluate the until-condition at ENDDO, and guarantee at least one…
RPGLE DO Loops Explained
Learn how counted RPGLE DO loops initialize an index, repeat a controlled block, advance through an inclusive limit, and avoid…
RPGLE Boolean Logic and Comparison Patterns
Learn how RPGLE comparison operators and AND/OR logic build boolean conditions, how precedence and grouping actually work, and how to…
RPGLE Nested Decisions and Guard Clauses
Learn how RPGLE guard clauses and early exits can flatten nested conditions, expose the main path, and make procedure logic…
RPGLE Select and When Logic
Learn how RPGLE SELECT, WHEN, OTHER, and ENDSL express readable multi-branch decisions, with ordered evaluation and practical business examples.
RPGLE IF, ELSE, and ELSEIF Decisions
Learn how RPGLE IF, ELSEIF, ELSE, and ENDIF choose one-way, two-way, and ordered decision paths through practical business examples.
RPGLE Passing Data by Value and by Reference
Learn what RPGLE's default (reference-style) parameter passing, VALUE, and CONST actually do to caller storage, with before/after worked examples and…
RPGLE Constants and Literals
Learn the difference between an RPGLE variable, a named constant, and a literal, and how to use DCL-C, character/numeric/typed literals,…
RPGLE Data Structures Explained
Learn RPGLE data structure basics: declare typed subfields, use QUALIFIED access, reuse layouts with LIKEDS, and read simple nested structures.
RPGLE Data Types, Lengths, and Precision
Use RPGLE character, decimal, integer, date/time, and indicator types correctly by understanding what each declaration's length and precision mean.
RPGLE Variables and Storage Types
Declare RPGLE variables with DCL-S, and see how scope and storage type - automatic, static, and working storage - control…
RPGLE Source Layout and Readability
Organize fully free-form RPGLE with consistent sections, spacing, indentation, continuations, and comments that make program flow easier to review.
RPGLE Indicators and Status Flags
Learn how RPGLE indicators and status flags control legacy program flow, and how to map many patterns to clearer fully…
RPGLE Calculation Specs and Logic Blocks
Learn how legacy RPGLE C-specs express calculations and control flow, then map those responsibilities to clear, fully free-form RPGLE logic.
RPGLE Input and Output Specifications Explained
Beginner guide to traditional RPGLE input and output specifications, their relationship to records and fields, and the modern fully free-form…
RPGLE Control Specifications and Compiler Directives
Beginner guide to RPGLE compiler directives, the **free directive, ctl-opt, and program-wide control options.
RPGLE Program Structure Explained
Beginner guide to the major sections of a typical RPGLE program and why each section exists.
RPGLE Naming Conventions and Code Organization
Beginner guide to clearer RPGLE names, cleaner ordering, and easier-to-maintain code.
How to Read an RPGLE Program From Top to Bottom
Beginner guide to reading RPGLE source in the right order.
RPGLE Development Environments and Tooling Basics
Beginner guide to RPGLE editing tools and the edit, compile, diagnose, run workflow.
RPGLE Specifications: Fixed, Free, and Fully Free
Beginner guide to the three RPGLE source styles you will see in IBM i code.
RPGLE Source Members, Compilers, and Build Flow
Beginner guide to how RPGLE source becomes a compiled IBM i program object.
What RPGLE Is and Where It Fits on IBM i
Beginner guide to RPGLE terminology on IBM i.
RPGLE for Beginners: A Practical IBM i Learning Path
Beginner-friendly RPGLE pillar for IBM i.
RPG Data Structures in Depth: LIKEDS, Qualified DS, Template Data Structures, DS Arrays, EXTNAME, and LIKEREC in ILE RPG on IBM i
Master ILE RPG data structures: dcl-ds syntax, qualified data structures with dot notation, LIKEDS for cloning a structure, template data…
Source control for IBM i: managing your RPG and CL source with Git and RDi
Most IBM i shops still manage source the same way they did in the 1990s — members in source physical…
Debugging RPG programs: the ILE debugger, source-level debugging, and reading dumps
Every RPG developer eventually writes a program that does something it should not. The calculation is wrong. The loop runs…
Error handling in RPG: building programs that fail gracefully
Most RPG programs are written to handle the happy path. The file exists, the record is found, the calculation succeeds,…
Embedded SQL in RPGLE: query your data the way you think about it
You already know how to read files with READ and CHAIN. They work. But the moment your query involves a…
Subprocedures and Service Programs in RPGLE: write once, call everywhere
Subprocedures let you break logic into reusable blocks inside a single program. Service programs take it further — compile your…
Free-format RPG: A practical guide for intermediate developers
You already write RPG. Free-format does not replace what you know — it removes the straitjacket. No more counting columns,…