1---2name: ibm-mainframe3description: Use when working with IBM z/OS mainframe systems — JCL (Job Control Language) syntax and patterns, dataset types (sequential/PDS/PDSE/VSAM), IDCAMS utility, DFSORT/ICETOOL, ISPF navigation, TSO/REXX scripting, system utilities (IEBCOPY/IEBGENER/IEFBR14), RACF security basics, GDG (Generation Data Groups), SMS (Storage Management Subsystem), and z/OS fundamentals. Part of the ibm-mainframe skill family.4---56# IBM z/OS Mainframe Fundamentals78For enterprise Python connectors to mainframe systems (Zowe SDK, ibm_db, EBCDIC handling) see: `python-enterprise-connectors`.910<HARD-RULE>11Always specify DISP on every DD statement — omitting DISP defaults to (NEW,DELETE) which loses your data. Explicitly code DISP=(NEW,CATLG,DELETE) for new datasets or DISP=SHR for existing ones.12</HARD-RULE>1314<HARD-RULE>15Never submit a job that creates datasets without verifying the SPACE allocation. Under-allocation causes S B37/D37/E37 abends; over-allocation wastes DASD. Always estimate record count, record length, and blocking factor before coding SPACE.16</HARD-RULE>1718<HARD-RULE>19Always use COND or IF/THEN/ELSE to control step execution — unconditional execution after failures causes data corruption. A failed step that writes partial data followed by an unconditional step that reads it will propagate bad data downstream.20</HARD-RULE>2122<HARD-RULE>23Never delete a VSAM cluster without checking SHAREOPTIONS and verifying no other jobs have it open. Deleting an in-use VSAM cluster causes S213 abends in other jobs and potential data loss. Use LISTCAT to check the cluster status first.24</HARD-RULE>2526---2728## Reference Files2930Detailed code examples, patterns, and configuration are in the reference files below. Read the relevant file when working on that area.3132| File | Covers |33|---|---|34| [datasets-idcams-dfsort.md](datasets-idcams-dfsort.md) | dataset types (sequential, PDS, PDSE, VSAM), IDCAMS utility, and DFSORT/ICETOOL |35| [ispf-rexx-racf-patterns.md](ispf-rexx-racf-patterns.md) | ISPF navigation, TSO/REXX scripting, system utilities, RACF security, SMS storage management, and practical JCL patterns |36| [zos-jcl.md](zos-jcl.md) | z/OS fundamentals, JCL syntax and patterns (JOB, EXEC, DD statements, procedures, conditional execution, GDGs) |3738---3940---4142## Anti-Patterns4344| Anti-Pattern | Why It Fails | Correct Approach |45|---|---|---|46| Submitting JCL without testing with TYPRUN=SCAN | Syntax errors consume job queue slots and waste batch window time before failing | Always validate JCL syntax with TYPRUN=SCAN or JCL checker before production submission |47| Using default SPACE allocation without growth estimates | Under-allocated datasets get B37/D37 abends mid-job; over-allocated wastes DASD across the complex | Calculate space from record length, volume, and growth; use RLSE to return unused space |48| Hardcoding dataset names without high-level qualifier substitution | Jobs break when migrated between LPAR/environments; manual editing of DSNs is error-prone | Use symbolic parameters and system symbols for HLQ; parameterize environment-specific DSNs |49| Not running IDCAMS VERIFY after abnormal job termination | VSAM datasets left in an inconsistent state; subsequent jobs get locked-out or corrupt data | Always run IDCAMS VERIFY on VSAM clusters after abend recovery before restarting dependent jobs |50| Ignoring return codes and condition codes in JCL | COND parameter misuse causes steps to run (or skip) unexpectedly; silent data corruption | Use IF/THEN/ELSE/ENDIF for clear condition handling; check RC after every step in multi-step jobs |5152---5354## Related Skills5556| Topic | Skill |57|---|---|58| Python connectors to z/OS (Zowe SDK, ibm_db, EBCDIC) | `python-enterprise-connectors` |59| DB2 for z/OS administration | `db2-mainframe` |60| Lineage-grade reading: deterministic COBOL+JCL+`EXEC SQL` → OpenLineage data lineage (DSN/DDNAME bind, PROC/symbol expansion, host-var→column) | `mainframe-lineage-parsers` |61| Reverse-engineer COBOL/flat-file record layouts + inferred DDL (byte offsets, REDEFINES, OCCURS) | `structure-recovery` |62| Queryable symbol graph over COBOL/DataStage/JCL (call graph, copybook impact) | `legacy-code-intel` |