g1joshi/agent-skills/g1joshi-agent-skills

Claude Code and agent skill by g1joshi/agent-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Expert COBOL programming assistance covering enterprise batch processing, divisions, copybooks, and data formatting. Use when maintaining legacy banking, government, or mainframe systems.

Install

npx vskill@latest install g1joshi/agent-skills/g1joshi-agent-skills

SKILL.md

COBOL

COBOL runs 70% of the world's business transactions. Modern COBOL (GnuCOBOL 3.2 / IBM Enterprise COBOL) supports JSON, XML, and Object-Oriented features.

When to Use

  • Mainframe Core Banking & Insurance Systems: Maintaining and extending mission-critical legacy financial ledger engines.
  • High-Volume Fixed-Point Financial Calculations: Executing exact decimal math without floating-point rounding errors.
  • Batch Processing on IBM z/OS: Processing millions of nightly accounting records, payroll statements, and clearinghouse transactions.
  • Modernizing Legacy Mainframes via APIs: Wrapping legacy COBOL subprograms with REST/gRPC interfaces via IBM z/OS Connect.

Quick Start

cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Hello, Enterprise COBOL'.
STOP RUN.

Core Concepts

Four Classical Divisions Architecture

Every COBOL program is structured strictly across four standard functional divisions:

cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-BANKING.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-TRANSACTION-AMOUNT PIC 9(7)V99 VALUE 1500.50.
01 WS-FORMATTED-OUTPUT PIC $$,$$$,$$9.99.
PROCEDURE DIVISION.
MOVE WS-TRANSACTION-AMOUNT TO WS-FORMATTED-OUTPUT
DISPLAY "Processed Amount: " WS-FORMATTED-OUTPUT
GOBACK.
Picture Clauses (PIC) for Fixed-Point Arithmetic

Eliminates floating-point rounding discrepancies by defining exact digit layouts and implied decimals (V):

cobol
01 WS-ACCOUNT-BALANCE PIC S9(9)V99 COMP-3.
*> S: Signed, 9 digits before decimal, V: implied decimal, 2 fractional digits
*> COMP-3: Packed Decimal (2 digits per byte) optimized for mainframe ALU
Structured Paragraphs & PERFORM Loops

Modern COBOL (COBOL 2002/2014) utilizes structured control statements:

cobol
PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > 10
ADD WS-ITEM-PRICE(WS-IDX) TO WS-ORDER-TOTAL
END-PERFORM.

Common Patterns

Sequential File Processing Loop

Problem: Processing large fixed-width batch files without loading entire file into memory.

Solution: Use structured READ loop with AT END flag:

cobol
DATA DIVISION.
FILE SECTION.
FD CUSTOMER-FILE.
01 CUSTOMER-RECORD.
05 CUST-ID PIC 9(5).
05 CUST-NAME PIC X(20).
WORKING-STORAGE SECTION.
01 WS-EOF PIC X VALUE 'N'.
88 END-OF-FILE VALUE 'Y'.
PROCEDURE DIVISION.
100-MAIN-PROCESS.
OPEN INPUT CUSTOMER-FILE
PERFORM UNTIL END-OF-FILE
READ CUSTOMER-FILE
AT END
SET END-OF-FILE TO TRUE
NOT AT END
DISPLAY 'Customer: ' CUST-NAME
END-READ
END-PERFORM
CLOSE CUSTOMER-FILE
STOP RUN.

Best Practices

Do:

  • Use COMP-3 (Packed Decimal) for Financial Numbers: Maximize mathematical computation performance on IBM Z enterprise hardware.
  • Adopt Modern Free-Format COBOL: Eliminate column 7-72 restrictions when supported by modern compilers (GnuCOBOL, IBM Enterprise COBOL).
  • Use Explicit Scope Terminators: Always close control blocks with END-IF, END-PERFORM, and END-READ rather than terminal periods.
  • Validate Input Data with NUMERIC Tests: Run IF WS-INPUT-VAL IS NUMERIC to prevent data exception abends (0C7).

Don't:

  • Use GO TO statements: Eliminate unstructured GO TO jumps; use modern structured PERFORM paragraphs.
  • Rely on terminal periods for logic flow: Stray periods terminate all nested IF conditions prematurely.
  • Neglect binary fields initialization: Always initialize working-storage variables with VALUE clauses to prevent garbage data.

Troubleshooting

ErrorCauseSolution
FILE STATUS 35: File not foundPhysical file path not mapped in JCL or environment.Verify ASSIGN TO clause and dataset DD statement.
DATA DIVISION syntax error in Area ADivision, Section, or 01 level headers not starting in columns 8-11.Align level-01 and division headers in Area A (columns 8-11).
FILE STATUS 39: File attributes mismatchRecord length in program differs from cataloged physical file.Ensure RECORD CONTAINS clause matches the actual file block length.

References

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationFailed, 73 of 100Degrading. 1 run. Evaluated 9 months ago.

Source

Popularity

Repository stars
4
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/g1joshi/agent-skills/g1joshi-agent-skills/badge)](https://verified-skill.com/skills/g1joshi/agent-skills/g1joshi-agent-skills)

Something wrong with this skill or its page? Tell us.