IBMi

IBM Bob Meets TOBi — Houston, We Have a Compile Problem!

From green-screen compile errors to AI-assisted build-and-fix workflows. What a time to be an IBM i engineer!

Jeffrey C. Williams
The Accidental Futurist: IBM Bob Meets TOBi — Houston, We Have a Compile Problem! An adventurer, the IBM Bob robot, and a scruffy dog leap over "The Pit: The Loop of Endless Re-Compiling" swirling with RNF7030, RNF7031, and RNF7506 errors toward a laptop showing "Build Succeeded!", beside a scroll listing the AI build-and-fix workflow

Beyond Modernization. Engineering the Next Era of IBM i.

Explore the code: IBM Bob + TOBi on GitHub

Fellow IBM i engineers, gather ’round. I’ve got another one of those crazy ideas. And this time, I’ve got a working example to prove it! 😂

Remember how annoying it was to spend hours writing beautiful RPG code, only to hit compile and discover that the compiler had an entirely different opinion of your engineering brilliance?

All those stupid little mistakes — misspelled variables, missing semicolons, misplaced indicators — enough to make even a seasoned IBM i veteran feel like a complete amateur!

RNF7030.

The name or indicator is not defined.

Wonderful.

Somewhere, an RPG compiler was quietly reminding you that you’ve been doing this for 30 years and still can’t spell a variable name correctly.

And let’s not forget our old friend DDS.

Move something one column to the left, and suddenly your perfectly reasonable display file becomes an archaeological investigation.

Ah, the memories! 😂

But what if we could take that familiar IBM i development experience and introduce a little AI-assisted automation?

Not replace the engineer.

Not throw decades of business logic out the window.

And certainly not give an AI agent unrestricted authority to start rearranging our production environment.

I’m talking about something considerably more practical.

What if IBM Bob could compile our IBM i source, understand the compiler errors, make appropriate corrections, and automatically try again?

Now, I’m not suggesting Bob can fix every compiler error — some require deeper analysis, business knowledge, and good old-fashioned engineering judgment.

But what if Bob could automatically identify and correct 80% of those annoying, easily resolved errors, without us having to lift a finger?

Imagine how much repetitive effort we could eliminate — and how much more time we’d have for actual engineering! 🚀

Well, fellow adventurers…

That’s precisely what this little open-source experiment is designed to explore.

Meet IBM Bob + TOBi: An AI-Assisted Build-and-Fix Adventure

I’ve been exploring how to integrate IBM Bob into more of the everyday engineering workflows that IBM i developers have relied on for decades.

And one thing became obvious pretty quickly.

If we’re going to embrace AI-assisted software engineering, our AI tools need to do more than generate code. They need to participate in the entire engineering lifecycle — and most importantly, eliminate the repetitive manual effort that consumes valuable engineering time, freeing us to focus on what we do best: solving problems, innovating, and building great software!

That means building, testing, diagnosing problems, and eventually integrating into repeatable DevOps workflows.

Enter two interesting technologies:

Put them together, add a reusable Bob skill, some Python orchestration, and a few carefully designed guardrails…

And suddenly we have the foundation for an automated build-and-fix workflow.

Gadzooks, Batman! Holy Compile Errors! We may have just found a new super tool for our engineer utility belt! 🦇⚡

So, What Does This Thing Actually Do?

The repository introduces a custom IBM Bob slash command:

/ibmi-build-object

Behind that command is a reusable Bob skill that coordinates a controlled build process.

Here’s the general idea:

  1. Bob makes modifications to our IBM i source code.
  2. Bob identifies the IBM i source that needs compiling.
  3. A Python orchestration script transfers the necessary source to IBM i and invokes TOBi.
  4. The compiler does what compilers do best: finds everything we overlooked.
  5. Bob examines the compiler diagnostics.
  6. Bob attempts a focused correction to the source.
  7. The workflow recompiles the failed objects.
  8. The process stops when the build succeeds or a predefined retry limit is reached.

And importantly, the engineer remains responsible for reviewing and approving the resulting changes.

No mysterious commits.

No surprise pushes.

No autonomous production deployments.

Just an AI-assisted engineering workflow doing a very specific job.

Imagine that!

A Few Examples

Want to have Bob compile a specific RPGLE program?

