Mainframe planning

From OpenHands/extensions · View interactive version

Mainframe planning is an AI agent skill from the GitHub repository OpenHands/extensions. Create a transformation guide for replacing mainframe-specific COBOL constructs with standard COBOL equivalents. Use when preparing COBOL code for local execution or migration.

How to use this skill

Skill file

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:

  1. Pattern: The mainframe construct (e.g., EXEC CICS READ FILE(...))
  2. Replacement: The standard COBOL equivalent
  3. Error Handling: How to replicate the mainframe's error behavior
  1. Resource Cleanup: Any cleanup the replacement requires (CICS auto-manages resources; file I/O does not)
  2. Edge Cases: Behavior differences between mainframe and standard COBOL

Constructs to Address

Data Operations (CICS/IMS/VSAM)

UI/Terminal Operations (BMS maps, screens)

Other Mainframe Constructs

Critical Requirements

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... |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.