Agent skill
mainframe-planning
Create a transformation guide for replacing mainframe-specific COBOL constructs with standard COBOL equivalents. Use when preparing COBOL code for local execution or migration.
Install this agent skill to your Project
npx add-skill https://github.com/OpenHands/extensions/tree/main/plugins/cobol-modernization/skills/mainframe-planning
SKILL.md
Create a comprehensive transformation guide that maps each mainframe dependency to its standard COBOL replacement.
This guide is a prerequisite for the actual transformation — DO NOT modify any code, only create the guide.
Output Format
Document each mainframe-specific construct with:
- Pattern: The mainframe construct (e.g.,
EXEC CICS READ FILE(...)) - Replacement: The standard COBOL equivalent
- Error Handling: How to replicate the mainframe's error behavior
- Map CICS RESP/RESP2 codes to FILE STATUS equivalents
- Specify which FILE STATUS values to check (e.g., 00=success, 23=not found, 35=file not exists)
- Resource Cleanup: Any cleanup the replacement requires (CICS auto-manages resources; file I/O does not)
- Edge Cases: Behavior differences between mainframe and standard COBOL
Constructs to Address
Data Operations (CICS/IMS/VSAM)
- READ, WRITE, REWRITE, DELETE operations
- STARTBR, READNEXT, READPREV (browse operations)
- CICS error handling: HANDLE CONDITION, RESP/RESP2 options
- VSAM → sequential or indexed file I/O
UI/Terminal Operations (BMS maps, screens)
- SEND MAP, RECEIVE MAP → these can be MOCKED or stubbed
- Screen I/O is not needed for business logic validation
- Document how to replace with simple ACCEPT/DISPLAY or test harness stubs
- Focus on preserving the data flow, not the UI interaction
Other Mainframe Constructs
- Mainframe data types (COMP-3 packed decimal, etc.)
- JCL-embedded constructs
- IMS calls (if present)
Critical Requirements
- Every CICS command that can fail MUST have an error handling replacement documented
- UI operations should be clearly marked as "mock/stub" so the agent doesn't get stuck on them
- Prefer: file-based I/O over mainframe I/O, standard data types over mainframe types
Common Mappings Reference
FILE STATUS Codes
| Code | Meaning | CICS Equivalent |
|---|---|---|
| 00 | Success | Normal completion |
| 23 | Record not found | NOTFND condition |
| 35 | File does not exist | NOTOPEN condition |
| 22 | Duplicate key | DUPREC condition |
| 3x | I/O errors | Various IOERR conditions |
CICS to Standard COBOL
| CICS Command | Standard COBOL |
|---|---|
EXEC CICS READ FILE(...) |
READ filename INTO... |
EXEC CICS WRITE FILE(...) |
WRITE record-name FROM... |
EXEC CICS REWRITE FILE(...) |
REWRITE record-name FROM... |
EXEC CICS DELETE FILE(...) |
DELETE filename RECORD |
EXEC CICS STARTBR FILE(...) |
START filename KEY... |
EXEC CICS READNEXT FILE(...) |
READ filename NEXT INTO... |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
releasenotes
Generate formatted changelogs from git history since the last release tag. Use when preparing release notes that categorize changes into breaking changes, features, fixes, and other sections.
bitbucket
Interact with Bitbucket repositories and pull requests using the BITBUCKET_TOKEN environment variable. Use when working with code hosted on Bitbucket or managing Bitbucket resources via API.
add-skill
Add an external skill from a GitHub repository to the current workspace. Use when users want to import, install, or add a skill from a GitHub URL (e.g., `/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview` or "add the codereview skill from https://github.com/OpenHands/extensions/"). Handles fetching the skill files and placing them in .agents/skills/.
add-javadoc
Add comprehensive JavaDoc documentation to Java classes and methods. Use when documenting Java code, adding API documentation, or improving code documentation.
flarglebargle
A test skill that responds to the magic word "flarglebargle" with a compliment. Use for testing skill activation and trigger functionality.
codereview-roasted
Brutally honest code review in the style of Linus Torvalds, focusing on data structures, simplicity, and pragmatism. Use when you want critical, no-nonsense feedback that prioritizes engineering fundamentals over style preferences.
Didn't find tool you were looking for?