Language reference
IBM i shops running RPG II through RPG IV and ILE, with a distinct dialect history under one green-screen roof.
RPG (Report Program Generator) was introduced by IBM in 1959 for the IBM 1401, built to let punched-card tabulator operators move to computers without retraining from scratch. Its predecessor, FARGO (Fourteen-o-one Automatic Report Generation Operation), had done the same job for a narrower set of machines. Both replicated the tabulator's cyclic processing model, reading a card, summarizing it, and printing a result, which is why early RPG reads nothing like a general-purpose language: it was not built to be one.
RPG's defining feature, the program cycle, is inherited directly from punched-card machines: the runtime handles reading input and looping automatically, and the programmer fills in what happens to each record rather than writing the loop itself. That made it fast to write report-style business logic with minimal training, at the cost of looking foreign to programmers coming from any other language family. Later versions kept extending that same core into structured and eventually free-form syntax without ever fully discarding the cycle underneath it.
1959 · RPG
Original release for the IBM 1401, replacing punched-card tabulator workflows.
~1969 · RPG II
Shipped with the IBM System/3 and later System/32, /34, /36; added data structures and subroutines.
1978 · RPG III
Introduced with the IBM System/38; added structured constructs like IF-ENDIF blocks and DO loops.
1988 · RPG/400
Renamed version of RPG III for the newly launched AS/400, with new opcodes like SCAN, CAT, and XLATE.
1994 · RPG IV / ILE RPG
Released with OS/400 V3R2, introducing extended calculation specifications and full ILE integration with COBOL and C.
2001 · Free-form calculations
V5R1 added the /FREE directive, letting calculation specs drop fixed-column syntax.
2013 · Fully free-form RPG
V7R1 TR7 removed the need for /FREE markers, allowing entire programs in free-form syntax.
45,000+ companies
Organizations tracked as actively running IBM AS/400, iSeries, or IBM i worldwide.
ELP Data: IBM AS/400 Users List, 202510 million+ lines
Lines of RPG code IBM has fed into its Granite AI models to build RPG-aware development assistance.
IT Jungle: RPG Code Generation and the Agentic Future of IBM i, 20253.2% growth
IBM Power Systems hardware revenue growth in 2024, reaching 1.59 billion dollars, after years of decline.
IT Jungle, cited via 2025 IBM i market researchRPG (IBM i / AS/400) history and figures compiled from public sources, cited above. Corrections welcome.
Object not found. A referenced file, program, or object does not exist in the library named, or in any library on the current library list.
Check the library list (*LIBL) resolution order with DSPLIBL, confirm the object was not deleted, and confirm it is not sitting in a different environment's library than the one this job is pointed at.
File not found. The file named in the message does not exist in the library named, distinct from CPF9801 in that this one is specific to files rather than any object type.
Confirm the file was actually created and exists in the library the job expects, and check for a typo in the file name or library qualifier in the program or CL command.
Level check on file open. The record format ID for a file does not match the record format ID the program was compiled against. This usually means the file's field or key layout changed after the program was last compiled.
Recompile the program against the current file definition. If level checks already match in every environment you tested, check for a duplicate file earlier in the library list; a forum thread on Code400 traced exactly this cause when a batch job's library list picked up an older copy of the file before the current one.
Data mapping error on file operation. A PUT or UPDATE through a logical file hit a data mapping error, commonly from a GROUP BY view, a field with a default value, or a null value present in a record where the program does not expect one.
Check whether the logical file involves GROUP BY or joins that do not support the write operation attempted, and confirm the physical file's null-capable fields are being handled explicitly in the program.
Yes, RPG is still the primary business language on IBM i (formerly AS/400), with an installed base tracked at over 45,000 organizations worldwide.
RPG stands for Report Program Generator. It was designed in 1959 to replicate punched-card tabulator report generation on early IBM computers.
RPG IV, released in 1994, added extended calculation specifications and full integration with COBOL and C under ILE. Free-form RPG syntax, added starting in 2001, is part of RPG IV, not a separate version.
For a career in IBM i shops specifically, yes: demand for RPG skills consistently outpaces the number of programmers entering the field. It is a narrow but durable niche, not a general-purpose skill.
Mostly not physical terminals anymore; most 5250 sessions run through PC-based emulation software rather than dedicated green-screen hardware. But the interface itself, whether emulated or physical, is increasingly a separate decision from the RPG code behind it: modernization vendors sell products specifically to convert 5250 screens into browser-based interfaces while leaving the underlying application logic untouched.
Often small. Industry reporting has long put the average IBM i shop at around three programmer/analyst/administrator staff total, and it's not unusual for one person to be responsible for the RPG applications, the database, and system administration simultaneously. A trade-press piece in August 2026 specifically framed that concentration, not headcount by itself, as the real operational risk in a small IBM i shop.
No. Free-format has been available since 2001 and fully free since 2013, but shops with large existing fixed-format codebases don't rewrite working programs just to change their format. On an active RPG forum thread about the debate, one developer summed up the practical calculus directly: doing 80% maintenance on code that's already fixed-format isn't a reason to convert it to all-free any time soon.
IBM i skills availability, for the first time in nine years of Fortra's IBM i Marketplace Survey. It was cited by 69% of respondents in 2026, up from 60% in 2025, and it displaced cybersecurity from the top spot it had held every year since 2017.
RPG business logic can run behind a modern web front end without being rewritten. This is the core idea behind IBM's own description of RPG modernization: convert or replace the interface, add web and API access, and modularize the code, while the RPG logic underneath keeps doing the same job it always did.
Because the debate isn't really about which syntax IBM supports, it's about maintenance economics inside individual shops. New RPG development increasingly happens in free-format, since some newer operations only work fully there, but shops with decades of working fixed-format code have little incentive to convert it purely for style, which is why both styles coexist in practice rather than one replacing the other.
Real questions from public forum threads, with credit to who asked and who answered. Our answer restates the fix and links to the matching reference page where one exists.
Why do I get CPF4131 in batch when the level checks match everywhere I tested them?
Asked by dcutaia on Code400 forum, ongoing thread
“There is another copy of the file higher in the library list, used during the end-of-day process, that has a different level ID than the one being tested against on the command line.”
tomholden
If a level check passes interactively but fails in batch, the file itself is probably not the problem. Check the library list the batch job actually uses; a duplicate file sitting earlier in that list will get opened first, and it can easily have a different level ID than the copy you tested against.
Full reference page →Is free-format RPG actually easier to read than fixed-format, or is that just what people say?
Asked by rpgKnight on Code400 forum, ongoing thread
“Free format is easily more readable than anything you can do in fixed format, once you are used to it.”
MikeS
“Mixing a few lines of free format into otherwise fixed-format code just makes it look like a mess; pick one and be consistent.”
arrow483
“Some operations, like a CHAIN with a composite key or EVAL-CORR, are only fully usable in free format, which pushes new development that direction regardless of preference.”
B.Hauser
The forum split roughly the way you would expect: developers who learned fixed format first find free format unfamiliar, and developers who learned it the other way round find fixed format needlessly rigid. The one point of actual agreement is not to mix them inside a single program. For anything new, free format also gets you syntax that fixed format cannot express at all, so it is the practical default for new work even if you keep maintaining fixed-format code elsewhere.
Compilers & platforms
Disambiguation across vendors.
Modernization guides
Cost, timeline, migration paths.
Vendors
Modernization consultancy comparison.
Migration checklist
What to check before or after a compiler move.
Salary & rate benchmark
What RPG work actually pays.
Vendor match
Two questions to the right vendor.