Last Updated on 2 November 2025 by Roberto De Pedrini
Index
👉 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:
- Work on a backup of your source or in a test environment.
- Identify code sections (H, F, D, C specs) that are good candidates for conversion.
- When selecting logic blocks (IF/ELSE/WHEN/CASxx), be sure to include the entire structure – the converter relies on proper selection context.
- After conversion, compile and test the output code to ensure correct syntax and logic.
- Explore the extension settings (
rpgiv2free.removeFREEDirective, etc.) to customize conversion output to your internal standards. - 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:




Buongiorno,
non ho idea se sia il posto corretto per fare questa domanda, comunque,
ho iniziato a sviluppare con visual code in rpg ma, mi trovo in questa situazione,
su as il pgm si compila mentre su visual code mi esce il seguente msg, non ho idea
cosa ci sia che non vada bene.
Avrei anche un’altra domanda in visual code è possibili sviluppare solo in free corretto?
Running Action: Create Program (CRTPGM) (16:39:40)
Command did not run.
* Il processo del terminale è stato terminato. Codice di uscita: 1.
* Terminale verrĂ riutilizzato dalle attivitĂ , premere un tasto qualsiasi per chiuderlo.
Grazie e saluti