01d - Rational RDi and other tools (EN)

VsCode Extention: Bob Cozzi’s RPG IV to RPG Free Conversion

Last Updated on 2 November 2025 by Roberto De Pedrini

👉 Review: Bob Cozzi’s RPG IV to RPG Free Conversion – a useful VS Code extension for RPG modernization

If you’re working on RPG modernization projects, this extension by Bob Cozzi (Cozzi Research) might save you a lot of time and manual effort.
The extension, available on the Visual Studio Code Marketplace, allows you to convert fixed-format RPG IV code to free-format RPG directly inside VS Code.

đź”— Download from VS Code Marketplace


đź§  What it does

The RPG IV to RPG Free Format Conversion extension lets you highlight a block of fixed-format RPG code – or even an entire program – and simply choose the command “Convert RPG IV to Free Format.”

According to the documentation, it supports:

  • Header (H), File (F), Definition (D), and most Calculation (C) specifications
  • Partial conversion of embedded SQL statements
  • Optional editing helpers for fixed-format RPG such as Smart Tab and Smart Enter to improve code readability and navigation

In short: it’s a simple and practical tool for developers who are still maintaining legacy RPG applications but want to start moving toward the modern free-format style.


⚙️ Why it’s useful for modernization projects

After testing it, here are the key takeaways:

✅ Speed – you can instantly convert sections of code without rewriting everything manually.
✅ Practicality – perfect when working on multiple RPG programs during a modernization project, allowing incremental updates instead of full rewrites.
✅ Compatibility – works well with mixed codebases that contain both legacy and free-format sections.
✅ Editing improvements – the included smart-editing features also make maintaining old fixed-format code more pleasant.


⚠️ What to keep in mind

While very handy, this isn’t a complete refactoring tool. Some important considerations:

  • It doesn’t perform deep code restructuring or logical refactoring. The author explicitly states that it’s not designed to handle RPG II cycle code or automatically manage complex I/O specifications.
  • Not all C-specs are fully converted yet – some cases may require manual adjustment after conversion.
  • In complex environments, the generated free-format code should always be reviewed, tested, and integrated carefully into your build / debug pipelines.
  • It doesn’t automatically transform very old cycle or indicator-based logic – those cases still require developer attention.

So – it’s a great accelerator, but not a “one-click modernization” solution.


đź’ˇ How to use it effectively

Some practical tips for getting the most out of the extension:

  1. Work on a backup of your source or in a test environment.
  2. Identify code sections (H, F, D, C specs) that are good candidates for conversion.
  3. When selecting logic blocks (IF/ELSE/WHEN/CASxx), be sure to include the entire structure – the converter relies on proper selection context.
  4. After conversion, compile and test the output code to ensure correct syntax and logic.
  5. Explore the extension settings (rpgiv2free.removeFREEDirective, etc.) to customize conversion output to your internal standards.
  6. Plan a progressive modernization approach – convert and test gradually, integrating new free-format code step by step.

đź§­ Final thoughts

Bob Cozzi’s RPG IV to Free Format extension is a solid and practical tool that can accelerate the modernization of RPG applications on IBM i.
It simplifies one of the most tedious parts of the modernization process – syntax conversion – while leaving the developer in full control of the logic.

It’s not meant to replace a full modernization framework or code-refactoring suite, but it’s an excellent companion tool to have in your toolkit.

For anyone maintaining legacy RPG code, this is definitely worth trying — especially if you’re working in VS Code and want a lighter, more modern development experience.

🔗 Download on Visual Studio Marketplace – Cozzi Research RPG IV to Free Format Converter

RPG Fixed to Free conversion example:

Related Posts
DB2 for i SQL – String Manipulation – POSSTR-LOCATE-LOCATE_IN_STRING (EN)

Introduction Often, in our applications, we need to work with text strings, and DB2 SQL can come in very useful Read more

DB2 for i – FAQ & Howtos (EN)

DB2 Database and SQL ... maybe the most important things on IBM i platform: here's a collection of FAQs, tips Read more

IBM i 7.4 Announcement (En)

Comes directly with the Easter egg this IBM announcement for the news of the IBM i 7.4 version, iNext version Read more

Generated Always Columns (EN)

Introduction "Generated Always Column": are columns, table fields, filled by DB2 engine: something like columns with a default value but Read more

--- Roberto De Pedrini Faq400.com
About author

Founder of Faq400 Srl, IBM Champion, creator of Faq400.com and blog.faq400.com web sites. RPG developer since I was wearing shorts, strong IBM i supporter, I have always tried to share my knowledge with others through forums, events and courses. Now, with my company Faq400 Srl, I help companies to make the most of this great platform IBM i.

Leave a Reply

Your email address will not be published. Required fields are marked *