RPG Metrics for IBM i Code Quality
RPG Metrics gives IBM i teams practical code quality insight into RPG complexity, maintainability, nesting and RPG Free conversion effort.
What RPG Metrics Gives You
Local Agent Scans
RPG Metrics uses a local-first Agent that can run:
- On IBM i / PASE, watching an IFS folder for RPG source stream files
- On Windows / PC, watching a local folder of exported RPG source files
The Agent scans RPG source locally and generates XLSX reports locally. If dashboard sync is enabled, it can also send calculated metrics to the RPG Metrics dashboard.
Your RPG source code stays in your own environment. Source code is not sent to the dashboard by the Agent.
Dashboard Metrics
When dashboard sync is enabled, the RPG Metrics Agent sends calculated metrics only to the RPG Metrics dashboard.
The dashboard gives you a central view of scanned programs, including:
- Cyclomatic Complexity
- Maintainability Index
- Comment levels
- RPG Free compatibility
- Procedure and subroutine counts
- Cyclomatic hotspots
- Historical trends
Dashboard sync is optional. The Agent can also run in local-only mode and generate a local XLSX report without sending metrics to the dashboard.
Cyclomatic Complexity Hotspots
Identify high-complexity procedures and subroutines so you can see risk areas quickly and prioritise refactoring or modernisation work.
Hotspot analysis helps highlight the parts of an RPG program that are likely to be harder to understand, test and change.
Nesting Analysis
RPG Metrics analyses the nesting depth of RPG procedures and subroutines, helping you identify routines containing deeply nested conditional and iterative logic.
The local XLSX report identifies the maximum nesting depth for each routine, the routine start line and the source line where maximum nesting occurs.
Nesting Analysis complements Cyclomatic Complexity by showing not only how many decision paths exist, but also how deeply the program logic is structured.
Maintainability Index
Use Maintainability Index scoring to understand how maintainable a program is and to track whether code quality is improving or regressing across scans.
RPG Free Conversion Insight
- Counts and percentages of executable lines that may not convert cleanly to RPG Free
- Line-level compatibility analysis in the local XLSX report
- Identification of common legacy RPG opcodes
- Program-level RPG Free compatibility indicators
RPG Metrics can identify legacy operations such as MOVE, MOVEL, Z-ADD, GOTO, TAG, LOOKUP, TESTB and others.
This helps development teams assess and de-risk RPG Free modernisation projects before changing the application.
Local XLSX Reports
The RPG Metrics Agent generates XLSX reports locally in the environment where the source is scanned.
Reports are organised by team, library and source file and, depending on the enabled features, can include:
- Summary metrics
- Source line analysis
- Cyclomatic Complexity hotspots
- Nesting Analysis
- RPG Free compatibility analysis
Procedure and subroutine boundaries are highlighted in the Source Analysis worksheet, and analysis worksheets can link directly to the corresponding routine in the source listing.
This gives developers, managers and technical leads a practical, shareable report without requiring RPG source code to leave the local environment.
CSV and Dashboard Reporting
Dashboard-connected users can also use filtered views, CSV exports and historical reporting depending on the enabled features and subscription level.
IBM i Workflow Integration
On IBM i, the RPG Metrics Agent can be integrated directly into normal RPG development and change-control processes.
- Create stream files from a custom PDM option
- Trigger scans from post-promotion or deployment scripts
- Run the Agent as a background job in its own IBM i subsystem
- Organise reports by team, library and source file
- Optionally sync calculated metrics to the RPG Metrics dashboard
- Optionally notify the submitting IBM i user when processing completes
No manual upload is required for the normal IBM i Agent workflow. Analysis can become part of the development or promotion process.
PC / Local-Folder Scanning
The same RPG Metrics Agent can also run on Windows against RPG source files that have already been exported or copied from IBM i.
The Agent watches a configured local folder, scans incoming source files, creates XLSX reports locally and can optionally sync calculated metrics to the RPG Metrics dashboard.
This is useful for demonstrations, evaluation environments and sites where RPG source is already exported as part of an existing development workflow.
Manual Upload for Testing
A manual upload option is still available for quick tests and sample scans.
For production or sensitive RPG source, the local RPG Metrics Agent is the recommended approach because it keeps source code in your own environment.
Security Considerations
- RPG source is scanned locally
- Local XLSX reports remain in the environment where the Agent runs
- Dashboard sync sends calculated metrics only
- Agent-based scanning does not store RPG source code in the dashboard
- Sensitive identifiers such as library, source file and program names are protected at rest
- Dashboard sync can be disabled completely for local-only operation
RPG Metrics is designed for teams that need useful code quality insight without unnecessarily exposing source code.
Who RPG Metrics Is For
- IBM i development teams maintaining large or legacy RPG applications
- Shops planning a conversion to RPG Free
- Teams modernising existing RPG applications
- Teams that want clearer insight before refactoring
- Environments using change-control tooling such as MDCMS, TurnOver, Aldon, Implementer or in-house scripts
- Teams that want automated code quality checks during promotions to DEV, TEST or UAT
- Developers who want local reports without uploading RPG source code
What You Get
- Local RPG Metrics Agent for IBM i / PASE
- PC / Windows local-folder scanning
- Local XLSX reports
- Optional dashboard sync for calculated metrics
- Per-program complexity, maintainability and comment metrics
- Cyclomatic Complexity hotspot analysis
- Nesting Analysis by procedure and subroutine
- Maintainability Index tracking
- RPG Free conversion blockers highlighted at line level
- Executable line analysis
- Customisable scan rules on supported plans
- CSV export and dashboard reporting on supported plans
- Team, library and source-file organisation
- Support for integration into IBM i promotion workflows
Get Started with RPG Metrics
RPG Metrics can be used in local-only mode or connected to the RPG Metrics dashboard.
The Free tier provides a straightforward way to begin scanning RPG source locally and generating local reports. Additional analysis, history and team features are available according to subscription level.
The RPG Metrics Agent download includes:
- The Python-based RPG Metrics Agent
- Local RPG scanner
- XLSX report generation
- Example configuration
- IBM i and PC/local-folder support
- Installation and configuration documentation
Download RPG Metrics Agent 0.2.4
Want a Walkthrough?
If you would like a guided walkthrough or want to see how RPG Metrics could fit into your IBM i development or modernisation workflow, please get in touch through the contact page on this site.
#ibmi, #Modernization, #rpg, #rpgfree, #python


