Home › Learn IBM i › RPG Programming Guide
This guide groups every AS400Decoded RPG tutorial by topic so you can find the lesson you need quickly. If you would rather learn in order, follow the RPGLE Learning Path, which sequences the same lessons from beginner to advanced.
The core lessons use modern fully free RPGLE and explain legacy fixed-format code when you are likely to meet it in existing programs.
Prefer a guided order? Follow the RPGLE Learning Path: Beginner to Advanced.
Getting Started with RPGLE
- RPGLE for Beginners: A Practical IBM i Learning Path
- What RPGLE Is and Where It Fits on IBM i
- RPGLE Source Members, Compilers, and Build Flow
- RPGLE Specifications: Fixed, Free, and Fully Free
- RPGLE Development Environments and Tooling Basics
Program Structure
- How to Read an RPGLE Program From Top to Bottom
- RPGLE Naming Conventions and Code Organization
- RPGLE Program Structure Explained
- RPGLE Control Specifications and Compiler Directives
- RPGLE Input and Output Specifications Explained
- RPGLE Calculation Specs and Logic Blocks
- RPGLE Indicators and Status Flags
- RPGLE Source Layout and Readability
Variables, Data Types, and Data Structures
- RPGLE Variables and Storage Types
- RPGLE Data Types, Lengths, and Precision
- RPGLE Data Structures Explained
- RPGLE Constants and Literals
- RPGLE Passing Data by Value and by Reference
- RPG Data Structures in Depth: LIKEDS, Qualified DS, Template Data Structures, DS Arrays, EXTNAME, and LIKEREC in ILE RPG on IBM i
Conditions and Decisions
- RPGLE IF, ELSE, and ELSEIF Decisions
- RPGLE Select and When Logic
- RPGLE Nested Decisions and Guard Clauses
- RPGLE Boolean Logic and Comparison Patterns
Loops
- RPGLE DO Loops Explained
- RPGLE DOU Loops Explained
- RPGLE DOW Loops Explained
- RPGLE LEAVE, ITER, and Loop Control
Arrays
Procedures, Modules, and Service Programs
- Subprocedures and Service Programs in RPGLE: write once, call everywhere
- IBM i Modules, Bound Programs, and Binding Directories Explained
- IBM i Activation Groups and Call Stack Explained
- Build an ILE RPG Service Program: NOMAIN Source, Binder Language, CRTSRVPGM and UPDSRVPGM in 2026
- IBM i ILE Binding, Activation Groups, and Service Programs in 2026: BNDDIR, CRTPGM, NEW vs CALLER, and Designing for Reuse
Embedded SQL, Screens, and Stream Files
- Embedded SQL in RPGLE: query your data the way you think about it
- IBM i RPG Subfile Programming: SFLCTL, SFLPAG, SFLDSP, Loading Records, Paging, and Cursor Positioning in 2026
- IBM i Display Files and 5250 UX Modernisation in 2026: DDS, Subfiles, RPG Screen I/O, and Modern Web Front-Ends
- IFS Stream File I/O from RPG on IBM i: Qp0lOpen, Qp0lRead, Qp0lWrite, Open Flags, CSV File Generation, and Config File Parsing in 2026
Built-in Functions in Practice
- ILE RPG String Handling: %SCAN, %SUBST, %REPLACE, %TRIM, VARCHAR Fields, Delimited Parsing, and CCSID-Safe String Operations on IBM i in 2026
- ILE RPG Date, Time, and Timestamp Handling: %DATE, %DIFF, %ADDUR, %SUBUR, Format Conversion, and CEE Date APIs on IBM i in 2026
Error Handling and Debugging
- Error handling in RPG: building programs that fail gracefully
- Debugging RPG programs: the ILE debugger, source-level debugging, and reading dumps
Modern and Advanced RPG
- Free-format RPG: A practical guide for intermediate developers
- RPG in 2026: Modern Free-Format RPG IV, Prototyped Procedures, SQL Integration, and What Current RPG Actually Looks Like
- Advanced ILE RPG in 2026: System Pointers, IBM i OS APIs, Dynamic Program Calls, and User Spaces
- RPG Unit Testing with RPGUnit in 2026: Writing Test Cases for ILE RPG Service Programs, Test Suites, and CI Integration
RPGLE Quick Reference
Lookup pages for syntax and edge cases, when you know what you need and want the answer fast.
Built-in Functions
- RPGLE Built-in Functions Reference
- RPGLE String BIFs Reference
- RPGLE %SCAN and %SCANRPL Reference
- RPGLE %SUBST Reference
- RPGLE Numeric and Conversion BIFs Reference
- RPGLE Date and Time BIFs Reference
- RPGLE Array and List BIFs Reference
- RPGLE File and Error BIFs Reference
Opcodes and File I/O
- RPGLE Opcode Reference
- RPGLE Control-Flow Opcodes Reference
- RPGLE File I/O Opcodes Reference
- RPGLE CHAIN Opcode Reference
- RPGLE SETLL and SETGT Opcode Reference
- RPGLE READ, READE and READP Opcode Reference
- RPGLE UPDATE, WRITE and DELETE Opcode Reference
- Fixed-Format to Free-Format Opcode Mapping
ILE Modules, Service Programs and Binding
- RPGLE Service Programs Reference
- RPGLE Modules and NOMAIN Reference
- RPGLE Binder Language and Signatures Reference
- RPGLE Binding Directories Reference
- RPGLE Activation Groups Reference
- CRTRPGMOD Command Reference
- CRTBNDRPG Command Reference
- CRTPGM Command Reference
- CRTSRVPGM Command Reference
- UPDSRVPGM and DSPSRVPGM Command Reference
The full index is the IBM i Developer Reference.
Planned Topics
These topics are on the writing plan for this guide:
- Native file operations: READ, CHAIN, SETLL, and READE
- Prototypes and procedure interfaces
- Record locks and commitment control in RPG programs
Browse the Archive
See every post filed in the RPG Programming category, newest first.