Exploring AS400 RPG Printing with OUTPUT Specs and EXCEPTions

  • Home
  • /
  • Blog
  • /
  • Exploring AS400 RPG Printing with OUTPUT Specs and EXCEPTions

August 29, 2025

Legacy RPG Printing on IBM i: OUTPUT Specs and EXCEPT in Action

If you’re curious about the nostalgic world of AS400 RPG programming, come with me and let’s dive into the art of printing reports using OUTPUT Specifications (O-Specs) and EXCEPT operations in RPG.

This video should help IBM-i newbies, and maybe even veteran coders working with IBM i systems, breaking down a piece of code from 1993 that’s still relevant in many legacy environments still running old AS400 and iSERIES program code.

We are going to walk through a classic RPG program that reads a journal file and generates a wide-format audit report. Looking at how O-Specs define the structure of an internally defined print file (QPRINT) and how EXCEPT operations control the printing of headers, details, and footers. You’ll see the code in action, first in the traditional SEU editor and then in the more modern Visual Studio Code, highlighting the contrast between old-school and contemporary development environments. We will also touch on handling overflow indicators to manage page breaks and the use of parameters to toggle extra detail in the report.

With a touch of irreverance (including a rant about a less-than-stellar iced coffee), I hope you enjoy this dive into some “ancient” RPG code.

https://www.youtube.com/watch?v=KjvnisGOrsc

I hinted at a follow-up video to convert this fixed-format code to free-format RPG, so stay tuned!

Whether you’re maintaining legacy systems or just love geeking out over retro tech, this video is might be interesting?! I hope!? Or maybe if it’s just to realise that making ones own iced coffee is always better than buying chemical sludge from the supermarket! hint: name rhymes with FIDDLE.

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. But, over the years RPG has evolved massively!

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

>