⏱️ Reading time: 8 min

Getting a 1970s IBM mainframe running on a Linux laptop used to mean weeks of copying virtual tapes and hand-editing JCL. MVS-sysgen automates that process, called sysgen (system generation) in mainframe jargon, and leaves a complete MVS 3.8j running on the Hercules emulator with a single script. For anyone who wants to understand how a mainframe operating system works from the inside, without access to real hardware, it’s the most direct entry point available today.

📑 En este artículo
  1. What MVS 3.8j sysgen is, and what MVS-sysgen does
  2. Why this matters to a developer who has never touched a mainframe
  3. What we tested in sandbox: cloning the repository, and where it stops
  4. MVS-sysgen vs. the official Docker image and unautomated Hercules
  5. When it’s not a good fit: time, permissions, and limited support
  6. References

What MVS 3.8j sysgen is, and what MVS-sysgen does

A sysgen was the process used in the mainframe era to generate a copy of the operating system tailored to the available hardware: modules were compiled, system libraries were assembled, and the patches (usermods) each installation needed were applied. Doing it by hand meant entire weeks of editing JCL.

The MVS-sysgen/sysgen repository takes that process, originally documented by Jay Moseley for MVS 3.8j, and turns it into fourteen numbered steps that run unattended, from step_01_build_starter to step_14_cleanup [source: https://github.com/MVS-sysgen/sysgen]. The project has 439 commits, its primary language is JCL, and it had its last push on 2026-11-17, the same day it published version v4.1.0 [source: https://github.com/MVS-sysgen/sysgen/releases/tag/v4.1.0]. On GitHub it has about 96 stars and 25 forks as of 2026-11-28 [source: https://github.com/MVS-sysgen/sysgen].

The README details what each step installs. step_05_usermods applies, in a single session, the patches in the usermods/ folder, including one that lets ISPF use VPUT/VGET from REXX and another that avoids an ABEND22F during IPL under Hercules. step_08_rakf installs RAKF, the security system, with users defined in users.conf and permissions in profiles.conf. step_09_mvp adds MVP, the project’s own package manager [source: https://github.com/MVS-sysgen/sysgen].

flowchart TD
  A["step_01-04: starter system + system generation"] --> B["step_05: usermods in a single IPL"]
  B --> C["step_06: FDZ1D02"]
  C --> D["step_07: customization (TSO, BREXX)"]
  D --> E["step_08: RAKF (security)"]
  E --> F["step_09: MVP (package manager)"]
  F --> G["step_10: extras (usermods ZP60041/42/43, ZMG0001)"]
  G --> H["step_11: NJE38"]
  H --> I["step_12-12b: ISPF, mvslovers, SDSF"]
  I --> J["step_13: customize"]
  J --> K["step_14: cleanup (system finished)"]

Running it requires Linux, Hercules SDL version 4.5 or later, Python 3, git and tar; the project also recommends a 3270 terminal client (c3270 or x3270) to connect to the emulated mainframe, and ncat for some networking tasks [source: https://github.com/MVS-sysgen/sysgen]. The simplest way to start it, according to the README, is to download the latest release and run a single command:

bash start_mvs.sh
The sysgen runs in fourteen steps, from step_01_build_starter to step_14_cleanup. Foto de ThisisEngineering en Unsplash

Why this matters to a developer who has never touched a mainframe

Almost nobody programs directly on MVS today, but its descendant, z/OS, still runs in banks, insurers and government agencies that never migrated their COBOL. For anyone entering that world, MVS-sysgen is the cheapest way to practice JCL, TSO and a RACF-style security system, called RAKF here, without depending on a corporate terminal or an IBM license.

It’s also useful for teaching or studying operating systems: watching a complete sysgen run step by step, with its own logs, makes clear how an operating system was assembled before graphical installers existed. For the retrocomputing community, it’s the bridge between reading about mainframes and actually having one running.

If you’re a backend developer who just ran into a mainframe because your employer runs COBOL on z/OS, the concrete action is to clone the repo, generate the system once (the project warns the full process can take upward of two hours), and practice there before touching anything in a real environment. One detail that doesn’t come from the README but from the Hacker News discussion: validate any new JCL with TYPERUN=SCAN before running it against the generated system, a tip shared by user sjreese in the launch thread, because it checks the syntax without actually running the job [source: https://news.ycombinator.com/item?id=50678406].

What we tested in sandbox: cloning the repository, and where it stops

It took 11.944 seconds, the full repository weighs 319.8 MB (it includes DASD images and sample tapes), and the clone reached a peak of 178.9 MB of memory. That’s where it stopped: the sandbox returned “no supported stack detected” and never got to run the sysgen.

That makes sense. The failure doesn’t point to a problem in the project; it just means you need an environment with Hercules already compiled to run it for real, something a generic sandbox doesn’t provide. MVS-sysgen isn’t a pip package or an npm project with a standard build command; it’s a bash script that orchestrates Hercules, an emulator that has to be compiled separately first, and the README points to hercules-helper for that part [source: https://github.com/MVS-sysgen/sysgen].

The test cloned 319.8 MB of the repository in 11.9 seconds before stopping. Foto de National Cancer Institute en Unsplash

MVS-sysgen vs. the official Docker image and unautomated Hercules

The README itself documents the containerized alternative: if you have Docker, one command downloads the already-generated image and leaves it running.

docker run -d \
  --name=mvsce \
  -e HUSER=docker \
  -e HPASS=docker \
  -p 3270:3270 \
  -p 3223:3223 \
  -p 3271:3271 \
  -p 3505:3505 \
  -p 3506:3506 \
  -p 8888:8888 \
  -p 2121:2121 \
  -p 3221:3221 \
  -p 22000-22200:22000-22200 \
  -p 8080:8080 \
  -v /opt/docker/mvsce:/config \
  -v /opt/docker/mvsce/printers:/printers \
  -v /opt/docker/mvsce/punchcards:/punchcards \
  -v /opt/docker/mvsce/logs:/logs \
  -v /opt/docker/mvsce/dasd:/dasd \
  -v /opt/docker/mvsce/certs:/certs \
  --restart unless-stopped \
  mainframed767/mvsce:latest

The difference from running sysgen.py by hand is the usual one between using a precompiled binary and compiling from source: the mainframed767/mvsce image delivers a working MVS/CE in minutes, but MVS-sysgen is the one that shows, step by step, how that system was put together, and lets you modify it with your own usermods [source: https://github.com/MVS-sysgen/sysgen].

Hercules SDL, the emulator both options use underneath, doesn’t install any operating system by itself: it simulates IBM mainframe hardware and expects someone to load an already-generated system onto it. Compared with a more general-purpose simulator like SIMH, which covers dozens of different historical architectures without focusing on any one of them, Hercules targets System/370 and System/390 specifically, which is exactly where MVS runs.

OptionWhat it installsSetup timeLevel of control
MVS-sysgenGenerates complete MVS 3.8j, step by step, with configurable usermodsHours (the README warns “upward of two hours”)High: every usermod, user and profile can be edited
Docker image mainframed767/mvsceAlready-generated MVS/CE, ready to startMinutes, just pull the imageLow: the generation process isn’t visible
Hercules SDL without sysgenJust the hardware emulator, no operating systemDepends on where you get the system to loadTotal over the emulated hardware, but no system automation

When it’s not a good fit: time, permissions, and limited support

⚠️ Heads up: the README asks you not to run the sysgen as root: there’s a known bug in Hercules that, under those conditions, consumes all of the machine’s resources.

MVS-sysgen has concrete limits. The README itself warns that the full process can take “upward of two hours” depending on the hardware, and that it only officially supports Debian or Ubuntu-based distributions [source: https://github.com/MVS-sysgen/sysgen].

The issue history shows where the automation runs into trouble most. Issue #1, now closed, documented the process hanging with the error HHC90020W 'hthread_setschedparam()' failed at loc=cpu.c:2323: rc=22: Invalid argument, a thread permission issue on certain Linux kernels. Issue #32, also closed, reported the script abending on the SMPJOB03 job with an unexpected return code of 0012 in step DLBUCL2. Both are resolved, but they mark the kind of failure that can show up: SMP/E and emulator scheduling errors, rather than bugs in the automation logic.

Our own test adds another practical limitation: there’s no way to install it with a standard package command. Hercules has to be compiled separately first, and only then does the sysgen run. For someone who just wants to see MVS running without understanding the full process, the Docker image is the best starting point; for someone who wants to learn how a mainframe is built from scratch, MVS-sysgen is the option.

References

Featured image: Foto de National Cancer Institute en Unsplash

📬 Get new articles by email

We only email about big articles (1-2 a month).

How each article is made (sources, testing and editorial criteria): How we work.

Did it work for you? Got a different error? Say so below: questions get answered and help the next reader.

Leave a comment
Categories: Tech NewsTutorials

El Solitario Editorial

Article prepared by the El Solitario editorial team from cited sources, under the editorial responsibility of Luis Navarro. More details in "How we work".

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

You can include code inside <code>…</code> or, for several lines, <pre><code>…</code></pre>.

This site uses Akismet to reduce spam. Learn how your comment data is processed.