Transforming Old RPG Code: Scott Klement’s Copybooks Go Free Format!

  • Home
  • /
  • Blog
  • /
  • Transforming Old RPG Code: Scott Klement’s Copybooks Go Free Format!

August 30, 2025

Refactoring RPGLE: Scott Klement’s Copybooks in Free Format RPG

If you’ve ever stared at a wall of fixed-format RPG code and wondered how to bring it into the 21st century, you’re not alone.

In this video, let’s walk through the process of upgrading Scott Klement’s RPGLE copybooks, transforming legacy column-based RPG into sleek, readable free-format RPGLE.

Why Modernize?

Legacy RPG code, while powerful, can be rigid and difficult to maintain. Fixed-format syntax demands strict column placement, making even simple changes a headache. Free-format RPGLE, on the other hand, offers: cleaner syntax, easier readability, better integration with modern tools like VS Code, and enhanced maintainability for future development

Ready? Let’s get hands-on and practical looking at:

  • Analyzing legacy copybook structures: Understanding how data structures, prototypes, and procedures are defined in fixed-format RPG.
  • Converting to free-format syntax: Step-by-step transformation of code blocks while preserving logic and functionality.
  • Ensuring compatibility: Tips for maintaining seamless integration with existing applications.
  • Best practices: Writing cleaner, more maintainable RPGLE code using modern conventions. Use indentation and whitespace to make your free-format code more readable. Leverage built-in RPGLE functions to simplify logic.

Don’t just convert your code, refactor your code!

Take the opportunity to improve structure and clarity. In modern RPGLE and CLLE we have many, many new opcodes that lets us do things natively in a single line of code, which used to require entire subroutines in old RPG3 and RPG400. Modernizing and refactoring old code is all about rethinking the logic, streamlining the structure, and embracing modern opcodes that make your code cleaner, faster, and easier to maintain.

Whether you’re a seasoned IBM i developer or just starting your RPG journey, this video might help?

Watch the full video and start modernizing your RPGLE copybooks today.

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:

  • Hi.
    I’m trying to use the SEU editor. Old code is generally in the fixed format, but I want to learn the free format for modernization and easier reading. I can’t connect to AS400 with VSCode, I get an SSH error, and I can’t get past this. Could you please help me?

    I watched a video of yours, and all the information is correct, but I couldn’t log in. I tried my company’s test server, but it didn’t work. I tried signing up for Pub400 and still nothing. I’m asking for your help.

  • {"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

    >