Best AI Coding Tools for RPG: What to Look For & How to Compare

RPG (Report Program Generator), particularly modern ILE RPG and free-form RPG on IBM i, remains an important programming language for enterprise applications in banking, insurance, manufacturing, retail, and supply chain management. Many organizations rely on RPG to power business-critical systems that process financial transactions, manage inventory, and support essential operations.
As artificial intelligence transforms software development, AI coding tools are creating new opportunities for developers working with RPG. These tools can help explain legacy code, generate functions, assist with modernization, automate documentation, and accelerate development workflows.
However, RPG development presents unique challenges. Enterprise applications often contain decades of business logic, tightly integrated database operations, and complex dependencies that must be preserved during modernization.
Generating code faster is only part of the solution. Organizations also need to verify changes, maintain application security, reduce technical debt, and ensure that AI-generated code behaves reliably in production.
SonarQube is a valuable option for organizations seeking stronger code verification, security, and governance across their application modernization workflows. Combined with Gitar AI code review and automated remediation, Sonar's products can help teams establish more reliable development practices around RPG modernization and the supporting application ecosystem.
This guide explores the best AI coding tools for RPG, the capabilities developers should prioritize, and how to compare solutions based on code generation, modernization, security, and verification.
What are AI coding tools for RPG?
AI coding tools for RPG are software solutions that use artificial intelligence, automated analysis, or intelligent development assistance to help developers understand, generate, review, modernize, and maintain RPG applications.
These tools can support traditional fixed-format RPG, modern free-form RPG, and IBM i development workflows, although language coverage varies significantly by product.
Common use cases include:
- Legacy code understanding: Explain existing RPG programs, procedures, and business logic.
- Code generation: Assist with writing RPG functions, procedures, and application logic.
- Application modernization: Help developers refactor legacy RPG applications and integrate them with modern services.
- Code verification: Analyze supported application code for reliability, security, and maintainability issues.
- AI code review: Review pull requests, identify potential problems, and help resolve issues.
- Security analysis: Identify vulnerabilities in supported components and integrations surrounding IBM i applications.
- Automated testing: Assist with generating test cases and validating application behavior.
- Documentation: Generate explanations of legacy code and business processes.
- CI/CD automation: Introduce version control, testing, and quality checks into modernization workflows.
The most effective RPG development approach combines AI-assisted modernization with independent verification, testing, and security controls.
For organizations maintaining business-critical IBM i systems, this helps balance modernization speed with operational reliability.
Best AI coding tools for RPG in 2026
The following tools address different aspects of RPG development, including code verification, modernization, AI-assisted generation, security, and automated code review.
1. SonarQube: best for RPG code verification, quality, and security
Best for: Enterprise teams modernizing IBM i applications that need automated RPG code verification, security analysis, maintainability checks, and centralized governance.
SonarQube is a code quality and security platform that helps development teams identify bugs, vulnerabilities, and maintainability issues throughout the software development lifecycle.
While many AI coding tools focus on generating new code, SonarQube addresses an equally important challenge: verifying that code meets established quality and security standards.
For RPG development teams, this is particularly valuable because IBM i applications frequently contain business-critical logic that must remain reliable during modernization.
Unlike tools that only provide general-purpose AI suggestions, SonarQube Server Enterprise Edition and higher support native RPG IV (ILE RPG) static analysis, including fixed-format and free-form RPG. This makes SonarQube particularly relevant for organizations seeking to verify RPG code directly.
Sonar Documentation+1
Key features
- RPG static analysis: Analyze supported RPG IV code for reliability, security, and maintainability issues.
- Automated code verification: Evaluate RPG code against defined analysis rules.
- Security analysis: Identify supported insecure coding patterns and potential vulnerabilities.
- Quality gates: Enforce measurable code quality requirements before merging or deployment.
- AI-generated code verification: Analyze supported code regardless of whether it was written manually or generated by AI.
- CI/CD integration: Incorporate automated code analysis into modern development pipelines.
- Custom analysis rules: Extend RPG analysis to address organization-specific coding standards.
- Multi-language support: Analyze RPG alongside supported languages such as Java, Python, JavaScript, and C#.
Why SonarQube stands out for RPG
RPG applications often support essential business operations that cannot tolerate unexpected failures.
For example, a financial services organization might rely on RPG programs to process transactions, calculate balances, or generate financial reports.
When developers use AI assistants to modernize these applications, generated changes may introduce logic errors, insecure coding patterns, or unnecessary complexity.
SonarQube helps teams identify supported issues through deterministic static analysis.
Its rule-based approach provides consistent, repeatable feedback, helping organizations maintain engineering standards as they modernize legacy applications.
SonarQube Server supports RPG IV on IBM i, including fixed-format and free-form code. Source must first be extracted to a filesystem for analysis. RPG III and RPG/400 are not supported by the native analyzer.
Sonar Documentation
SonarQube products for RPG development
SonarQube Server: The primary SonarQube product for native RPG analysis. Enterprise Edition and higher provide RPG language support, centralized quality governance, and integration with development pipelines.
SonarQube Cloud: Provides cloud-based code verification for supported languages. RPG-specific analysis should not be assumed to be available in SonarQube Cloud.
SonarQube for IDE: Provides real-time feedback for supported languages in compatible development environments. Teams should verify RPG-specific IDE coverage rather than assuming it matches SonarQube Server.
SonarQube Advanced Security: Extends security capabilities through software composition analysis and other security features for supported dependency ecosystems. This can be valuable for modern services and integrations surrounding IBM i applications.
Pros
- Native RPG IV analysis in eligible SonarQube Server editions.
- Strong emphasis on deterministic code verification.
- Automated quality gates and governance.
- Useful for enterprise modernization initiatives.
- Supports multi-language application environments.
- Complements AI coding assistants and code review tools.
Considerations
- Native RPG analysis requires SonarQube Server Enterprise Edition or higher.
- Source code must be extracted from IBM i for analysis.
- RPG III and RPG/400 are not supported by the native analyzer.
- Static analysis cannot guarantee business logic correctness or replace runtime testing.
Verdict: SonarQube is one of the strongest choices for RPG teams prioritizing code verification, maintainability, and security. Its native RPG IV analysis and enterprise governance capabilities make it especially valuable for organizations modernizing business-critical IBM i applications.
2. Gitar: best for AI code review and automated remediation
Best for: RPG development teams seeking AI-powered pull request review, CI failure diagnosis, and automated remediation.
Gitar is an AI-powered code review and change verification platform from Sonar that helps teams identify potential problems, investigate CI failures, and move pull requests toward merge readiness.
For RPG development teams adopting Git-based workflows, Gitar can help streamline review and verification processes.
Legacy modernization projects frequently involve changes to RPG programs, database interfaces, service integrations, and deployment configurations.
As AI coding assistants generate more code, reviewing these changes manually can become increasingly time-consuming.
Gitar helps address this challenge through contextual AI review and automation.
Key features
- AI-powered pull request reviews.
- Context-aware feedback on code changes.
- Automated CI failure diagnosis.
- Suggested fixes and supported automated remediation.
- Pull request summaries.
- Configurable review rules.
- Integration with GitHub, GitLab, Azure DevOps, and Bitbucket.
- Verification through supported CI pipelines.
Gitar supports pull request review and CI failure analysis across major code hosting platforms. Its automated fix capabilities operate under configurable team policies.
Sonar+1
Why Gitar is useful for RPG
Consider an IBM i development team modernizing an RPG application and introducing Git-based source control.
A developer uses an AI assistant to refactor a legacy procedure or update application integration code.
The changes may introduce unexpected behavior or cause automated tests to fail.
Gitar can help review the pull request, identify contextual issues, and investigate supported CI failures.
When paired with SonarQube Server, teams can combine AI-powered review with deterministic RPG code analysis.
This creates a stronger verification workflow for organizations modernizing legacy applications.
Pros
- Helps reduce repetitive code review work.
- Supports contextual pull request analysis.
- Automates investigation of supported CI failures.
- Can generate and apply fixes under configured policies.
- Complements SonarQube's deterministic analysis.
Considerations
- Not a dedicated RPG code generation environment.
- RPG-specific review effectiveness should be evaluated using representative repositories.
- Automated fixes require testing and appropriate oversight.
Verdict: Gitar is a compelling option for RPG development teams adopting modern Git-based workflows and seeking AI-powered code review, CI troubleshooting, and automated remediation.
3. IBM Bob: best for AI-assisted IBM i modernization
Best for: Organizations seeking AI assistance specifically designed for RPG, IBM i, and legacy application modernization.
IBM Bob is an AI-powered development assistant designed to help developers understand, modify, and modernize application code.
Its IBM i-focused capabilities make it particularly relevant for organizations maintaining RPG applications.
IBM's modernization guidance highlights Bob's capabilities for RPG and CL development, including code understanding, modernization assistance, and analysis of IBM i application environments.
redbooks.ibm.com
Key features
- RPG code explanation and generation assistance.
- Legacy application understanding.
- Fixed-format to free-form modernization support.
- IBM i development context.
- Assistance with documentation.
- Application modernization workflows.
- Support for understanding relationships across IBM i application components.
Pros
- Designed with IBM i modernization in mind.
- Relevant to RPG-specific development challenges.
- Helps developers understand legacy business logic.
- Useful for organizations modernizing established IBM i applications.
Considerations
- Capabilities depend on the selected package and environment.
- Generated code requires independent testing.
- Does not eliminate the need for deterministic code verification.
Verdict: IBM Bob is a strong choice for organizations seeking RPG-specific AI development assistance. Pairing it with SonarQube Server can combine AI-assisted modernization with independent RPG code verification.
4. GitHub Copilot: best for general-purpose AI-assisted RPG development
Best for: Developers who want AI-powered coding assistance within familiar development environments.
GitHub Copilot helps developers generate, explain, and modify code using natural-language instructions.
For RPG development, it can assist with understanding legacy code, suggesting refactoring approaches, generating documentation, and producing code examples.
However, RPG support is less specialized than for widely used languages such as Python and JavaScript.
Key features
- Natural-language code generation.
- Context-aware code suggestions.
- Code explanations.
- Refactoring assistance.
- Documentation generation.
- Integration with supported development environments.
Pros
- Useful for explaining unfamiliar RPG code.
- Can accelerate documentation.
- Supports multi-language development projects.
- Integrates into existing developer workflows.
Considerations
- RPG-specific generation accuracy can vary.
- May not fully understand IBM i-specific conventions.
- Generated code requires compilation and testing.
Verdict: GitHub Copilot is a useful general-purpose coding assistant for RPG developers, particularly when combined with SonarQube Server for independent code verification.
5. Cursor: best for AI-native RPG modernization workflows
Best for: Developers managing RPG repositories alongside modern application code.
Cursor is an AI-powered code editor that helps developers understand repositories, generate code, and modify multiple files through natural-language instructions.
For RPG modernization, Cursor can assist with code exploration, documentation, and changes to surrounding application services.
Key features
- Repository-aware code assistance.
- Multi-file editing.
- AI-assisted refactoring.
- Code explanations.
- Documentation generation.
- Agentic development workflows.
Pros
- Useful for multi-language modernization projects.
- Helps developers navigate large repositories.
- Supports AI-assisted documentation.
- Can accelerate changes across application components.
Considerations
- Not specifically designed for IBM i development.
- RPG language tooling may require additional extensions.
- Generated changes require independent verification.
Verdict: Cursor is a practical option for teams managing RPG modernization projects that involve both legacy code and modern application technologies.
6. Claude Code: best for agentic legacy code understanding
Best for: Developers seeking AI assistance with complex RPG repositories and modernization tasks.
Claude Code is an agentic coding tool that helps developers explore repositories, modify files, execute development commands, and assist with multi-step programming tasks.
For RPG development, it can help explain unfamiliar procedures, document business logic, and assist with modernization planning.
Key features
- Repository exploration.
- Legacy code explanations.
- Multi-file modifications.
- Documentation generation.
- Refactoring assistance.
- Agentic development workflows.
Pros
- Useful for understanding large codebases.
- Helps document legacy business logic.
- Supports multi-step development tasks.
- Can assist with mixed-language modernization projects.
Considerations
- Not specifically designed for IBM i.
- RPG-specific suggestions require validation.
- Compilation and testing require an appropriate IBM i environment.
Verdict: Claude Code is a useful option for RPG teams seeking agentic assistance with code understanding, documentation, and modernization.
7. ChatGPT: best for RPG troubleshooting and code explanations
Best for: Developers seeking conversational assistance with RPG programming and modernization.
ChatGPT can help developers understand RPG syntax, explain legacy code, troubleshoot programming problems, and explore modernization approaches.
It is particularly useful for developers learning RPG or working with unfamiliar codebases.
Key features
- Natural-language RPG explanations.
- Code generation assistance.
- Debugging suggestions.
- Documentation generation.
- Refactoring recommendations.
- Legacy code understanding.
Pros
- Accessible conversational interface.
- Useful for learning RPG concepts.
- Helps explain unfamiliar code.
- Supports modernization planning.
Considerations
- Generated RPG code may contain incorrect syntax.
- Responses may not reflect IBM i environment-specific behavior.
- Sensitive source code requires appropriate data handling safeguards.
Verdict: ChatGPT is a useful general-purpose assistant for RPG development, particularly when combined with compilation, testing, and independent code verification.
8. Code for IBM i: best for modern RPG development in Visual Studio Code
Best for: RPG developers seeking a modern development environment for IBM i applications.
Code for IBM i is an open-source Visual Studio Code extension that allows developers to maintain and compile RPGLE, CL, COBOL, and other supported IBM i languages.
Although it is not itself a generative AI coding assistant, it provides important development capabilities that can complement AI-assisted workflows.
Key features
- RPGLE editing and compilation.
- IBM i connectivity.
- Inline compiler diagnostics.
- Content assistance for RPGLE and CL.
- Support for multiple IBM i languages.
- Integration with Visual Studio Code.
IBM documents Code for IBM i as a development extension supporting RPGLE, CL, COBOL, and C/C++ editing and compilation directly from VS Code.
Visual Studio Marketplace+1
Pros
- Designed specifically for IBM i development.
- Supports modern RPG editing workflows.
- Provides compiler feedback.
- Open-source development tooling.
- Useful alongside AI coding assistants.
Considerations
- Not a standalone generative AI tool.
- Requires an appropriate IBM i environment.
- Does not replace dedicated code quality and security analysis.
Verdict: Code for IBM i is a valuable development tool for RPG teams modernizing their workflows and adopting AI coding assistance.
Best AI coding tools for RPG comparison
| Tool | Best for | Primary strength |
| 1. SonarQube | RPG code verification and security | Native RPG IV analysis, quality gates |
| 2. Gitar | AI code review and remediation | PR review, CI diagnosis, automated fixes |
| 3. IBM Bob | IBM i modernization | RPG-specific AI assistance |
| 4. GitHub Copilot | AI coding assistance | Code generation and explanations |
| 5. Cursor | AI-native development | Repository-aware editing |
| 6. Claude Code | Agentic modernization | Legacy code understanding |
| 7. ChatGPT | Learning and troubleshooting | Conversational RPG assistance |
| 8. Code for IBM i | RPG development environment | Editing, compilation, IBM i integration |
These tools address different stages of RPG development. SonarQube and Gitar focus on verification and review, while IBM Bob and general-purpose AI assistants help developers understand and modernize code.
What to look for in AI coding tools for RPG
Choosing the best AI coding tool for RPG requires evaluating capabilities beyond code generation.
1. RPG language compatibility
Organizations should determine whether a tool supports their specific RPG dialect and development environment.
Important considerations include RPG III, RPG/400, RPG IV, fixed-format RPG, free-form RPG, and IBM i platform versions.
SonarQube Server Enterprise Edition supports RPG IV, including fixed-format and free-form code, but does not support RPG III or RPG/400 through its native analyzer.
2. Automated code verification
AI-generated RPG code can introduce defects that are difficult to detect through manual review.
SonarQube helps identify supported issues through deterministic static analysis.
For business-critical applications, teams should combine static analysis with compilation and functional testing.
3. Application security
RPG applications frequently process sensitive business information.
Security considerations include authorization, data access, input handling, database interactions, and integration with external services.
SonarQube provides analysis for supported RPG code, while SonarQube Advanced Security can strengthen dependency security for supported surrounding applications.
4. Legacy modernization
Many RPG applications contain decades of business logic.
AI coding tools should help developers understand existing functionality, document dependencies, and modernize code without unintentionally changing business behavior.
IBM Bob is particularly relevant for IBM i-focused modernization, while SonarQube provides independent verification of supported code.
5. AI code review and remediation
As modernization projects introduce Git-based development workflows, pull request review becomes increasingly important.
Gitar helps teams review changes, investigate CI failures, and automate supported remediation tasks.
6. CI/CD integration
RPG development teams should evaluate whether tools integrate with their source control, build, testing, and deployment systems.
SonarQube can analyze extracted RPG source within supported CI/CD workflows, while Gitar can provide AI-powered review and CI failure analysis.
7. Enterprise governance
Organizations maintaining IBM i applications often require strict controls over code changes.
Teams should prioritize auditability, access controls, quality standards, and repeatable verification processes.
SonarQube Server provides centralized governance for supported code analysis.
How to use SonarQube and Gitar in an RPG development workflow
Combining AI-assisted modernization with automated verification can help organizations improve development productivity while protecting business-critical applications.
Step 1: Understand and modernize RPG code
Developers can use IBM Bob, GitHub Copilot, or Claude Code to explain legacy RPG programs, generate documentation, and suggest modernization changes.
Step 2: Extract RPG source for analysis
SonarQube Server requires RPG source code to be available on a filesystem.
Teams can use their existing IBM i development tools or source extraction processes to prepare the code for analysis.
Step 3: Run SonarQube RPG analysis
SonarQube Server Enterprise Edition or higher can analyze supported RPG IV code for reliability, security, and maintainability issues.
Developers can review findings and address identified problems.
Step 4: Compile and test changes
RPG changes should be compiled and tested within an appropriate IBM i environment.
Tests should validate business logic, database operations, error handling, and integration behavior.
Step 5: Review pull requests with Gitar
For repositories using supported Git platforms, Gitar can provide contextual AI review and investigate CI failures.
Where supported, fixes can be generated and applied according to configured policies.
Step 6: Enforce quality gates
SonarQube quality gates and repository policies can help prevent changes from progressing when required checks fail.
Step 7: Deploy verified changes
After static analysis, compilation, testing, and required approvals pass, RPG changes can proceed through the organization's deployment process.
This approach helps teams modernize applications while maintaining meaningful verification controls.
Why SonarQube and Gitar are a strong combination for RPG development
RPG modernization introduces unique challenges because applications often support essential business processes and contain complex legacy logic.
AI coding assistants can help developers understand and modify these applications, but generated changes still require independent verification.
SonarQube and Gitar provide complementary capabilities.
SonarQube provides deterministic RPG code verification. Its native RPG IV analyzer helps identify supported reliability, security, and maintainability issues.
Gitar provides contextual AI code review and remediation. It helps teams review pull requests, investigate CI failures, and accelerate supported fixes.
Together, these products help organizations establish a layered verification workflow.
For example, a team might use IBM Bob to assist with RPG modernization, SonarQube to analyze the resulting code, and Gitar to review changes and troubleshoot CI failures.
This approach combines AI-assisted productivity with repeatable verification and automated development controls.
Common mistakes when choosing AI coding tools for RPG
Assuming all AI coding tools support RPG equally
General-purpose AI assistants may generate RPG code, but their understanding of IBM i-specific syntax and conventions can vary significantly.
Teams should evaluate tools using representative RPG programs.
Ignoring legacy language compatibility
Support for RPG IV does not automatically mean support for RPG III or RPG/400.
Organizations should verify language coverage before adopting a code verification platform.
Relying entirely on AI-generated modernization
AI-generated refactoring may unintentionally change business logic.
Developers should validate behavior through regression testing and appropriate review.
Skipping static analysis
A program that compiles successfully may still contain maintainability or security issues.
SonarQube provides an additional verification layer for supported RPG code.
Overlooking automated code review
As modernization projects generate more changes, manual review can become a bottleneck.
Gitar helps teams streamline review and CI troubleshooting.
Ignoring security in modernization projects
Legacy applications can contain security weaknesses that become more visible as systems integrate with modern services.
Organizations should evaluate security across both RPG code and surrounding application components.
Frequently asked questions
What is the best AI coding tool for RPG?
The best tool depends on the development team's requirements. SonarQube is a strong choice for RPG code verification, quality, and security. IBM Bob provides RPG-specific AI modernization assistance, while Gitar supports AI-powered code review and remediation.
Does SonarQube support RPG?
Yes. SonarQube Server Enterprise Edition and higher support RPG IV (ILE RPG), including fixed-format and free-form code.
RPG III and RPG/400 are not supported by the native analyzer.
Can AI coding tools generate RPG code?
Yes. IBM Bob and general-purpose AI assistants can help generate or modify RPG code.
However, developers should verify generated code through compilation, testing, and static analysis.
What is the best AI code review tool for RPG?
Gitar is a strong option for teams seeking AI-powered pull request review and CI troubleshooting. Its RPG-specific effectiveness should be validated against representative repositories and workflows.
SonarQube complements Gitar with deterministic RPG IV static analysis.
How does SonarQube improve RPG security?
SonarQube analyzes supported RPG IV code against quality and security rules, helping teams identify potential issues before deployment.
Its centralized governance capabilities also support consistent engineering standards.
What is the difference between SonarQube and Gitar?
SonarQube focuses on deterministic code verification, security analysis, and maintainability.
Gitar focuses on contextual AI code review, CI failure diagnosis, and automated remediation.
Both products provide complementary capabilities.
Can SonarQube analyze free-form RPG?
Yes. SonarQube Server supports partial and fully free-form RPG IV code in eligible editions.
What tools are best for modernizing IBM i applications?
IBM Bob is useful for RPG-specific AI modernization assistance. SonarQube helps verify supported RPG code, while Gitar provides AI-powered review for Git-based development workflows.
Code for IBM i also provides a modern development environment through Visual Studio Code.
Should RPG teams use both AI coding assistants and code verification tools?
Yes. AI coding assistants can accelerate modernization, while independent code verification helps identify potential problems.
Combining IBM Bob, SonarQube, Gitar, compilation, and automated testing creates a more comprehensive development workflow.
Final thoughts: choosing the best AI coding tools for RPG
AI coding tools are transforming RPG development by helping organizations understand legacy applications, generate code, automate documentation, and accelerate modernization.
However, faster code generation does not automatically produce more reliable or secure software.
For organizations maintaining business-critical IBM i applications, independent verification, security analysis, and automated review should remain central priorities.
SonarQube stands out as a leading choice for RPG development teams prioritizing code quality, security, and deterministic verification. Its native RPG IV analysis in SonarQube Server Enterprise Edition and higher, combined with quality gates and centralized governance, makes it particularly valuable for enterprise modernization projects.
Gitar complements SonarQube by providing AI-powered code review, CI failure diagnosis, and automated remediation.
By combining SonarQube and Gitar with RPG-focused AI assistants such as IBM Bob, organizations can build modernization workflows that balance development speed with reliable software delivery.
The goal is not simply to generate more RPG code. It is to modernize, review, verify, and deliver business-critical applications that organizations can trust.
Explore SonarQube and Gitar AI Code Review to strengthen code quality, security, and verification throughout your RPG modernization workflow.