New Chapter: RPGLE Operation Codes Guide

  • Home
  • /
  • Blog
  • /
  • New Chapter: RPGLE Operation Codes Guide

November 27, 2025

Welcome to the latest chapter of my IBM i RPGLE Operation Codes Guide. In my ongoing mission to document and clarify the wonderful IBM RPGLE language for new programmers, students and established old-school programmers looking for new styles of code (who says old dogs cant learn new tricks?!) I’m taking the IBM RPG Operation Codes and documenting them in the simplest way I can think of — listing them all and adding some hints, tips or comments along the way.

If you’ve ever wondered what makes RPG tick, this is where the magic happens. Operation codes are the little instructions that tell your program what to do, and now we’re going to look at them in a way that’s organized and easy to follow.

A Tale of Two RPGs

RPG400 (RPG III or fixed-format RPG IV): This is the old-school version where every character had to sit neatly in its assigned column. One slip and your code looked like a crossword puzzle.

RPGLE (RPG IV, free-format): The modern version that finally lets programmers breathe. You can write code that looks like code instead of a secret message hidden in columns 6 to 80.

How The New RPGLE Lesson Chapter Works

To keep things tidy, I’ve grouped the op-codes into categories such as arithmetic, file operations, and control flow. For each opcode, you’ll see:

Description: A short explanation of what it does.

Legacy RPG400 Example: Fixed-format code for those who like to reminisce.

Modern RPGLE Example: Free-format code using /FREE and /END-FREE or fully free in later versions.

New Chapter: RPGLE Operation Codes Guide 1

Examples are simplified. Assume that the usual background work (file definitions, variable declarations, prototypes) is already in place. In modern RPGLE, free-format starts with **FREE and uses dcl- keywords for declarations.

This chapter is here to make op-codes less intimidating and maybe even a little fun. By the end, you’ll see why free-format RPGLE feels like a breath of fresh air compared to its column-bound ancestor.

RPG Programming for Beginners

RPG is the well known programming language on the IBM i platform. Earlier versions of RPG ran on the old AS/400 and iSeries machines in decades gone by… the beauty of RPG is that it is fully backwards compatible. Over the years RPG has evolved massively and now looks like a completely different language. Dive into this course to learn the basics, review old column based RPG, and modernize samples right up to modern RPGLE and SQLRPGLE code standards.

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits.

Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day.

Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe NOW
7-day free trial

Take This Course with ALL ACCESS

Unlock your Learning Potential with instant access to every course and all new courses as they are released.
 [ For Serious Software Developers only ]

Online Learning for IBM i Software Technology Professionals

“The more that you read, the more things you will know. The more that you learn, the more places you’ll go.” – Dr. Seuss

>