pli-migration-analyzer
Skill17 starsChanged 10 months agoMITView on GitHub
Analyzes legacy PL/I (Programming Language One) programs to assist with migration to modern Java applications. Extracts business logic, data structures, procedure definitions, and file operations from PL/I code. Generates migration reports and creates Java implementation strategies. Use when working with mainframe migration, PL/I analysis, legacy system modernization, or when users mention PL/I to Java conversion, analyzing .pli/.PLI/.pl1 files, working with PL/I procedures, or planning Java service implementations from PL/I programs.
In this repository40 other files it gives its agents.
- alibaba-cloudSkill
- application-migrationSkill
- architecture-design-reviewSkill
- architecture-designSkill
- aws-cloudSkill
- azure-cloudSkill
- backend-code-reviewSkill
- backend-codingSkill
- backend-design-reviewSkill
- backend-designSkill
- bug-analysisSkill
- cobol-migration-analyzerSkill
- code-quality-reviewSkill
- code-refactoringSkill
- code-security-reviewSkill
- database-designSkill
- database-migrationSkill
- devopsSkill
- frontend-code-reviewSkill
- frontend-codingSkill
- frontend-design-reviewSkill
- frontend-ui-ux-designSkill
- fujitsu-mainframeSkill
- git-commitSkill
- google-cloudSkill
- ibm-cloudSkill
- ibm-mainframeSkill
- integration-testingSkill
- jcl-migration-analyzerSkill
- keycloak-administrationSkill
- mockup-creationSkill
- oracle-cloudSkill
- platform-migrationSkill
- project-planningSkill
- pseudocode-to-specificationSkill
- requirement-reviewSkill
- requirements-gatheringSkill
- rpg-migration-analyzerSkill
- system-migrationSkill
- technical-writingSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Dependencies: CALL statements, %INCLUDE directives
- Distinctive: line 34
Use scripts for automation:
- Distinctive: line 59
Create Java classes using:
- Distinctive: line 126
Refactor GO TO statements: - Use structured control flow
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PL/I Migration Analyzer
Analyzes legacy PL/I programs and generates Java migration strategies. Extracts business logic, data structures, procedures, and dependencies to produce actionable migration plans.
Workflow
1. Discover PL/I Programs
Find PL/I source files in the workspace:
find . -name "*.pli" -o -name "*.PLI" -o -name "*.pl1"2. Analyze Program Structure
For each PL/I program, extract:
- Entry points: PROCEDURE OPTIONS(MAIN)
- Declarations: DCL statements (FIXED DECIMAL, FIXED BINARY, CHARACTER, BIT, structures)
- Procedures: Nested procedures and functions
- File operations: OPEN, READ, WRITE, CLOSE statements
- Exception handling: ON conditions (ENDFILE, ERROR, etc.)
- Dependencies: CALL statements, %INCLUDE directives
Use scripts for automation:
extract-structure.py <source_file>- Extract structural informationanalyze-dependencies.sh <directory>- Generate dependency graphestimate-complexity.py <source_file>- Estimate migration effort
3. Map to Java Design
Convert PL/I elements to Java:
- Structures → POJOs with appropriate types
- Procedures → Service methods
- File operations → Java I/O or database operations
- ON conditions → try-catch exception handling
- Arrays → Lists or arrays (adjust 1-based to 0-based indexing)
Critical Type Mapping:
FIXED DECIMAL(n,m)→BigDecimal(NEVER float/double)FIXED BINARY(n)→int,longCHARACTER(n)→StringBIT(1)→boolean
4. Generate Java Implementation
Create Java classes using:
generate-java-classes.py <data_structure_file>- Generate POJOs from structures
Ensure:
- BigDecimal for all financial calculations
- Proper exception handling (no GO TO)
- Array bounds adjustment (1-based → 0-based)
- String operations adjustment (SUBSTR is 1-based, substring is 0-based)
5. Produce Migration Report
Generate comprehensive report with:
- Program Overview: Purpose, entry points, complexity estimate
- Dependencies: Called procedures, included files, external references
- Data Structures: Tables with PL/I types and Java equivalents
- Business Logic Summary: Key algorithms and rules
- Java Design: Proposed classes, methods, packages
- Migration Estimate: Effort in person-days, risk assessment
- Action Items: Prioritized tasks with owners
Use template: assets/migration-report-template.md
Quick Reference
Common Conversions
Procedure to Method:
CALC_TOTAL: PROCEDURE(qty, price) RETURNS(FIXED DECIMAL(15,2));
result = qty * price;
RETURN(result);
END CALC_TOTAL;→
public BigDecimal calcTotal(BigDecimal qty, BigDecimal price) {
return qty.multiply(price);
}File I/O to Streams:
DO WHILE(¬eof);
READ FILE(infile) INTO(rec);
CALL process_record(rec);
END;→
try (BufferedReader reader = Files.newBufferedReader(path)) {
reader.lines().forEach(this::processRecord);
}Critical Rules
- Use BigDecimal for FIXED DECIMAL - Float/double lose precision
- Arrays are 1-based in PL/I, 0-based in Java - Adjust loops and indices
- Refactor GO TO statements - Use structured control flow
- ON conditions map to try-catch - Exception handling strategy required
- SUBSTR is 1-based - Java substring is 0-based and end-exclusive
Detailed References
For comprehensive information:
- Type mapping & patterns: pli-reference.md - Complete data type conversions, code patterns, migration checklist, common pitfalls
- Pseudocode translation: pseudocode-pli-rules.md - Rules for converting PL/I to pseudocode
- Transaction handling: transaction-handling.md - Database transaction patterns
- Performance: performance-patterns.md - Optimization strategies
- Messaging: messaging-integration.md - Event-driven patterns
- Testing: testing-strategy.md - Test approach and validation
Output Format
Structure migration reports with these sections:
# [Program Name] Migration Analysis
## Executive Summary
High-level overview and recommendations
## Program Overview
Purpose, functionality, complexity metrics
## Dependencies
Procedure calls, file dependencies, external references
## Data Structures
Tables mapping PL/I structures to Java classes
## Business Logic Analysis
Key algorithms, rules, calculations
## Java Design Proposal
Package structure, class design, API interfaces
## Migration Estimate
Effort (person-days), risk level, timeline
## Action Items
Prioritized tasks with acceptance criteriaDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

