IBMi Field length Change Impact Analysis
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.
Features
- Right-click integration — invoke directly from the IBM i Object Browser on any
*FILE object
- 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
DSPPGMREF on the library to find every *PGM and *SRVPGM that 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
ibmi-field-impact-analysis-1.0.0.vsix
Or via the terminal:
code --install-extension ibmi-field-impact-analysis-1.0.0.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
*FILE object
- 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
IBMi Field Impact or Analyze Field Length
- Select IBMi Field 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.
Building from Source
Requirements
Setup
git clone <repo-url>
cd ibmi-field-impact-analysis
npm install
Commands
| Command |
Description |
npm run compile |
Compile TypeScript via webpack (development mode) |
npm run watch |
Watch mode — recompiles on save |
npm run package |
Production webpack build (output: dist/extension.js) |
npm run build-vsix |
Production build + package as .vsix |
Project Structure
src/
├── extension.ts # Extension entry point — registers commands
├── commands/
│ └── analyzeImpact.ts # Command handler — user input flow
├── services/
│ └── ibmiService.ts # IBM i connection wrapper + SQL/CL queries
├── panels/
│ └── impactPanel.ts # Webview panel — HTML report generation
└── models/
└── types.ts # Shared TypeScript interfaces
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 (
*FILE with attribute PF)
- Confirm your IBM i user has
*USE authority to QSYS2.SYSCOLUMNS
Deep Scan fails or returns no programs
- Your IBM i user needs authority to run
DSPPGMREF and to create objects in QTEMP
- Large libraries (thousands of programs) may take several minutes
- If
DSPPGMREF is 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.SYSROUTINES does 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.
License
MIT — see LICENSE