

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# Mainframe Extended — Copilot Instructions78> Applied automatically for COBOL, JCL, Assembler, VSAM, and IMS source files. Extends mainframe.instructions.md with advanced z/OS subsystem patterns.910---1112## JES2/JES3 — Job Classes and Priorities1314### Job Card Standards1516```jcl17//PAYROLL1 JOB (FIN-001),'PAYROLL WEEKLY RUN',18// CLASS=B,19// MSGCLASS=X,20// MSGLEVEL=(1,1),21// NOTIFY=&SYSUID,22// PRTY=8,23// REGION=0M,24// TIME=(30,0)25```2627| Parameter | Usage |28|-----------|-------|29| `CLASS=A` | Short interactive/test jobs (< 5 min elapsed) |30| `CLASS=B` | Medium batch jobs (5–30 min), non-priority |31| `CLASS=C` | Long-running production batch (> 30 min) |32| `CLASS=S` | STC (started task) — do not use in JOB cards |33| `PRTY=1–15` | JES2 input priority; production jobs ≥ 8; test jobs ≤ 4 |34| `TIME=(mm,ss)` | CPU time limit — always set to prevent runaway jobs |35| `REGION=0M` | Uses installation-defined maximum region; preferred over a hardcoded value |3637### JES3 Job Classes3839In JES3 environments, job class maps to a device group: `CLASS=D` for tape jobs, `CLASS=T` for test. Confirm with your JES3 JCLOPTs member for the local definition.4041---4243## VSAM — Access Patterns and IDCAMS4445### VSAM Dataset Types4647| Type | Key Structure | Access Pattern | Java Equivalent |48|------|-------------|---------------|----------------|49| KSDS (Key-Sequenced) | Variable-length key | Random + sequential by key | HashMap + sorted map |50| ESDS (Entry-Sequenced) | RBA (byte offset) | Sequential append; random by RBA | Append-only log / sequential file |51| RRDS (Relative Record) | Relative record number | Direct by slot number | Array or DB table with surrogate key |5253### IDCAMS Commands5455```jcl56//DEFVSAM EXEC PGM=IDCAMS57//SYSPRINT DD SYSOUT=*58//SYSIN DD *59 DEFINE CLUSTER ( -60 NAME(PROD.CUSTOMER.KSDS) -61 INDEXED -62 KEYS(10 0) -63 RECORDSIZE(200 500) -64 FREESPACE(20 10) -65 SHAREOPTIONS(2 3) -66 CYLINDERS(100 20) -67 VOLUMES(PROD01) ) -68 DATA ( NAME(PROD.CUSTOMER.KSDS.DATA) ) -69 INDEX ( NAME(PROD.CUSTOMER.KSDS.INDEX) )70/*71```7273### COBOL VSAM REWRITE Rules7475```cobol76* READ for UPDATE before REWRITE — mandatory77 READ CUSTFILE INTO WS-CUSTOMER-RECORD78 KEY IS WS-CUST-ID79 INVALID KEY MOVE 4 TO WS-RETURN-CODE80 NOT INVALID KEY81 PERFORM 3000-UPDATE-RECORD82 END-READ.8384 3000-UPDATE-RECORD.85 * Must REWRITE immediately after READ with UPDATE — no intervening I/O on same file86 MOVE WS-NEW-BALANCE TO WS-CUST-BALANCE87 REWRITE CUSTREC FROM WS-CUSTOMER-RECORD88 INVALID KEY MOVE 8 TO WS-RETURN-CODE89 END-REWRITE.90```9192Never issue `READ ... UPDATE` without a subsequent `REWRITE` or `UNLOCK`. An un-unlocked VSAM record holds a lock for the duration of the task — this causes ENQ conflicts on shared files.9394---9596## IMS DB — Hierarchical Data Model9798### PCB/PSB/DBD Concepts99100| Component | Purpose | Analogy |101|-----------|---------|---------|102| DBD (Database Definition) | Defines physical segment types and hierarchical relationships | Schema/DDL |103| PCB (Program Communication Block) | One PCB per database accessed; defines segment access intent (PROCOPT) | JDBC Connection with permissions |104| PSB (Program Specification Block) | Collection of PCBs for one application program | Spring Bean with multiple DataSource references |105106### PROCOPT Values107108| PROCOPT | Access | Use |109|---------|--------|-----|110| `G` | Get only (read) | Read-only programs |111| `GU` | Get Unique | Random read by key |112| `GN` | Get Next | Sequential read |113| `I` | Insert | Insert only |114| `D` | Delete | Delete only |115| `R` | Replace (update) | Update only |116| `A` | All | Full CRUD — use only when necessary |117118### IMS DL/I Call Pattern (COBOL)119120```cobol121 WORKING-STORAGE SECTION.122 EXEC DLI SCHD PSB(CUSTPSB) END-EXEC.123124 01 CUST-SSA.125 05 SSA-SEGNAME PIC X(8) VALUE 'CUSTSEG '.126 05 SSA-BEGIN-PAREN PIC X VALUE '('.127 05 SSA-FIELD PIC X(8) VALUE 'CUSTID '.128 05 SSA-OPERATOR PIC X(2) VALUE '= '.129 05 SSA-VALUE PIC X(10) VALUE SPACES.130 05 SSA-END-PAREN PIC X VALUE ')'.131132 2000-GET-CUSTOMER.133 MOVE WS-CUST-ID TO SSA-VALUE134 EXEC DLI GU SEGMENT(CUSTSEG) INTO(WS-CUST-RECORD)135 WHERE CUSTID = :SSA-VALUE136 END-EXEC137 IF DIBSTAT = 'GE'138 MOVE 4 TO WS-RETURN-CODE139 END-IF.140```141142---143144## IMS DC — Message Processing145146| Program Type | Trigger | Use Case |147|-------------|---------|---------|148| MPP (Message Processing Program) | IMS transaction code | Interactive online transaction |149| BMP (Batch Message Processing) | Scheduled; can access IMS DB | Batch update with IMS DB access |150| IFP (IMS Fast Path) | High-speed DEDB transactions | Ultra-high volume (> 10K TPS) |151152### MPP Transaction Flow1531541. Terminal input → IMS TM → Input queue → MPP scheduled in IMS region1552. MPP issues `GU IOPCB` to get message from queue1563. MPP processes; issues `ISRT IOPCB` to send response back1574. IMS TM routes response to terminal158159```cobol160 2000-GET-INPUT.161 EXEC DLI GU USING PCB(IOPCB)162 SEGMENT(INMSEG) INTO(WS-INPUT-MSG)163 END-EXEC.164 IF IOAREAL(1:2) = 'QC'165 EXEC DLI CHKP USING PCB(IOPCB) END-EXEC166 STOP RUN167 END-IF.168```169170---171172## IBM MQ Series173174### Key Concepts175176| Concept | Description |177|---------|------------|178| Queue Manager | MQ server instance; name convention: `QM.{ENV}.{LOCATION}` (e.g., `QM.PROD.LONDON`) |179| Local Queue | Queue owned by this queue manager; prefix `QL.` |180| Remote Queue Definition | Pointer to queue on another QM; prefix `QR.` |181| Transmission Queue | Holds messages in transit; prefix `QT.` |182| Dead Letter Queue | Undeliverable messages; every QM must have one named `DLQ.{QMGR}` |183| Channel | Communication path between queue managers; `TO.{TARGET-QMGR}` |184185### Message Persistence186187```188MQMD.Persistence = MQPER_PERSISTENT (1) -- Survives queue manager restart; use for financial messages189MQMD.Persistence = MQPER_NOT_PERSISTENT (0) -- Lost on restart; use for audit/log-only messages190```191192Always use `MQPER_PERSISTENT` for messages that represent financial transactions, order state changes, or audit events.193194### MQ + CICS Bridge Pattern (COBOL)195196```cobol197 * Put message to MQ from CICS198 EXEC CICS PUT CONTAINER('MQMSG')199 FROM(WS-MQ-PAYLOAD)200 FLENGTH(WS-PAYLOAD-LEN)201 CHANNEL('MQCHANNEL')202 END-EXEC.203204 EXEC CICS LINK PROGRAM('CKTI')205 CHANNEL('MQCHANNEL')206 RESP(WS-CICS-RESP)207 END-EXEC.208```209210For new development, prefer the MQ CICS bridge (`CKTI`) over direct `MQPUT` within CICS to maintain unit-of-work consistency.211212---213214## z/OS Batch Tuning215216### SMF Records for Batch Analysis217218| SMF Record Type | Content | Use |219|----------------|---------|-----|220| Type 30 | Job/step accounting (CPU, I/O, elapsed time) | Identify slow steps |221| Type 42 | VSAM statistics | VSAM buffer tuning |222| Type 14/15 | Dataset open/close | Identify excessive dataset allocations |223224```jcl225//SMFPRINT EXEC PGM=IFASMFDP226//SMFIN DD DSN=SYS1.MAN1,DISP=SHR227//SMFOUT DD DSN=&&SMFWORK,DISP=(NEW,PASS),SPACE=(CYL,(10,5))228//SYSIN DD *229 INDD(SMFIN,OPTIONS(DUMP))230 OUTDD(SMFOUT,TYPE(30))231 DATE(2024001,2024365)232/*233```234235### Checkpoint/Restart with SYSCHK DD236237```jcl238//BATCHJOB JOB (ACCT),'LONG RUNNING',CLASS=C239//STEP1 EXEC PGM=LONGPROG,PARM='RESTART'240//SYSCHK DD DSN=PROD.CHECKPOINT.DATA,241// DISP=(MOD,CATLG,KEEP),242// SPACE=(CYL,(1,1)),243// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)244//CHECKPT DD SYSOUT=*245```246247In COBOL: use `RERUN ON SYSCHK EVERY 1000 RECORDS OF filename` in `ENVIRONMENT DIVISION` for checkpoint insertion.248249### JES Spool Management250251```jcl252/* Limit SYSOUT — critical for high-volume batch */253//SYSPRINT DD SYSOUT=*,FREE=CLOSE254//SYSOUT DD SYSOUT=(X,,9999) /* Limit to 9999 lines */255256/* Route SYSOUT to specific class for archival */257//AUDITOUT DD SYSOUT=A,DEST=ARCHIVER258```259260---261262## SORT Utility — DFSORT / SYNCSORT263264```jcl265//SORTSTEP EXEC PGM=SORT266//SYSOUT DD SYSOUT=*267//SORTIN DD DSN=INPUT.DATASET,DISP=SHR268//SORTOUT DD DSN=OUTPUT.SORTED,DISP=(NEW,CATLG,DELETE),269// SPACE=(CYL,(10,5),RLSE),270// DCB=(RECFM=FB,LRECL=100,BLKSIZE=0)271//SYSIN DD *272 SORT FIELDS=(1,10,CH,A,21,8,ZD,D)273 INCLUDE COND=(51,2,CH,EQ,C'GB')274 OUTREC FIELDS=(1,10,21,8,51,2,C'PROCESSED')275 SUM FIELDS=(31,10,ZD)276/*277```278279| Parameter | Meaning |280|-----------|---------|281| `FIELDS=(pos,len,fmt,dir)` | Sort key: position, length, format (`CH`=char, `ZD`=zoned decimal, `PD`=packed), direction (`A`/`D`) |282| `INCLUDE COND=` | Filter records before sort |283| `OUTREC FIELDS=` | Reformat output records |284| `SUM FIELDS=` | Aggregate numeric fields with matching keys |285| `OPTION EQUALS` | Preserve original order for equal keys |286287---288289## RACF Security290291### Dataset Security292293```294/* Protect a new production dataset */295ADDSD 'PROD.CUSTOMER.DATA.**' UACC(NONE) OWNER(PRODOWNR)296PERMIT 'PROD.CUSTOMER.DATA.**' ID(PRODGRP) ACCESS(UPDATE)297PERMIT 'PROD.CUSTOMER.DATA.**' ID(AUDITGRP) ACCESS(READ)298PERMIT 'PROD.CUSTOMER.DATA.**' ID(BATCH01) ACCESS(ALTER)299300/* RACF audit — log all access attempts */301ALTDSD 'PROD.CUSTOMER.DATA.**' AUDIT(ALL(READ))302```303304### CICS Transaction Security305306```307/* Define CICS transaction in RACF */308RDEFINE TCICSTRN CUSTINQ UACC(NONE)309PERMIT CUSTINQ CLASS(TCICSTRN) ID(CICSTELR) ACCESS(READ)310SETROPTS RACLIST(TCICSTRN) REFRESH311```312313All production CICS transactions must be defined in RACF class `TCICSTRN` with `UACC(NONE)`. Access only via named RACF groups — never via individual user IDs for transaction authorization.314315---316317## CICS Transaction Naming and Resource Definition318319### Transaction Naming Convention320321| Prefix | Usage |322|--------|-------|323| `C` + 3 chars | Customer-facing transactions (e.g., `CINQ`, `CUPD`) |324| `B` + 3 chars | Batch-triggered CICS transactions |325| `A` + 3 chars | Administration/operational transactions |326| `Z` + 3 chars | Technical/infrastructure transactions (exclude from user menus) |327328### CSD Resource Definition (DFHCSDUP)329330```331DEFINE TRANSACTION(CINQ)332 PROGRAM(CUSTINQ)333 TWASIZE(256)334 TASKDATALOC(ANY)335 TASKDATAKEY(USER)336 STORAGECLEAR(NO)337 RUNAWAY(5000)338 SHUTDOWN(DISABLED)339 STATUS(ENABLED)340 DTIMEOUT(30)341 GROUP(CUSTGRP)342343DEFINE PROGRAM(CUSTINQ)344 LANGUAGE(COBOL)345 DATALOCATION(ANY)346 EXECKEY(USER)347 STATUS(ENABLED)348 GROUP(CUSTGRP)349```350351- `RUNAWAY`: CPU time limit in milliseconds — always set; prevents runaway transactions consuming CPU352- `DTIMEOUT`: Deadlock timeout in seconds — always set for transactions accessing shared resources353- `TASKDATAKEY(USER)`: Prevents task data from being in CICS key storage — required for all application transactions354
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 |
|---|---|---|---|---|---|
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 14 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 65 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 14 days ago | |
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 32k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 7 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 | |
| darkmatter/nixmac.github/copilot-instructions.md · 25 | Copilot instructions | setupbuildtestlint-format+8 | 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-extended-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.