

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345## Context67This instruction file applies to mainframe source files: IBM COBOL programs, High Level Assembler (HLASM) source, Job Control Language (JCL), and COBOL copybooks. These programs run on IBM z/OS and interact with CICS (transaction processing), DB2 z/OS (relational database), VSAM (indexed file system), and QSAM (sequential datasets). This context is used both for understanding existing programs and for generating migration artifacts. When explaining COBOL, always note the Java equivalent to assist modernization engineers.89---1011## COBOL Coding Standards1213- **IBM Enterprise COBOL 6.x** syntax — dialect-specific features are acceptable14- Respect the four division structure: `IDENTIFICATION`, `ENVIRONMENT`, `DATA`, `PROCEDURE`15- Every program must have a `PROGRAM-ID` in `IDENTIFICATION DIVISION`16- `WORKING-STORAGE SECTION` holds persistent data for the life of the program17- `LOCAL-STORAGE SECTION` holds thread-local data (re-initialized on each CICS task)18- `LINKAGE SECTION` defines parameters passed via `COMMAREA` or `CALL` interface19- Column layout (fixed-format): columns 1–6 sequence, column 7 indicator (`*` = comment, `-` = continuation), columns 8–11 Area A, columns 12–72 Area B, columns 73–80 identification20- **Copybooks:** Use `COPY` statements for shared record layouts — never inline what belongs in a copybook. Copybooks live in the `COPYLIB` or equivalent library21- **Host variable naming:** DB2 host variables are prefixed `HV-` (e.g., `HV-CUSTOMER-ID`)22- **Return code:** Return code stored in `RETURN-CODE` special register or passed via `WS-RETURN-CODE`2324---2526## COBOL Patterns2728### Basic Program Structure2930```cobol31 IDENTIFICATION DIVISION.32 PROGRAM-ID. CUSTINQ.33 AUTHOR. ENTERPRISE TEAM.34 *----------------------------------------------------------------*35 * DESCRIPTION: Customer inquiry program *36 * CALLED BY: CICS transaction CINQ *37 *----------------------------------------------------------------*38 ENVIRONMENT DIVISION.39 CONFIGURATION SECTION.40 SOURCE-COMPUTER. IBM-ZOS.41 OBJECT-COMPUTER. IBM-ZOS.4243 DATA DIVISION.44 WORKING-STORAGE SECTION.45 01 WS-RETURN-CODE PIC S9(4) COMP VALUE ZEROS.46 01 WS-CUSTOMER-RECORD.47 05 WS-CUST-ID PIC 9(10) VALUE ZEROS.48 05 WS-CUST-NAME PIC X(50) VALUE SPACES.49 05 WS-CUST-BALANCE PIC S9(13)V99 COMP-3 VALUE ZEROS.5051 LINKAGE SECTION.52 01 DFHCOMMAREA.53 05 CA-REQUEST-TYPE PIC X(1).54 05 CA-CUSTOMER-ID PIC 9(10).55 05 CA-RESPONSE-CODE PIC S9(4) COMP.5657 PROCEDURE DIVISION.58 PERFORM 1000-INITIALIZE59 PERFORM 2000-PROCESS60 PERFORM 9000-RETURN61 STOP RUN.6263 1000-INITIALIZE.64 MOVE ZEROS TO WS-RETURN-CODE.6566 2000-PROCESS.67 EVALUATE CA-REQUEST-TYPE68 WHEN 'I'69 PERFORM 2100-INQUIRE-CUSTOMER70 WHEN OTHER71 MOVE 8 TO CA-RESPONSE-CODE72 END-EVALUATE.7374 2100-INQUIRE-CUSTOMER.75 MOVE CA-CUSTOMER-ID TO HV-CUST-ID76 EXEC SQL77 SELECT CUST_NAME, CUST_BALANCE78 INTO :HV-CUST-NAME, :HV-CUST-BALANCE79 FROM SCHEMA.CUSTOMERS80 WHERE CUST_ID = :HV-CUST-ID81 END-EXEC82 EVALUATE SQLCODE83 WHEN 084 MOVE HV-CUST-NAME TO WS-CUST-NAME85 MOVE HV-CUST-BALANCE TO WS-CUST-BALANCE86 WHEN 10087 MOVE 4 TO CA-RESPONSE-CODE88 WHEN OTHER89 MOVE 12 TO CA-RESPONSE-CODE90 END-EVALUATE.9192 9000-RETURN.93 EXEC CICS RETURN END-EXEC.94```9596### DB2 Embedded SQL Host Variables9798```cobol99 WORKING-STORAGE SECTION.100 * DB2 SQLCA - always include for SQLCODE checking101 EXEC SQL INCLUDE SQLCA END-EXEC.102 * Host variables - prefix HV-103 01 HV-CUST-ID PIC 9(10) VALUE ZEROS.104 01 HV-CUST-NAME PIC X(50) VALUE SPACES.105 01 HV-CUST-BALANCE PIC S9(13)V99 COMP-3 VALUE ZEROS.106 01 HV-NULL-IND PIC S9(4) COMP VALUE ZEROS.107```108109### CICS Command Patterns110111```cobol112 * Read from CICS COMMAREA113 EXEC CICS114 ADDRESS COMMAREA(WS-COMMAREA-PTR)115 LENGTH(WS-COMMAREA-LEN)116 END-EXEC.117118 * Read a VSAM file via CICS119 EXEC CICS READ120 FILE('CUSTFILE')121 INTO(WS-CUSTOMER-RECORD)122 RIDFLD(WS-CUST-ID)123 RESP(WS-CICS-RESP)124 RESP2(WS-CICS-RESP2)125 END-EXEC.126 EVALUATE WS-CICS-RESP127 WHEN DFHRESP(NORMAL) CONTINUE128 WHEN DFHRESP(NOTFND) MOVE 4 TO WS-RETURN-CODE129 WHEN OTHER MOVE 12 TO WS-RETURN-CODE130 END-EVALUATE.131```132133### COBOL → Java Mapping Reference134135| COBOL Construct | Java Equivalent |136|----------------|----------------|137| `PIC 9(10)V99` | `BigDecimal` with scale 2 |138| `PIC X(50)` | `String` (max 50 chars) |139| `PIC S9(4) COMP` | `short` or `int` |140| `PIC S9(9) COMP` | `int` or `long` |141| `COMP-3` (packed decimal) | `BigDecimal` |142| `WORKING-STORAGE` fields | Instance fields or method-local variables |143| `LOCAL-STORAGE` fields | Method-local variables (re-initialized per call) |144| `LINKAGE SECTION` | Method parameters |145| `PERFORM UNTIL` | `while` loop |146| `PERFORM n TIMES` | `for (int i = 0; i < n; i++)` loop |147| `EVALUATE` | `switch` expression |148| `COPY` copybook | Java interface, abstract class, or shared record |149| `EXEC SQL ... END-EXEC` | Spring Data JPA `@Query` or `JdbcTemplate` |150| `EXEC CICS ... END-EXEC` | REST endpoint call or message queue |151| `MOVE SPACES TO field` | `field = "";` or `field = null;` |152| `MOVE ZEROS TO field` | `field = 0;` or `BigDecimal.ZERO` |153| `INSPECT ... TALLYING` | String processing with regex or streams |154| `STRING ... INTO` | `String.format()` or `StringBuilder` |155156---157158## Anti-Patterns — Flag and Explain159160| Pattern | Action |161|---------|--------|162| `ALTER verb` | **Do not generate.** Flag as deprecated and unmaintainable — restructure using `EVALUATE` |163| `GO TO label` | Flag — suggest `PERFORM` with structured paragraphs instead |164| `PERFORM THRU` with fall-through | Flag — risk of unintended paragraph execution; restructure as explicit `PERFORM` calls |165| Dynamic SQL from input fields | Flag as SQL injection risk — explain parameterized host variables |166| `STOP RUN` inside nested `PERFORM` | Flag — causes program termination from a subroutine, not just the paragraph |167| Missing `EVALUATE SQLCODE` after `EXEC SQL` | Flag — all DB2 operations must check `SQLCODE` |168| Missing `RESP` on `EXEC CICS` | Flag — CICS errors must be handled via `RESP`/`RESP2`, not `ABEND` assumption |169170---171172## JCL Standards173174```jcl175//JOBNAME JOB (ACCT),'DESCRIPTION',CLASS=A,MSGCLASS=X,176// NOTIFY=&SYSUID,MSGLEVEL=(1,1)177//*--------------------------------------------------------------------*178//* Step 1: Run the customer inquiry program *179//*--------------------------------------------------------------------*180//STEP1 EXEC PGM=CUSTINQ,REGION=0M181//STEPLIB DD DSN=LOAD.LIBRARY,DISP=SHR182//SYSOUT DD SYSOUT=*183//SYSPRINT DD SYSOUT=*184//INPUT DD DSN=INPUT.DATASET,DISP=SHR185//OUTPUT DD DSN=OUTPUT.DATASET,186// DISP=(NEW,CATLG,DELETE),187// SPACE=(CYL,(10,5),RLSE),188// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)189```190191---192193## Assembler (HLASM) Standards194195- Register conventions: R0–R1 = parameters/return, R13 = save area, R14 = return address, R15 = return code / entry point196- Always save registers at entry with `STM R14,R12,12(R13)` and restore with `LM R14,R12,12(R13)`197- Use standard save area linkage: `SAVE (14,12)` / `RETURN (14,12)`198- Macro invocations should be documented with a preceding comment explaining the purpose199- DSECT definitions for mapped storage areas must be named descriptively200201---202203## Modernization Context204205When analyzing COBOL for modernization:2062071. **Identify bounded contexts** — map program groups to Java microservice candidates2082. **Extract business rules** — separate computation logic from I/O and infrastructure2093. **Flag semantic risks** — where COBOL numeric precision (`COMP-3`) differs from Java floating point, use `BigDecimal`2104. **CICS = synchronous transaction** — maps to a synchronous REST endpoint or a queued command2115. **Batch JCL job** — maps to a Spring Batch job with `ItemReader` / `ItemProcessor` / `ItemWriter`2126. **VSAM KSDS** — maps to a relational table or key-value store depending on access pattern2137. Always produce a **semantic risk matrix**: what was preserved, what changed, what requires human validation214215---216217## Test Conventions218219When generating test artifacts for COBOL modernization:220- Write Java tests that validate the extracted business rules against known input/output pairs derived from the COBOL logic221- Use `@ParameterizedTest` with real data samples extracted from COBOL `WORKING-STORAGE` test values222- Flag any numeric precision differences between COBOL packed decimal and Java `BigDecimal` in test assertions223
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| doubts-suplab/eeik-bootstrap.clinerules/golden-rules.md · 1 | Cline rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.clinerules/project.md · 1 | Cline rules | teststylegit | 63/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/architecture.mdc · 1 | Cursor rules | do-not | 52/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/capabilities.mdc · 1 | Cursor rules | teststylegit | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/golden-rules.mdc · 1 | Cursor rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/python.mdc · 1 | Cursor rules | lint-formatstyletypesapi+1 | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/security.mdc · 1 | Cursor rules | security | 39/100 | today | |
| doubts-suplab/eeik-bootstrap.github/copilot-instructions.md · 1 | Copilot instructions | lint-formatstyletesting-strategygit+2 | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/a2a-protocol.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/ai-governance.instructions.md · 1 | Copilot instructions | stylearchdo-notagent-behaviour | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/angular.instructions.md · 1 | Copilot instructions | teststyletypestesting-strategy+4 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/architecture-governance.instructions.md · 1 | Copilot instructions | testlint-formatstylegit+4 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/autogen.instructions.md · 1 | Copilot instructions | typessecurityagent-behaviour | 50/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-architecture.instructions.md · 1 | Copilot instructions | styletypessecurityperformance | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-data-ml-ai.instructions.md · 1 | Copilot instructions | deployment | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cdk-terraform.instructions.md · 1 | Copilot instructions | teststylearchtypes+2 | 96/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cicd.instructions.md · 1 | Copilot instructions | stylesecuritydeploymentdo-not+1 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/containerisation.instructions.md · 1 | Copilot instructions | buildstylesecuritydo-not | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/crewai.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/data-engineering.instructions.md · 1 | Copilot instructions | teststyletypesgit+5 | 69/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 65 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 14 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 14 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 14 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 13 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 32k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 7 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/doubts-suplab-eeik-bootstrap-github-instructions-mainframe-instructions)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.