IBM i SourceAnalysis Playbook
Purpose
Use this skill for read-only discovery and impact analysis over exported IBM i source, especially under /home/hcantor/Projects/SourceAnalysis/SourceAnalysis_prod.
Observed SourceAnalysis Layout
The top-level folders under SourceAnalysis_prod are library-style exports. Do not assume every library has the same shape.
AI2has asource/subfolder with RPGLE, CL, CLLE, and related source members. It also hastables.sql.fedpgmshas a largesource/subfolder with RPG, RPGLE, CLLE, SQLRPGLE, and other source artifacts.PRGMSTDhas nosource/subfolder; its RPG/RPGLE source members live directly in thePRGMSTDfolder.fedfileshas table and logical-file metadata:tables.sql,indexes.sql, andDSPFD_LOGICALS.txt.convfiles,SENTRY, andWSFILE001havetables.sqlandDSPFD_LOGICALS.txt.WSLIBE001has IBM i source-physical-file style subfolders:qrpgsrcandqclsrc, both containing program source.
When analyzing a library, first classify it as a source library, metadata library, or mixed library before searching for members.
Workflow
- Start by identifying the exact object, field, file, program, menu, or screen the user cares about.
- Inspect the library layout before broad searching. Check for a
source/subfolder, IBM i source-physical-file style folders such asqrpgsrcandqclsrc, root-level source members, and metadata files such astables.sql,indexes.sql, andDSPFD_LOGICALS.txt. See reference.md. - For program impact, search
source/subfolders, IBM i source folders such asqrpgsrcandqclsrc, and root-level source folders such asPRGMSTD. - For file, table, index, or logical-file impact, check the metadata libraries before interpreting program references.
- For file or field impact, check:
- RPG/RPGLE F-specs and SQL statements.
- READ, CHAIN, WRITE, UPDATE, DELETE, EXCPT, and embedded SQL usage.
- CALL, CALLB, bound module, and menu references.
- Display-file fields and DSPFD exports when screen behavior matters.
- If normal workspace search returns no results, assume exported or nested trees may be ignored. Use exact paths, narrower reads, or ask for permission before using unrestricted filesystem search.
- Separate evidence from inference. Report which files were observed directly and what remains uncertain.
Output Format
For impact analysis, return:
- Target: the object, field, file, or program analyzed.
- Evidence: source paths and relevant symbols or statements.
- Access pattern: reads, writes, updates, deletes, calls, display usage, or unknown.
- Dependency chain: upstream callers and downstream files/programs when found.
- Confidence: high, medium, or low, with the reason.
Guardrails
- Do not edit exported production source unless the user explicitly asks.
- Do not treat generated exports as complete truth when a source member, DSPFD export, and SQL catalog artifact disagree; call out the mismatch.
- Prefer small, cited findings over large undifferentiated dumps.