-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the com.castsoftware.labs.ibmi.bind wiki!
Warning: The Extension described in this document is delivered as-is. This Extension is made available by CAST Labs Community and governed by Open Source License. Please consider all necessary steps to validate and to test the Extension in your environment before using it in production.
The extension is published under GNU LGPL v3 open source license
- Introduction
- In what situation should you install this extension?
- CAST AIP versions compatibility
- Supported DBMS servers
- Configuration instructions
- Operation instructions
- What results can you expect?
- Known issues
- Limitations and potential enhancements
- Release Notes
This extension adds support for IBM i ILE (Integrated Language Environment) binding relationships — the module/program/service-program/binding-directory dependency graph that the native RPGLE, CLLE, COBOL, and C source parsers cannot see, because ILE binding is resolved by the system binder (CRTPGM/CRTSRVPGM), not by anything visible at the source-code call site.
It modelizes the main artifacts as follows:
- ILE Program
- ILE Service Program
- ILE Module
- ILE Binding Directory
The extension does not compile or connect to a live IBM i system. It consumes four flat-file extracts (produced from QSYS2.PROGRAM_INFO, QSYS2.BOUND_MODULE_INFO, QSYS2.BOUND_SRVPGM_INFO, and QSYS2.BINDING_DIRECTORY_INFO) that are delivered alongside the RPGLE/CLLE/COBOL/C/binder source, and reconstructs the binding topology from them.
Install this extension when your application is built on IBM i using the ILE model (as opposed to the legacy OPM model) and uses service programs, binding directories, or bound modules — i.e. any shop using CRTPGM, CRTSRVPGM, CRTRPGMOD, CRTCLMOD, CRTCMOD, CRTCBLMOD, CRTSQLRPGI, CRTBNDDIR, or ADDBNDDIRE.
This extension provides the following support:
- Knowledge Discovery: a green tick indicates that Impact Analysis within Enlighten is supported, as far as links accuracy permits.
- Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported.
- Sizing: a green tick indicates that the quality model can measure technical sizes.
- Quality: a green tick indicates that a minimum set of Quality Rules exists.
| Knowledge Discovery | FP count | Sizing | Quality |
|---|---|---|---|
| ✅ | ❌ | ❌ | ❌ |
This extension is compatible with all AIP versions 8.3.x
This extension is compatible with the following DBMS servers (hosting the Analysis Service):
| CAST AIP release | CSS3 | CSS4 | PG on Linux |
|---|---|---|---|
| All supported releases | ✅ | ✅ | ✅ |
Once registered, this extension is integrated into a manual process of a Universal Analysis. No further configuration is required beyond mapping the four required input extensions (see below).
This extension does not read RPGLE/CLLE/COBOL/C source directly for binding purposes — it reads four flat-file extracts that must be generated before analysis, from either:
- a live IBM i system, via the
QSYS2SQL Services views, or
| Source Type | Required Extension | Mandatory/Optional |
|---|---|---|
| Program/service program inventory | .csv_program_info |
Mandatory |
| Module binding data (bind by copy) | .csv_bound_module_info |
Mandatory |
| Service program binding data (bind by reference) | .csv_bound_srvpgm_info |
Mandatory |
| Binding directory contents | .csv_binding_directory_info |
Optional — improves accuracy where programs resolve bindings via a binding directory rather than direct MODULE()/BNDSRVPGM() parameters |
Expected column layout (delimiter: ;):
.csv_program_info
PROGRAM_LIBRARY;PROGRAM_NAME;PROGRAM_TYPE;OBJECT_TYPE
.csv_bound_module_info
PROGRAM_LIBRARY;PROGRAM_NAME;BOUND_MODULE_LIBRARY;BOUND_MODULE
.csv_bound_srvpgm_info
PROGRAM_LIBRARY;PROGRAM_NAME;BOUND_SERVICE_PROGRAM_LIBRARY;BOUND_SERVICE_PROGRAM
.csv_binding_directory_info
BINDING_DIRECTORY_LIBRARY;BINDING_DIRECTORY;ENTRY_LIBRARY;ENTRY;ENTRY_TYPE
If extracting from a live system, run the following queries (adjust the library filter as needed) and export each result set as a ;-delimited flat file with the matching extension above:
SELECT PROGRAM_LIBRARY, PROGRAM_NAME, PROGRAM_TYPE, OBJECT_TYPE
FROM QSYS2.PROGRAM_INFO
WHERE PROGRAM_LIBRARY IN ('YOURLIB1','YOURLIB2')
SELECT PROGRAM_LIBRARY, PROGRAM_NAME, BOUND_MODULE_LIBRARY, BOUND_MODULE
FROM QSYS2.BOUND_MODULE_INFO
WHERE PROGRAM_LIBRARY IN ('YOURLIB1','YOURLIB2')
SELECT PROGRAM_LIBRARY, PROGRAM_NAME, BOUND_SERVICE_PROGRAM_LIBRARY, BOUND_SERVICE_PROGRAM
FROM QSYS2.BOUND_SRVPGM_INFO
WHERE PROGRAM_LIBRARY IN ('YOURLIB1','YOURLIB2')
SELECT BINDING_DIRECTORY_LIBRARY, BINDING_DIRECTORY, ENTRY_LIBRARY, ENTRY, ENTRY_TYPE
FROM QSYS2.BINDING_DIRECTORY_INFO
WHERE BINDING_DIRECTORY_LIBRARY IN ('YOURLIB1','YOURLIB2')Note:
QSYS2.PROGRAM_INFO,BOUND_MODULE_INFO, andBOUND_SRVPGM_INFOrequire IBM i 7.3 TR7 / 7.4 TR1 or later.QSYS2.BINDING_DIRECTORY_INFOrequires IBM i 7.4 TR6 / 7.5 or later. Verify availability with:SELECT TABLE_NAME FROM QSYS2.SYSTABLES WHERE TABLE_SCHEMA = 'QSYS2' AND TABLE_NAME IN ('PROGRAM_INFO','BOUND_MODULE_INFO','BOUND_SRVPGM_INFO','BINDING_DIRECTORY_INFO')On older releases, use
DSPPGM/DSPSRVPGM/DSPBNDDIRwithOUTPUT(*OUTFILE)(driven viaQSYS2.QCMDEXCif staying SQL-only) as a fallback.
Create manually a single Analysis Unit for all the languages and select the root of source code (including the four CSV extracts) in the Deploy folder.
Analysis is conducted as follows:
- The Universal Analyzer engine runs on the four CSV extracts.
- Rows are buffered during the file scan.
- Objects and links are created once all four files have been read, so processing order across files does not affect results.
- This task produces a log file, important to check.
As for any analysis, the following checks must be performed in order to ensure correct results:
-
Check the logs described above:
- Errors should be fixed.
- Warning messages should be explained or fixed.
- Sample potential warning:
Library/folder mismatch: CSV declares library 'X' but file is under folder 'Y'— indicates the source delivery does not follow the folder==library convention (see Known issues). Review before trusting the resulting dependency graph.
-
Check Analysis Unit content:
- Check that the AU content has a reasonable number of ILE Program / ILE Service Program / ILE Module / ILE Binding Directory objects, in line with the source code delivered.
Custom objects will be created in the Analysis Service as follows:
| Custom object type | Source CSV |
|---|---|
| ILE Program |
.csv_program_info (OBJECT_TYPE = *PGM) |
| ILE Service Program |
.csv_program_info (OBJECT_TYPE = *SRVPGM) |
| ILE Module |
.csv_bound_module_info, .csv_binding_directory_info (ENTRY_TYPE = *MODULE) |
| ILE Binding Directory | .csv_binding_directory_info |
| Link type | Caller type | Callee type | Source CSV | Meaning |
|---|---|---|---|---|
| containLink | ILE Program / ILE Service Program | ILE Module | .csv_bound_module_info |
Bind by copy — the module's compiled code is physically part of the caller |
| containLink | ILE Program / ILE Service Program | ILE Module |
.csv_binding_directory_info (ENTRY_TYPE = *MODULE) |
Bind by copy, resolved via a binding directory |
| callLink | ILE Program / ILE Service Program | ILE Service Program | .csv_bound_srvpgm_info |
Bind by reference — resolved dynamically at activation time |
| callLink | ILE Program / ILE Service Program | ILE Service Program |
.csv_binding_directory_info (ENTRY_TYPE = *SRVPGM) |
Bind by reference, resolved via a binding directory |
| useLink | ILE Binding Directory | ILE Module / ILE Service Program | .csv_binding_directory_info |
Build-time symbol resolution list — not itself a runtime dependency |
| matchLink | ILE Module | RPG III/IV Module | - | - |
| matchLink | ILE Program | RPG III/IV Program | - | - |
Add a screenshot of the Enlighten transaction/dependency view once available (e.g. a CALCMAIN ILE Program showing containLink to its arithmetic modules and callLink to its bound service program).
None at this time.
None
None
Initial version created by Labs Community. Supports .csv_program_info, .csv_bound_module_info, .csv_bound_srvpgm_info, and .csv_binding_directory_info extracts, producing ILE Program, ILE Service Program, ILE Module, and ILE Binding Directory objects with containLink, callLink, and referenceLink relationships.