DevOps for the Mainframe

Source on z/OS is EBCDIC; in Git it is stored as UTF-8.

41.1 Toolchain

Git (GitHub, GitLab, Bitbucket, Azure Repos); legacy SCMs: Endevor, ChangeMan ZMF, ISPW

VS Code + Zowe Explorer + IBM Z Open Editor / Code4z; IBM Developer for z/OS z/OS access from scripts

Zowe CLI (Open Mainframe Project), z/OSMF REST APIs IBM Dependency Based Build (DBB) with zAppBuild / zBuilder, which scans copybook dependencies and builds only what changed CI/CD orchestration

Jenkins, GitHub Actions, GitLab CI, Azure Pipelines IBM Wazi Deploy, UrbanCode Deploy, Ansible (Red Hat Ansible Certified Content for IBM Z)

COBOL Check, zUnit, Galasa; Wazi as a Service / Wazi Sandbox for on-demand z/OS dev/test environments

41.2 Git and code pages

Source on z/OS is EBCDIC; in Git it is stored as UTF-8. Git for z/OS (from Rocket Software) converts automatically using .gitattributes:

*.cbl  zos-working-tree-encoding=ibm-1047 git-encoding=utf-8
*.cpy  zos-working-tree-encoding=ibm-1047 git-encoding=utf-8
*.jcl  zos-working-tree-encoding=ibm-1047 git-encoding=utf-8
*.bin  binary

41.3 Zowe CLI

Profiles (zowe config init) store connection details; the same commands run unchanged in CI pipelines.

zowe zos-files list data-set "USER01.*"
zowe zos-files upload file-to-data-set "src/CUSTRPT.cbl" "USER01.COBOL.SOURCE(CUSTRPT)"
zowe zos-jobs submit data-set "USER01.JCL(COMPLINK)" --view-all-spool-content
zowe zos-jobs submit local-file "jcl/run.jcl"
zowe zos-files download data-set "USER01.REPORT.OUT" --file report.txt

41.4 A CI pipeline example (GitHub Actions + GnuCOBOL)

Off-platform compilation and unit tests give fast feedback; the mainframe build then runs with DBB.

A typical full pipeline: commit → static analysis → off-platform unit tests → DBB build on z/OS (via Zowe CLI or an agent) → zUnit/COBOL Check on z/OS → deploy to test LPAR → integration tests (Galasa) → approval → production deployment, all from the same Git history.

name: cobol-ci
on: [push, pull_request]
jobs:
  build-and-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install GnuCOBOL
        run: sudo apt-get update && sudo apt-get install -y gnucobol
      - name: Compile
        run: |
          mkdir -p bin
          cobc -x -Wall -std=ibm -I copybooks -o bin/custrpt src/CUSTRPT.cbl
      - name: Regression test
        run: |
          cd testdata
          ../bin/custrpt
          diff -u expected/custlist.txt custlist.txt