A VS Code extension that analyzes the impact of changing a field length in an IBM i physical file. It instantly shows every dependent object — logical files, indexes, triggers, SQL routines, and programs — that will need attention before and after an ALTER TABLE or file change.
Disclaimer: This extension is an independent tool and is not affiliated with or endorsed by IBM.
Features
- Right-click integration — invoke directly from the IBM i Object Browser on any
*FILEobject - Command Palette support — run from anywhere with
Ctrl+Shift+P - Field picker — select from a list of all columns in the file, showing current type and length
- Quick Scan — SQL-based, returns in seconds: logical files, indexes, triggers, SQL procedures/functions
- Deep Scan — additionally runs
DSPPGMREFon the library to find every*PGMand*SRVPGMthat compiles against the file - Visual report — styled webview panel with impact grouped by object type, certainty badges, and a full column structure table
- Copy to clipboard — export the file structure table with one click
Prerequisites
| Requirement | Detail |
|---|---|
| VS Code | 1.80 or later |
| Code for IBM i | halcyontechltd.code-for-ibmi — must be installed and connected |
| IBM i | Any release with QSYS2 SQL catalog access (IBM i 7.1+) |
The extension uses the active IBM i connection managed by Code for IBM i. No separate connection setup is required.
Installation
From VSIX file
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Click the
···menu (top-right of the Extensions panel) → Install from VSIX… - Select
field-change-impact-for-ibmi-1.0.2.vsix
Or via the terminal:
code --install-extension field-change-impact-for-ibmi-1.0.2.vsix
Usage
From the IBM i Object Browser (right-click)
- Expand your library in the Object Browser panel (provided by Code for IBM i)
- Right-click any
*FILEobject - Select Analyze Field Length Change Impact
The extension reads the library and file name from the selected item automatically.
From the Command Palette
- Press
Ctrl+Shift+P - Type
Field Change ImpactorAnalyze Field Length - Select Field Change Impact: Analyze Field Length Change Impact
- Enter the library name when prompted (e.g.
MYLIB) - Enter the physical file name when prompted (e.g.
CUSTMAST)
Step-by-step Walkthrough
Once a file is identified (either from the Object Browser or entered manually), the extension guides you through four quick steps:
Step 1 ── Pick the field being changed
Shows all columns with current type and length
Step 2 ── Enter the new length
Validates it is a positive integer different from the current length
Step 3 ── Choose scan depth
Quick Scan ─ SQL catalog only (seconds)
Deep Scan ─ SQL + DSPPGMREF cross-reference (slower, more complete)
Step 4 ── View the impact report
Opens in a new editor tab
Understanding the Report
The report groups dependent objects into sections:
| Section | Certainty | How it is found |
|---|---|---|
| Logical File | Definitive | QSYS2.SYSTABLES — BASE_TABLE_NAME match |
| SQL View | Definitive | QSYS2.SYSTABLES — view over the physical |
| Index / Access Path | Definitive | QSYS2.SYSINDEXES |
| Trigger | Definitive | QSYS2.SYSTRIGGERS |
| SQL Procedure / Function | Potential | QSYS2.SYSROUTINES in same library — verify manually |
Program (*PGM) |
Definitive | DSPPGMREF output (Deep Scan only) |
Service Program (*SRVPGM) |
Definitive | DSPPGMREF output (Deep Scan only) |
Definitive means the dependency is confirmed by system catalog data.
Potential means the object is in the same library and may reference the file — manual verification is recommended.
Summary Cards
The top of the report shows:
- Total Dependents — all objects found
- Definitive — confirmed dependencies (green)
- Potential — objects to verify (amber)
- Object Types — number of distinct categories affected
Quick Scan vs Deep Scan
| Quick Scan | Deep Scan | |
|---|---|---|
| Speed | Seconds | Minutes (depends on library size) |
| Logical files | Yes | Yes |
| Indexes | Yes | Yes |
| Triggers | Yes | Yes |
| SQL routines | Yes (potential) | Yes (potential) |
| *PGM / *SRVPGM | No | Yes (definitive) |
| IBM i command used | None — SQL only | DSPPGMREF PGM(LIB/*ALL) |
| When to use | Initial impact check | Before planning recompile schedule |
The Deep Scan writes a temporary outfile to QTEMP during the run and deletes it when done.
Troubleshooting
"Code for IBM i (Code4i) extension is not installed"
Install the halcyontechltd.code-for-ibmi extension from the VS Code Marketplace and connect to an IBM i system.
"Not connected to IBM i"
Open the Code for IBM i panel and establish a connection before running the analysis.
"No columns found for LIB/FILE"
- Confirm the file exists in the specified library
- Confirm it is a physical file (
*FILEwith attributePF) - Confirm your IBM i user has
*USEauthority toQSYS2.SYSCOLUMNS
Deep Scan fails or returns no programs
- Your IBM i user needs authority to run
DSPPGMREFand to create objects inQTEMP - Large libraries (thousands of programs) may take several minutes
- If
DSPPGMREFis not available on your IBM i release, use Quick Scan and review programs manually
Limitations
- Only analyzes physical files (
*FILE PF). Logical files and SQL views are shown as dependents, not as input sources. - SQL routine dependencies are listed as potential because
QSYS2.SYSROUTINESdoes not expose the routine body for cross-referencing. Review them manually. - Programs compiled against a logical file (rather than directly against the physical) are only found if the logical file itself appears in the Deep Scan results.
- Deep Scan scans the entire specified library. Cross-library program references are not covered.
Disclaimer
This extension is an independent tool and is not affiliated with or endorsed by IBM.
License
MIT — see LICENSE