Mainframe DevOps — CI/CD Pipeline for z/OS Guide
In this tutorial, you'll learn about Mainframe DevOps. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.
Mainframe DevOps brings modern software engineering practices — Git version control, continuous integration, automated testing, and deployment pipelines — to IBM z/OS, enabling mainframe teams to deliver COBOL, PL/I, and Assembler applications with the same speed and reliability as distributed DevOps teams.
What You'll Learn
Git-based source management for mainframe code, DBB (Dependency-Based Build), z/OSMF workflows for deployment, Zowe CLI integration, and building a complete CI/CD pipeline for z/OS applications.
Why It Matters
Banks cannot wait six months to deploy a COBOL change. Mainframe DevOps reduces deployment cycles from months to hours, improves quality through automated testing, and provides audit trails required for regulatory compliance. It is the key to Mainframe Modernization.
Doda Browser uses CI/CD pipelines inspired by mainframe DevOps practices. Durga Antivirus Pro applies automated build and deploy workflows for rapid signature updates.
Real-World Use
A bank's COBOL development team uses Git for source control, Jenkins for CI, and z/OSMF for deployment. A developer commits a COBOL change to Git, Jenkins triggers a DBB build on z/OS, automated tests run in a test LPAR, and the change is promoted to production — all in under two hours.
Learning Path
flowchart LR A["z/OS UNIX System Services"] --> B["Mainframe DevOps
You are here"] B --> C["CICS Web Services"] C --> D["IBM MQ on z/OS"] D --> E["Parallel Sysplex"] style B fill:#f90,color:#fff
Mainframe DevOps Architecture
flowchart LR
A[Developer IDE] -->|Git Push| B[Git Repository]
B -->|Webhook| C[CI Server Jenkins]
C -->|DBB Build| D[z/OS Build System]
D -->|Compile/Link| E[Load Modules]
E -->|z/OSMF Deploy| F[Test LPAR]
F -->|Automated Test| G{Pass?}
G -->|Yes| H[Production LPAR]
G -->|No| I[Notify Developer]
style C fill:#f90,color:#fff
style D fill:#f90,color:#fff
Tools of the Trade
| Tool | Purpose |
|---|---|
| Git | Source version control for COBOL, JCL, REXX |
| Zowe CLI | Command-line interface for z/OS from any platform |
| DBB | Dependency-Based Build — intelligent COBOL compilation |
| z/OSMF | Workflow-based deployment management |
| Wazi Code | VS Code extension for mainframe development |
| Jenkins | CI pipeline Orchestration |
Setting Up a CI/CD Pipeline
Step 1: Source Code in Git
Mainframe source code lives in Git repositories alongside pipeline definitions:
# Typical mainframe Git structure
repo/
src/
cobol/
PAYROLL.cbl
ACCTUPD.cbl
jcl/
COMPILE.jcl
DEPLOY.jcl
copybook/
CUSTCOPY.cpy
Jenkinsfile
build.properties
Step 2: DBB Build Definition
DBB analyzes dependencies and compiles only changed programs:
// Jenkinsfile - DBB Build Stage
stage('DBB Compile') {
steps {
script {
sh '''
cd $WORKSPACE
# Run DBB to compile changed COBOL programs
dbb-build.sh \
--application cobol-app \
--source src/cobol \
--copybook src/copybook \
--outdir build/loadlib \
--log build/logs/compile.log
'''
}
}
}
Step 3: Automated Deployment with z/OSMF
z/OSMF workflows deploy load modules to test and production:
{
"workflowName": "Deploy COBOL Load Module",
"steps": [
{
"name": "Transfer load module",
"type": "zosmf-files",
"source": "build/loadlib/PAYROLL",
"target": "/u/prod/loadlib/PAYROLL]
},
{
"name": "Deploy to CICS",
"type": "zosmf-jcl",
"jcl": "//DEPLOY JOB...\n//STEP1 EXEC PGM=DFHCSDUP\n//* ..."
}
]
}
Step 4: Zowe CLI in Pipelines
Zowe CLI enables pipeline interaction with z/OS:
# Submit JCL from pipeline
zowe jobs submit data-set "USER.DEV.JCL(DEPLOY)"
# Check job status
zowe jobs view job-status JOB12345
# Download job output
zowe jobs download output JOB12345
Automated Testing
Mainframe DevOps includes automated testing at every stage:
#!/bin/bash
# Test script for automated validation
echo "Running automated tests on test LPAR..."
# Submit test JCL
JOBID=$(zowe jobs submit data-set "USER.TEST.JCL(RUNTEST)" --rff jobid)
sleep 30
# Check results
RC=$(zowe jobs view job-status $JOBID --rff rc)
if [ "$RC" = "CC 0000" ]; then
echo "Tests passed. Ready for production."
exit 0
else
echo "Tests failed. Check job $JOBID output."
exit 8
fi
Common Errors
1. Ignoring dependencies in DBB
DBB tracks copybook dependencies. Changing a copybook triggers recompilation of all programs using it — don't skip this.
2. Skipping the test LPAR
Always deploy to test LPAR first. Production-only deployment is the #1 cause of outages.
3. Hardcoded dataset names in pipelines
Use pipeline variables for dataset names. Different LPARs have different high-level qualifiers.
4. Not preserving compile listings
Archive compile listings for audit purposes. They are evidence of what was built and when.
5. Missing rollback procedures
Every pipeline must include a rollback step — the ability to restore the previous load module.
Practice Questions
What is DBB in mainframe DevOps? Dependency-Based Build — builds only changed programs and their dependents, reducing compile time.
What does Zowe CLI provide? A command-line interface for z/OS that works from any platform, enabling pipeline integration.
How does z/OSMF support DevOps? It provides workflow definitions for deployment, allowing standardized, auditable promotion processes.
Why is automated testing critical in mainframe DevOps? It catches regressions before production deployment and provides audit evidence of quality checks.
What is the role of Git in mainframe DevOps? Git provides version control for COBOL, JCL, and REXX source code, enabling branch-based development and code review.
Challenge: Design a CI/CD pipeline for a COBOL application that fetches source from Git, compiles with DBB, deploys to a test CICS region, runs automated integration tests, and promotes to production with a rollback plan.
FAQ
What's Next
| Tutorial | What You'll Learn |
|---|---|
| z/OS UNIX System Services Guide | USS for pipeline scripting |
| CICS Web Services Guide | Deploying API endpoints with DevOps |
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Updated 2026-06-24.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro