If you already understand what RPGLE is, this lesson builds on that foundation.
It shows how source turns into something the system can run.
The goal is simple. You should be able to explain the path from source member to program object without mixing those terms together.
This article stays at the workflow level. It does not teach tooling details or code layout style. Those topics belong in later lessons.
Estimated reading time: 8 minutes
Quick Summary
- RPGLE source is stored in a source member.
- A source physical file holds source members inside a library.
- The compiler turns source into a program object.
- A source member is not the same thing as a program object.
- Library placement matters because source and output live as IBM i objects.
Reader Prerequisites
- You should already know what RPGLE is and where it fits on IBM i from “What RPGLE Is and Where It Fits on IBM i.”
- This article introduces source, member, object, and library concepts.
- You do not need compile commands yet.
- You do not need tool setup knowledge yet.
If you need the platform picture first, read What Is AS400 (IBM i)? A Complete Beginner’s Guide.
For adjacent platform context, read IBM i Modernization Basics.
Learning Outcomes
- Explain what a source physical file is.
- Distinguish a source member from the source physical file that stores it.
- Describe what the compiler does at a beginner level.
- Explain how source becomes a program object.
- Identify why library placement affects the workflow.
- Separate the source-to-object path from tooling and format-style questions.
The Source Model
On IBM i, source code is stored as objects too. That is why the vocabulary matters.
A source physical file is a physical file used to store source members. Each source member holds source text for one piece of code.
That means the language, the storage container, and the runnable output are different things:
- RPGLE is the language.
- A source member is the stored source text.
- A program object is the compiled result.
When beginners blur those three ideas together, the rest of the workflow feels harder than it really is.
Source Physical File, Source Member, and Program Object
A library is a named container for IBM i objects, and an object is something IBM i manages, such as a file or program.
| Item | What it is | Beginner takeaway |
|---|---|---|
| Source physical file | Stores source members | Holds source members |
| Source member | Holds source text | Contains RPGLE source |
| Compiler | Translates source | Creates output |
| Program object | Runnable output | What IBM i runs |
| Library | Container | Controls placement |
The table is the mental model this lesson wants you to keep.
Once you can name each part, compile flow becomes much easier to follow.
A Practical Compile-Flow Example
Imagine a simple business update program.
- A developer stores RPGLE source in a source member inside a source physical file.
- That source physical file lives in a library chosen by the team.
- The compiler reads the source member.
- The compiler produces a program object in a target library.
- An IBM i job runs the program object when the application needs it.
The exact libraries and names vary by shop.
The workflow does not.
Here is the key idea:
- Source is the editable starting point.
- Compilation is the translation step.
- The program object is the runnable result.
- The job is the runtime context that executes it.
Why Source Is Not the Same as a Program Object
These terms sound close, but they describe different stages.
- Source member: what a developer edits.
- Program object: what IBM i runs.
If you edit the source, you have not changed the running program until the source is compiled again.
If you change the program object directly, you are no longer working in the normal source-based maintenance flow.
That separation matters for change control, testing, and recoverability.
It also matters when you are trying to understand where a bug lives.
Library Placement
Library placement affects both source and output.
In practice, teams often keep source in one library and program objects in another.
Some shops organize by environment.
Some organize by application.
Some use separate libraries for development, test, and production.
The exact pattern is less important than the principle:
- You need to know where source lives.
- You need to know where the compiled object lives.
- You need to know which library a job will resolve first.
IBM i searches libraries in a defined order when it locates objects. This article keeps that idea conceptual so you can understand why placement matters.
That library awareness is one reason IBM i work feels different from code in a file-only world.
Common Beginner Mistakes
- Treating a source member and a program object as the same thing.
- Assuming compilation is optional when source changes.
- Forgetting that library placement affects where the system looks.
- Looking for object output in the same place where source is stored.
- Thinking compile flow is a tooling problem instead of a platform workflow.
FAQ
What is a source physical file?
It is a physical file used to store source members. On IBM i, it is part of the object model, not just a folder.
What is a source member?
A source member is one stored unit of source text. It is the container that holds the RPGLE code you edit.
What does the compiler do?
In this simple beginner example, it reads the source member and turns that source into a program object that IBM i can run. This article avoids advanced build outputs on purpose.
Is the source member the same as the program object?
No. The source member stores the code. The program object is the compiled result.
Why does library placement matter?
Because IBM i resolves objects by library. Where you place source and output affects how the system finds them.
Do I need to know compiler commands yet?
No. This article only explains the workflow at a beginner level.
What should I learn after this article?
Next, read “RPGLE Specifications: Fixed, Free, and Fully Free.”
How does this connect to the terminology lesson?
The terminology lesson explains what RPGLE is. This lesson explains what happens after you start writing it.
If you need that refresher, return to “What RPGLE Is and Where It Fits on IBM i.”
Key Takeaways
- Source physical files store source members.
- Source members contain RPGLE source text.
- The compiler turns source into a program object.
- Source and program object are related, but they are not the same thing.
- Library placement affects the flow from source to run-time output.
- The terminology lesson keeps the language model clear before you move on.
Continue Your Learning
Previous: What RPGLE Is and Where It Fits on IBM i
Current: RPGLE Source Members, Compilers, and Build Flow
Next: RPGLE Specifications: Fixed, Free, and Fully Free
Return to the RPGLE learning-path pillar.