Debugging RPG with IBM BOB

  • Home
  • /
  • Blog
  • /
  • Debugging RPG with IBM BOB

May 22, 2026

Debugging RPG with IBM BOB: A Real Day in the Life of an IBM i Programmer

Greetings IBM-i Nerds, if you are thinking about a career in IBM i software development then pull up a chair. Today I am taking you behind the curtain to see exactly what us RPG programmers do on a daily basis. No glamour, no hype, just me, some buggy RPGLE code, and my ever-helpful AI sidekick IBM BOB. We are going to fix every error we find, add service programs, tweak binding directories, and wrestle the whole thing until it compiles cleanly. Expect a few bumps along the way. That is how real programming works.

I fired up IBM BOB Code Editor (essentially, it’s IBM’s version of Visual Studio Code with the Code for IBM i extension) and opened a simple SQLRPGLE program that should handle some data conversion logic.

On paper it looked fine, but when I tried to compile it, the red squiggly lines started appearing faster than free pizza at a user group meeting. Classic RPG syntax errors everywhere. Missing semicolons in free-format, a few dcl-s declarations that were not quite right, and one sneaky qualified data structure that was causing the compiler to throw a tantrum.

First stop, ask our programming assistant, IBM BOB, to take a look. I highlighted the offending procedure and typed a quick prompt: “Fix these RPGLE syntax errors and make the code compile cleanly.” BOB jumped right in, suggested the corrections, and even explained why each change was needed. I reviewed the diffs (because you should always review AI suggestions, kids), approved them, and hit compile. Green screen feedback said we were making progress. Two down, about a dozen to go.

Other problems were things like the program needs to call an external service program and couldn’t find it. Time to add a *SRVPGM. I asked BOB to generate the binding source and the prototype definitions. BOB did a nice job creating the PR and PI blocks with the right parameters. But here is where things got interesting. When I tried to create the binding directory entry, BOB suggested the right CRTBNDDIR command and the BNDDIR(*LIBL/MYBNDDIR) setup. Great in theory. In practice, neither Code for IBM i nor whatever IBM TOBi component BOB was talking to wanted to compile the binding directory object. It just sat there spinning its wheels. After a couple of failed attempts, I muttered some choice words under my breath and did it the old-fashioned way with a quick command line. Sometimes the AI needs a human to step in and say “let me drive for a minute.”

We were rolling again. I added the service program to the binding directory, updated the CRTRPGMOD and CRTSRVPGM commands in my build script, and asked BOB to double-check the activation group and export settings. BOB spotted a missing EXTPROC on one of the prototypes and fixed it before I even noticed. That is the kind of help I like.

Then BOB decided it was time for a coffee break. Without warning the SSH connection to my IBM i system dropped like a bad internet joke. Screen went dead, connection lost, and the little status bar in VS Code turned an angry red. I restarted the SSH session, reconnected, and BOB politely picked up exactly where we left off. No lost context, no drama. I have to admit I was impressed.

Back to the code. A few more rounds of syntax massage, some light muttering about qualified names versus external data structures, and one last tweak to the activation group so everything played nicely together. I hit the compile button one final time. The job log came back with no errors, no warnings, and a lovely “program created successfully” message. Beautiful.

So, there you have it. One slightly messy SQL RPG program, a simple RPG service program, a bunch of small bugs, and a solid partnership with IBM BOB turned it into clean, production-ready code. This is the kind of thing we do every day on IBM i. It is not always glamorous, but it is satisfying when the green lights finally come on.

Debugging RPG with IBM BOB

Trying the same with Control Language (CLLE/CLP)

If you are considering a career in IBM i development, know this: you will spend time debugging, you will talk to the compiler more than you talk to some colleagues, and tools like BOB are making the whole process faster and more fun. The platform is still rock solid and the work is as rewarding as ever.

Drop a comment if you have had your own adventures with IBM BOB or if you want me to walk through a specific RPG technique next time. Until then, keep your prototypes clean and your binding directories tighter than a 5250 session on a Friday afternoon.

Happy coding!

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

>