/ibmi-build-object qrpglesrc/custinq.pgm.rpgle

Want to compile everything Bob has modified but haven’t committed?

/ibmi-build-object --changed

Want Bob to compile the source associated with your latest Git commit?

/ibmi-build-object --changed --commit HEAD

Or everything Bob changed on your branch?

/ibmi-build-object --changed --base origin/main

The workflow also accounts for certain dependencies, such as RPG programs that use modified display files and sources referencing changed copybooks.

Now we’re getting somewhere.

And somewhere, an old-school IBM i engineer just put down his coffee and raised an eyebrow. ☕

But Wait… What Happens When the Compile Fails?

I’m glad you asked!

The repository includes a demonstration designed specifically to exercise the error-correction process.

For example, imagine an RPG program references:

CUSTNAM

But the field is actually named:

CUSTNAME

The compiler responds with our familiar friend:

RNF7030

Traditionally, we’d review the compile listing, locate the offending statement, correct it, and compile again.

Nothing particularly difficult.

But it’s also the kind of repetitive engineering work that can consume a surprising amount of time across an organization.

In this workflow, Bob can examine the diagnostic, inspect the source, recognize the likely typo, make the correction, and request another compile.

The demonstration also includes CL keyword errors and a more interesting scenario involving a DDS display file and its dependent RPG program.

That second example is particularly useful.

Sometimes the RPG program isn’t really the problem.

The display file it depends on failed to compile first!

Fix the dependency, and suddenly the next set of errors makes considerably more sense.

Sound familiar?

This is exactly the kind of engineering reasoning we should be teaching AI assistants to support.

Not just fixing isolated syntax errors, but understanding enough of the development workflow to approach problems in a sensible order.

And this, fellow IBM i engineers, is how we begin automating the entire software engineering lifecycle with AI — one intelligent, repeatable workflow at a time! 🚀

Now, Before Anyone Hands Bob the Keys to the Kingdom…

Let’s discuss something important.

Guardrails.

I’ve been engineering IBM i applications long enough to know that a successful compile doesn’t necessarily mean we have a correct application.

Heck, some of the most spectacular production problems I’ve encountered compiled beautifully!

😂

And that brings us to one of my favorite aspects of this repository.

The build-and-fix workflow deliberately establishes boundaries around what Bob is allowed to do.

For example:

  • Limited retries: Bob cannot keep changing code and recompiling indefinitely.
  • No configuration shortcuts: It cannot weaken compiler settings just to make errors disappear.
  • No disappearing business logic: Removing or commenting out important code is not an acceptable fix.
  • Environment issues stay environment issues: Missing libraries, authority problems, and object locks aren’t invitations to rewrite application code.
  • No guessing at business requirements: If a correction requires business knowledge, Bob should ask the developer.
  • No automatic Git commits: Changes remain available for human review.

And, of course, DDS column positions must be respected.

Because some things in life are simply non-negotiable.

Especially column 45. 😂

The important lesson here isn’t that AI should be allowed to fix everything.

It’s that we can design workflows where AI handles appropriate engineering tasks while respecting the boundaries that protect our applications.

That’s responsible AI-assisted software engineering.

The Bigger Picture: Why This Matters for IBM i Organizations

Here’s where my Accidental Futurist imagination starts wandering.

Today, we’re talking about compiling source and correcting straightforward compiler errors.

But consider what this capability could become when integrated into a broader engineering workflow.

Imagine:

The business requests an enhancement.

IBM Bob helps analyze the existing RPGLE application and its dependencies.

The engineer and Bob implement the changes.

The build workflow automatically compiles the affected objects.

Compiler errors are diagnosed and appropriate corrections are attempted.

Automated unit tests execute.

Regression tests validate the affected business processes.

Results are captured and made available for review.

And eventually, a controlled CI/CD pipeline handles the remaining build, validation, and deployment activities.

With the appropriate human approvals, naturally.

Now we’re not simply using AI to write code faster.

We’re beginning to engineer an environment where AI, open-source tools, and automation work together throughout the software development lifecycle.

And that’s a considerably more interesting proposition.

Of course, this repository tackles the build-and-fix portion of that vision—not the entire automated testing and deployment pipeline.

But every worthwhile adventure starts somewhere.

A Word to My Fellow Veteran IBM i Engineers

I’ve spent decades working with IBM midrange systems.

And one thing I’ve learned is that our community has an extraordinary amount of engineering knowledge.

We understand business applications.

We understand dependencies.

We understand why that seemingly insignificant field in a 30-year-old RPG program might be responsible for half the company’s order-processing logic.

And we’ve developed a healthy respect for the phrase:

“It’s just a small change.”

Those four words have launched more adventures than Indiana Jones ever dreamed of.

But here’s something I want to emphasize.

Our experience is not becoming obsolete because of AI. It’s becoming increasingly valuable.

AI can help automate repetitive tasks.

It can help interpret compiler diagnostics.

It can assist with documentation, code analysis, modernization, and testing.

But the engineering judgment required to design safe, reliable workflows?

That comes from understanding the systems we’re working with.

And veteran IBM i engineers have decades of that experience to contribute.

Our opportunity isn’t simply to learn how to prompt an AI assistant.

It’s to teach these tools how good IBM i engineering actually works.

That’s a distinction worth remembering.

Open Source: The Adventure Gets Even Better

Another reason I’m excited about experiments like this is the role open source can play.

For years, IBM i organizations have often approached new engineering capabilities by evaluating another commercial product, another license, another integration, and another recurring expense.

Sometimes that’s absolutely the right choice.

But what if we also considered a different approach?

What if our engineers and consultants could assemble useful capabilities from existing open-source tools, customize them for our environments, and share improvements with the broader IBM i community?

That’s one of the ideas behind combining IBM Bob, TOBi, Python, Git, and reusable AI skills.

We’re not trying to reinvent the compiler.

We’re connecting existing capabilities into something useful.

And because these workflows can be shared and extended, other engineers can experiment with them, challenge the assumptions, improve the implementation, and contribute new ideas.

One engineer’s afternoon experiment could become another organization’s next productivity improvement.

GadZooks, Batman!

That sounds suspiciously like innovation! 🦇

Want to Take This Thing for a Spin?

The repository includes more than the build command itself.

You’ll find:

  • A reusable IBM Bob skill and slash command.
  • Repository-level engineering guardrails.
  • Python build orchestration and configuration examples.
  • Sample RPGLE, CLLE, and DDS source.
  • Deliberately broken source for experimenting with the correction loop.
  • An error-handling reference and troubleshooting guidance.
  • Test scripts and a simulated IBM i environment for testing portions of the workflow without a live IBM i connection.

The README also walks through the setup requirements, including SSH connectivity, TOBi installation, developer libraries, and IBM Bob configuration.

You’ll need an appropriately configured IBM i environment to perform real compiles.

And as always, start in a sandbox or development environment.

Preferably one where the words “production outage” aren’t part of the afternoon’s vocabulary.

GitHub Repository: IBM Bob + TOBi — Automated IBM i Build-and-Fix Loop

I encourage fellow IBM i engineers to explore the implementation, experiment with the examples, and think about how this approach could fit into their own engineering environments.

And if you see opportunities to improve it?

Even better.

That’s the whole point of sharing these ideas.

Beyond Modernization. Engineering the Next Era of IBM i.

I keep coming back to one fundamental idea.

The future of IBM i application development isn’t simply about modernizing old code.

It’s about modernizing how we engineer software.

How we build it.

How we test it.

How we document it.

How we share knowledge.

And how we use AI and automation to make experienced engineers more productive.

IBM Bob and TOBi represent one small but interesting step in that direction.

Will every compiler error be automatically fixable?

Of course not.

Will a successful compile guarantee correct business logic?

Absolutely not.

Will there be plenty of opportunities to improve these workflows?

You betcha!

But that’s what makes this adventure worthwhile.

We’re experimenting.

We’re learning.

We’re building.

And we’re beginning to connect technologies that open up some fascinating possibilities for our platform.

To my fellow IBM i veterans: Don’t just watch the AI revolution from the sidelines.

Bring your engineering experience to the table.

Build something useful.

Share what you’ve learned.

Mentor the next generation.

And remember…

The compiler may still think we’re idiots occasionally. But now we’ve got Bob to figure out what we screwed up, fix it, and compile it again — all while we sit back, sip our coffee, and pretend we knew what we were doing all along! ☕😂


Cheers and Thanks for Reading!

— The Accidental Futurist