xiaohongshu
xiaohongshu
cobol-migration-analyzer
Analyzes legacy COBOL programs and JCL jobs to assist with migration to modern Java applications. Extracts business logic, identifies dependencies, generates migration reports, and creates Java implementation strategies. Use when working with mainframe migration, COBOL analysis, legacy system mod...
Full skill instructions
Analyze legacy COBOL programs and JCL scripts for migration to Java. Extract business logic, data structures, and dependencies to generate actionable migration strategies.
Extract COBOL divisions (IDENTIFICATION, ENVIRONMENT, DATA, PROCEDURE), Working-Storage variables, file definitions (FD), business logic paragraphs, PERFORM statements, CALL hierarchies, embedded SQL, and error handling patterns.
Parse JCL job steps, program invocations, data dependencies (DD statements), conditional logic (COND, IF/THEN/ELSE), return codes, and resource requirements.
Extract record layouts with level numbers, REDEFINES clauses, group items, OCCURS clauses, and picture clauses. Generate Java POJOs from copybook structures.
Build complete dependency graphs showing CALL hierarchies, copybook usage, file dependencies, database table access, and shared utility references across the codebase.
Find COBOL programs, JCL jobs, and copybooks:
find . -name "*.cbl" -o -name "*.CBL" -o -name "*.cob"
find . -name "*.jcl" -o -name "*.JCL"
find . -name "*.cpy" -o -name "*.CPY"
Use scripts/analyze-dependencies.sh or scripts/analyze-dependencies.ps1 to generate dependency graph.
Use scripts/extract-structure.py to parse COBOL programs and extract divisions, variables, paragraphs, and dependencies in JSON format.
Use scripts/generate-java-classes.py to convert copybooks to Java POJOs with appropriate data types and Bean Validation annotations.
Use scripts/estimate-complexity.py to calculate migration complexity based on LOC, external calls, file operations, SQL statements, and control flow.
Document program overview, dependencies, data structures, business logic patterns, proposed Java design, migration estimate, and action items.
| COBOL Picture | Java Type | Notes |
|---|---|---|
PIC 9(n) | int, long, BigInteger | Unsigned numeric |
PIC S9(n) | int, long, BigInteger | Signed numeric |
PIC 9(n)V9(m) | BigDecimal | Unsigned decimal |
PIC S9(n)V9(m) | BigDecimal | Signed decimal |
PIC S9(n)V9(m) COMP-3 | BigDecimal | Packed decimal - critical precision! |
PIC S9(n) COMP / BINARY | int, long | Binary storage |
PIC S9(n) COMP-1 | float | Single precision (avoid for financial) |
PIC S9(n) COMP-2 | double | Double precision (avoid for financial) |
PIC X(n) | String | Alphanumeric/character |
PIC A(n) | String | Alphabetic only |
PIC N(n) | String | National/Unicode |
OCCURS n | List<T> or T[] | Fixed arrays/tables |
OCCURS n DEPENDING ON | List<T> | Variable-length arrays |
88 level | enum or constants | Condition names |
INDEX | int | Table index (1-based in COBOL) |
READ...AT END → BufferedReader with try-with-resources or NIO streamsREWRITE → Update operations in DB or file systemsSEARCH → Linear search with streamsSEARCH ALL → Collections.binarySearch() or stream().filter().findFirst()STRING/UNSTRING → StringBuilder or String.split()INSPECT → String.replace(), replaceAll(), or regexswitch statement (Java 14+ with enhanced switch)FUNCTION INTEGER-OF-DATE → LocalDate operationsLocalDate.now(), LocalTime.now()enum or typed constantsCOBOL Copybook:
01 EMPLOYEE-RECORD.
05 EMP-ID PIC 9(6).
05 EMP-NAME PIC X(30).
05 EMP-SALARY PIC S9(7)V99 COMP-3.
Generated Java:
public class EmployeeRecord {
private int empId;
private String empName;
private BigDecimal empSalary;
// getters/setters
}
Critical Patterns:
BigDecimal for COMP-3 and numeric with decimals (never float/double)BigDecimal with exact scale for financial calculationsOutput Requirements:
For detailed conversion rules and patterns, see:
All scripts support cross-platform execution (Windows PowerShell, bash):
analyze-dependencies.sh/ps1 - Generate dependency graphextract-structure.py - Parse COBOL structure to JSONgenerate-java-classes.py - Convert copybooks to Java POJOsestimate-complexity.py - Calculate migration complexity scoreScripts use standard libraries only and output JSON for easy integration with CI/CD pipelines.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience