Skip to content
Back to skills

Mainfraime Removal

ASecurity

Apply mainframe dependency transformations to COBOL code using a pre-generated transformation guide. Converts CICS/VSAM constructs to standard COBOL.

  • 151 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 5, 2026
testing

Works with

  • terminal

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 5, 2026

npx -y skills add OpenHands/extensions --skill mainframe-removal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mainfraime Removal?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mainfraime Removal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/openhands-mainfraime-removal/badge)](https://www.skillsdirectory.com/skills/openhands-mainfraime-removal)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mainframe-removal
description: Apply mainframe dependency transformations to COBOL code using a pre-generated transformation guide. Converts CICS/VSAM constructs to standard COBOL.
license: MIT
compatibility: Requires GnuCOBOL (cobc) for verification
triggers:
  - remove mainframe
  - cobol transformation
  - cics removal
  - standard cobol
---

Apply the transformations from a transformation guide to convert mainframe-specific COBOL to standard COBOL.

**Prerequisite**: A transformation guide must exist (see `cobol-mainframe-planning` skill).

## Transformation Requirements

### Data Operations

- Replace each CICS/VSAM construct with its standard COBOL equivalent per the plan
- Add FILE STATUS checks after EVERY file operation:
  - Check for success (00) before proceeding
  - Handle "not found" (23) distinctly from I/O errors (3x)
  - Handle "file not exists" (35) at OPEN time
- Add explicit CLOSE statements in all code paths (including error paths)

### UI/Terminal Operations (BMS maps, SEND/RECEIVE)

- Replace with simple stubs or ACCEPT/DISPLAY statements
- Do NOT spend time replicating screen layouts
- Focus on preserving data flow, not UI fidelity

### Error Handling

- Replace CICS RESP/RESP2 checks with equivalent FILE STATUS logic
- Replace HANDLE CONDITION with explicit status checking after operations
- Ensure error paths don't leave files open

See [references/cics-transformation-examples.md](references/cics-transformation-examples.md) for before/after code examples.

## Verification

After transformation:
- Code MUST compile without errors
- Test with valid input → should execute core business logic
- Test with missing/invalid files → should fail gracefully, not crash

## Preserve

- All original business logic
- Data transformations and calculations
- Validation rules

## Checklist

- [ ] All EXEC CICS commands replaced
- [ ] FILE STATUS declared for all files
- [ ] FILE STATUS checked after every I/O operation
- [ ] CLOSE statements in all code paths
- [ ] Code compiles successfully
- [ ] Basic test execution passes

Files in this skill

  • SKILL.md2 KB
  • references/cics-transformation-examples.md807 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…