From CC 0008 to CC 0000 β debugging enterprise JCL on IBM z/OS so production never stops.
Imagine you have a giant, ultra-reliable computer β so powerful it runs the banking systems, airline reservations, and healthcare networks that billions of people depend on every single day. That computer is an IBM Mainframe, and the language used to tell it what jobs to run and what files to use is called JCL (Job Control Language).
This project is about finding and fixing a bug in a JCL program on a real IBM mainframe (z/OS). The broken program was supposed to combine three data files β guitar nicknames, brand names, and artist names β into one neat report called "Legendary Guitars." But it was missing a critical file instruction, causing it to crash with an error code.
I found the bug, wrote the fix, and got the job running perfectly β from CC 0008 (error) to CC 0000 (success). β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β IBM Mainframe (z/OS) β
β β
β π ZXP.PUBLIC.SOURCE β
β βββ NICKNAME βββ β
β βββ BRAND ββββΌβββΊ COMBINE Program βββΊ πΈ GUITAR Report
β βββ ARTIST βββ (IRXJCL + REXX) β
β β
β JES2 Job Scheduler runs everything β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
flowchart TD
A([π§βπ» Developer in VS Code]) --> B[Copy JES2JOB1 from Public Library]
B --> C[Paste into Personal JCL Dataset]
C --> D[Review the JCL Code]
D --> E[Submit Job to JES2 Scheduler]
E --> F{Check Condition Code}
F -->|CC 0008 β Something is wrong| G[Read JESYSMSG Error Log]
G --> H[Discover: Missing ARTIST DD Statement]
H --> I[Add the Missing Line of JCL]
I --> J[Save Changes and Resubmit]
J --> K{Check Condition Code Again}
K -->|CC 0000 β All good!| L[πΈ GUITAR Report Generated]
K -->|Still failing| I
L --> M([β
Challenge Complete!])
style A fill:#1565C0,color:#fff,stroke:#0D47A1
style M fill:#2E7D32,color:#fff,stroke:#1B5E20
style F fill:#E65100,color:#fff,stroke:#BF360C
style K fill:#E65100,color:#fff,stroke:#BF360C
style H fill:#B71C1C,color:#fff,stroke:#7F0000
style L fill:#1565C0,color:#fff,stroke:#0D47A1
flowchart LR
A[Submit Job] --> B[CC 0008 Error]
B --> C[Open JESYSMSG Log]
C --> D[Error: IRX0670E
EXECIO GET/PUT Failure]
D --> E{What is missing?}
E --> F[REXX COMBINE script
needs 3 inputs]
F --> G[JCL only has 2:
NICKNAME + BRAND]
G --> H[Missing: ARTIST DD Statement]
H --> I[Add ARTIST DD Statement]
I --> J[Resubmit]
J --> K[CC 0000 β
Success]
style B fill:#c62828,color:#fff
style K fill:#2e7d32,color:#fff
style H fill:#f57f17,color:#fff
style D fill:#6a1b9a,color:#fff
Navigate to ZXP.PUBLIC.JCL and locate the member JES2JOB1. Right-click and select Copy.
Paste the member into your personal JCL dataset so you can edit it without affecting the shared library.
Open the member and read through the code. It looks like it runs IRXJCL with a COMBINE parameter β but something critical is missing.
Right-click your copy of JES2JOB1 and select Submit Job. Note the job number that appears in the bottom-right corner.
Go to the JOBS section in VS Code. You'll see the job completed with CC 0008 β that's an error code. Something broke.
π¨ CC 0008 = Error. The job ran but something went wrong. Time to investigate.
Expand the job output and look at JESYSMSG. There is one very clear clue buried in the output.
π The error is:
IRX0670E EXECIO error while trying to GET or PUT a recordThis means the REXX script tried to read a file that wasn't defined in the JCL.
Go back to your JCL and add the missing //ARTIST DD statement. Copy the pattern from the BRAND line and change the DD name and dataset member.
β The fix is one line:
//ARTIST DD DSN=ZXP.PUBLIC.SOURCE(ARTIST),DISP=SHR
Always save before resubmitting. If you forget to save, it will run the old broken version again. Right-click β Submit Job.
Check the JOBS section again. This time you should see CC 0000 β no errors. The GUITAR report has been written to your OUTPUT dataset.
| Property | Value |
|---|---|
| Platform | IBM z/OS (Mainframe Operating System) |
| Job Scheduler | JES2 (Job Entry Subsystem 2) |
| Program Executed | IRXJCL β IBM's REXX interpreter for batch jobs |
| Script Language | REXX (Restructured Extended Executor) |
| Parameter | PARM='COMBINE' β triggers the COMBINE REXX routine |
| IDE / Editor | Visual Studio Code with IBM Z Open Editor extension |
| Input Files | ZXP.PUBLIC.SOURCE(NICKNAME), (BRAND), (ARTIST) |
| Output Dataset | <USERID>.OUTPUT(GUITAR) |
| Error Before Fix | CC 0008 β IRX0670E EXECIO error |
| Status After Fix | CC 0000 β Job completed successfully |
| Challenge Level | Advanced (IBM Z Xplore) |
| Estimated Time | 45 minutes |
//JES2JOB1 JOB
//COMBINE EXEC PGM=IRXJCL,PARM='COMBINE'
//SYSEXEC DD DSN=ZXP.PUBLIC.EXEC,DISP=SHR
//SYSTSPRT DD DSN=&SYSUID..OUTPUT(GUITAR),DISP=SHR
//SYSTSIN DD DUMMY
//NICKNAME DD DSN=ZXP.PUBLIC.SOURCE(NICKNAME),DISP=SHR
//BRAND DD DSN=ZXP.PUBLIC.SOURCE(BRAND),DISP=SHRπ¨ The ARTIST data file is missing! The COMBINE program expects three inputs but only two are provided.
//JES2JOB1 JOB
//COMBINE EXEC PGM=IRXJCL,PARM='COMBINE'
//SYSEXEC DD DSN=ZXP.PUBLIC.EXEC,DISP=SHR
//SYSTSPRT DD DSN=&SYSUID..OUTPUT(GUITAR),DISP=SHR
//SYSTSIN DD DUMMY
//NICKNAME DD DSN=ZXP.PUBLIC.SOURCE(NICKNAME),DISP=SHR
//BRAND DD DSN=ZXP.PUBLIC.SOURCE(BRAND),DISP=SHR
//ARTIST DD DSN=ZXP.PUBLIC.SOURCE(ARTIST),DISP=SHR β Added this lineβ One line. That's all it took. The ARTIST DD statement tells the job where to find the artist names.
DD = Data Definition β it's how you tell the mainframe "here's a file the program needs"
| DD Name | Dataset Location | Purpose |
|---|---|---|
SYSEXEC |
ZXP.PUBLIC.EXEC |
Where the REXX scripts live (the program code) |
SYSTSPRT |
&SYSUID..OUTPUT(GUITAR) |
Where the final output report gets written |
SYSTSIN |
DUMMY |
Placeholder β no interactive input needed |
NICKNAME |
ZXP.PUBLIC.SOURCE(NICKNAME) |
File containing guitar nicknames (Blackie, Lucille, etc.) |
BRAND |
ZXP.PUBLIC.SOURCE(BRAND) |
File containing guitar brand/model names |
ARTIST |
ZXP.PUBLIC.SOURCE(ARTIST) |
β The missing file β guitar owners/artists |
Think of Condition Codes like the check engine light in your car:
| Condition Code | Meaning | Plain English |
|---|---|---|
CC 0000 |
β Success | Everything ran perfectly, no problems |
CC 0004 |
Job finished but something was slightly off | |
CC 0008 |
β Error | Something went wrong β job may not have worked |
CC 0012 |
π¨ Severe Error | Serious failure β results cannot be trusted |
CC 0016 |
π Critical | System-level failure, job aborted |
| # | Guitar Nickname | Brand | Artist |
|---|---|---|---|
| 1 | Blackie | Fender Strat. (custom) | Eric Clapton |
| 2 | Cloud | Custom build | Prince |
| 3 | Lucille | Gibson (almost burned) | B.B. King |
| 4 | Frankenstrat | Fender/Gibson Frankencaster | Eddie Van Halen |
| 5 | Monterey Stratocaster | Fender Strat. Flower Power | Jimi Hendrix |
| 6 | Concorde | Jackson Flying V | Randy Rhoads |
graph TD
subgraph VSCode["π» VS Code + IBM Z Open Editor"]
dev[Developer Workspace]
zowe[Zowe Explorer Extension]
end
subgraph zOS["π₯οΈ IBM z/OS Mainframe"]
jes2[JES2 Job Scheduler]
irxjcl[IRXJCL β REXX Interpreter]
rexx[COMBINE REXX Script]
subgraph datasets["π Datasets"]
exec[ZXP.PUBLIC.EXEC]
nick[SOURCE: NICKNAME]
brand[SOURCE: BRAND]
artist[SOURCE: ARTIST]
output[OUTPUT: GUITAR]
end
end
dev --> zowe
zowe -->|Submit JCL Job| jes2
jes2 --> irxjcl
irxjcl --> rexx
exec --> rexx
nick --> rexx
brand --> rexx
artist --> rexx
rexx --> output
style VSCode fill:#1a1a2e,color:#fff,stroke:#4a4a8a
style zOS fill:#0d2137,color:#fff,stroke:#1565C0
style datasets fill:#0a3d62,color:#fff,stroke:#1565C0
| Security Feature | What It Does | Real-World Impact |
|---|---|---|
| RACF | Controls who can access which datasets and programs | Only authorized staff can touch transaction files |
| Crypto Express Hardware | On-chip encryption β keys never leave the hardware | Payment card data encrypted at silicon level |
| Pervasive Encryption | Encrypts all data at rest and in motion by default | No extra config needed β everything is always encrypted |
| SMF Audit Logging | Every action logged with timestamp and user ID | Perfect for HIPAA, PCI-DSS, SOX compliance |
| Workload Isolation | Jobs run in completely isolated memory spaces | One crashing job cannot corrupt another job's data |
| DISP=SHR / EXCL | Fine-grained file access control in JCL | Prevents two jobs writing to the same file simultaneously |
π‘ Every
DISP=SHRin this project ensures source files are read-only β no accidental overwrites possible.
mindmap
root((JCL2 Project))
IBM Mainframe
z/OS Operating System
JES2 Scheduler
IRXJCL Interpreter
REXX Scripting
Development Tools
VS Code
IBM Z Open Editor
Zowe Explorer
Concepts Mastered
JCL Syntax
DD Statements
Dataset Management
Error Code Analysis
Batch Job Debugging
Output
GUITAR Dataset
Legendary Guitars Report
π¦ What is a Dataset?
On a mainframe, files are called datasets. They're organized with names like ZXP.PUBLIC.SOURCE(ARTIST) β think of it like a folder path: the library is ZXP.PUBLIC.SOURCE and the specific file inside is ARTIST. The brackets () refer to members inside a library.
βοΈ What is REXX?
REXX is a scripting language built into z/OS. The COMBINE script reads three input files (NICKNAME, BRAND, ARTIST) and merges them into one formatted report. Think of it as a shell script β but for mainframes, and 40+ years old.
ποΈ What is JES2?
JES2 is the mainframe's job scheduler. When you submit a JCL job, JES2 queues it, runs it, collects all output, and stores the results. It's like a highly reliable CI/CD runner β except it was invented in the 1970s and still powers critical infrastructure today.
π What was the actual error?
IRX0670E EXECIO error while trying to GET or PUT a record
This REXX error means: "I tried to read from a file that wasn't defined in the JCL." The COMBINE script looked for the ARTIST file, but no DD statement pointed to it β so it crashed. The fix was one line.
| Metric | Before Fix | After Fix |
|---|---|---|
| Condition Code | CC 0008 β |
CC 0000 β
|
| Job Status | Failed | Completed Successfully |
| GUITAR Output | Not generated | Generated β |
| Error Message | IRX0670E EXECIO failure | None |
| DD Statements | 6 (missing ARTIST) | 7 (complete) |
| Lines Changed | β | 1 line added |
| Skill | Why It Matters to Your Team |
|---|---|
| Reading unfamiliar error logs | I can debug systems I didn't build β critical for on-call and incidents |
| Mainframe / JCL fluency | Fewer than 5% of developers can work on z/OS production systems |
| Batch architecture knowledge | I understand enterprise job schedulers, not just web APIs |
| Precision under pressure | One missing line caused the failure. I found it. Spacing matters on mainframes |
| IBM Z Xplore certified | Validated by IBM β not self-taught guesswork |
| End-to-end ownership | I copied the job, debugged it, fixed it, and validated the output |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β IBM Z Xplore β Advanced Badge β
β β
β Challenge: JCL2 β Fix JCL and Get That Job Running β
β Level: Advanced β
β Status: β
Completed (CC 0000) β
β Platform: IBM z/OS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ibm-zos-jcl-debugger/
β
βββ README.md β You are here
βββ JCL/
β βββ JES2JOB1_broken.jcl β Original broken JCL (CC 0008)
β βββ JES2JOB1_fixed.jcl β Fixed JCL with ARTIST DD (CC 0000)
βββ OUTPUT/
β βββ GUITAR.txt β Final Legendary Guitars report
βββ docs/
βββ JCL2_assignment.pdf β Original IBM Z Xplore challenge brief
βββ images/
βββ ibm_z_hero.png
βββ step1_copy_dataset.png
βββ step2_paste_menu.png
βββ step3_jcl_code.png
βββ step4_submit_job_list.png
βββ step5_jobs_cc0008.png
βββ step6_jesysmsg_error.png
βββ step7_jcl_fix.png
βββ step8_submit_fixed.png
βββ step9_guitar_output.png
If your team works with mainframes, cloud infrastructure, or backend systems β and you need an engineer who can own a problem from error log to fix β I'd love to talk.
Built with π€ on IBM z/OS | IBM Z Xplore Advanced Certification
"On a mainframe, one missing line can bring down a job. Finding it is the job."








