How to Run a Mainframe on Your PC


by Howard Fosdick  ©2024 RexxInfo.org


Mainframe on Your PC

Ever wonder what it would be like to have your own mainframe?

You can! And it's easy to set up. This article tells you how.

You can run mainframe software through emulation on your Windows, Linux, or Mac computer.

We'll start with some background on how it works, then we'll give you easy instructions on how to set this up.


Why?

Why would you want to run a mainframe on your PC?

It's a fun hobby. Delve into this world, and you'll find that developers have spent lots of time and effort to perfect mainframe-on-pc systems. You can benefit from their labor of love.

You have may worked on mainframes as application programmer and found yourself locked out by security from the system's internals. Now, with your own personal mainframe, you can explore that universe without restrictions. Do whatever you want!

This is a great way to get some mainframe training and experience. You can become familiar with what it's like to work with 3270 style screens and consoles, and with a vast array of supporting systems. You could learn Rexx, Job Control Language, Assembler and other mainframe programming languages, the widely-used ISPF programmer productivity tool, the job control subsystem, and much more.

Finally, some mainframe programmers use these tools to do their work. They develop and test new applications on their PC, then upload their code to the mainframe when done.

Now that you see some of the benefits, let's discuss how to install a mainframe on your PC.


What You Need

Installing your personal mainframe is easy. We'll tell you how in a minute. First, it's useful to understand that you need four pieces of software to run your mainframe:

  1. A Terminal Emulator -- software that emulates a mainframe terminal so that you can login to your mainframe operating system.
  2. A Hardware Emulator -- a software layer that sits on top of your current operating system and emulates the mainframe instruction set.
  3. An Operating System -- a mainframe operating system that runs on top of the mainframe instruction set.
  4. Mainframe Applications -- mainframe utilities or other software to run on your mainframe.

Let's discuss these requirements in a bit more detail.


1. The Terminal Emulator

This software runs on your PC and emulates a mainframe terminal (aka, a 3270 terminal) so that you can log into your mainframe once you get it up and running. You can download products like c3270 or x3270 from any software repository.


2. The Hardware Emulator

The Hercules emulator is an open source product that runs mainframe instruction sets on your PC. This makes your Windows, Linux, or Mac PC look like mainframe hardware. Hercules also emulates the channels, which are the mainframe programs that control disk drives.

The three mainframe architectures Hercules emulates are:

  • System/370
  • ESA/390
  • 64-bit z/Architecture

These three designs underlie all of IBM's mainframe operating systems. So Hercules supports any IBM mainframe operating system.


3. The Operating System

You need an OS to run atop Hercules. There's a problem, though. IBM only sells its operating systems when you buy one of their mainframes.

So instead, people use one of the older IBM mainframe operating systems that are either public domain or "copyrighted software provided without charge."

Some of the IBM OS's available include OS/360, DOS/360, DOS/VS, MVS, VM/370, and TSS/370. You could also run MUSIC/SP from McGill University, MTS (Michigan Terminal System), Multics (a Unix predecessor), or PDOS/X360 (a Public Domain Operating System).

And then there are the mainframe Linux systems like Linux on IBM Z and OpenSolaris for System z. These are current products.

Our focus in this article is on traditional mainframes. Two operating systems have become most popular for emulation: MVS (OS/VS 3.8) and VM/370 (CMS). These are the direct ancestors of today's z/OS and z/VM, respectively. MVS was in use until the mid-1980s, while VM/370 dates from the late 1970s.

Since MVS represents the most popular line of mainframe operating systems, that's what we'll use in this article. Its descendents run most of the worldwide mainframe workload today.


4. The Applications

For both MVS and VM/370, developers have created full implementations that include the software that commonly runs in these environments. These include Rexx, the high-level scripting language. And also Job Control Language, Assembly language, COBOL and all the other mainframe programming languages, the job submission subsystem, utilities, and much more. (See this manual for a complete list.)

So, in the downloads we'll discuss next, you're getting more than just a naked OS. You're also getting most of the software folks expect to find in these systems when they encounter them on mainframes. It's all bundled together with the operating system.


How to Install

There are several ways to install Hercules, the OS, and some apps on your PC. Some do it piece-by-piece. Go that route, and you'll learn a lot. But it's pretty complicated and time-intensive.

Or you can do it the easy way, by using Docker. Docker is an open source tool that enables you to install a bundled set of software simply by downloading and installing the appropriate container. For example, one container bundles the product called MVS-TK (the "MVS Tool Kit"). That's MVS with all the applications you need included!

We'll take the easy Docker approach.


Here's a conceptual view of the software stack that you'll install: The Docker Stack on Your PC

Here are the exact steps to follow to install everything...


1. Install Terminal Emulation Software

To log into your mainframe once you get it running, you'll need a 3270-style terminal emulator on your PC. You can find c3270 or x3270 in any software repository. Just download and install one of these two products.

For example, here is x3270 at SourceForge, and here it is at MajorGeeks.


2. Install Docker

If you already have Docker installed on your computer, you can skip ahead to step (3) below.

Otherwise, here's how to install Docker...

To run Docker, you must have a 64-bit computer with virtualization enabled, 4 gigabytes of system memory, and a half gigabyte of disk space. Almost any computer made in the last decade fulfills these requirements.

Virtualization should be enabled by default, but if not, go into your computer's BIOS or UEFI boot configuration panels to enable it.

Now, install Docker:

  • Here is how to install Docker under Windows
  • Here is how to install Docker under Linux
  • Here is how to install Docker under macOS

The install is easy, so you shouldn't have any difficulty. But if you do, you can refer to the documentation at the Docker website.


3. Install MVS-TK

Time to install the MVS docker container with all its bundled apps.

There are several projects at GitHub and SourceForge where you can find these containers. We like this project because it offers containers for MVS-TK, as well as most the other mainframe and minicomputer operating systems you can run on Hercules.

Since you have Docker installed, follow the website's instructions to install the MVS-TK container. Just issue this line command:

docker run -dit   --name tk4-   -p 3270:3270 -p 8038:8038   rattydave/docker-ubuntu-hercules-mvs:latest

That command will download, install, and run MVS. Wait a minute or two for it to start up, then connect by your 3270 terminal.

Open a window where you can issue line commands, and enter the line command for your 3270 terminal emulator:

c3270 127.0.0.1:3270
or
x3270 127.0.0.1:3270

This connects you to your mainframe and pops up a window displaying a mainframe login screen. It will look something like this:


The Login Screen

Press the ENTER key, then enter your user id to login -- herc01 -- and then your password -- CUL8TR .

That's it! You're done. You've installed MVS on your PC, along with a whole host of MVS apps and subsystems.


Using MVS

After you log in, hit the ENTER key once or twice and you'll enter ISPF, the full-screen tool you typically interact with when working on mainframes. That screen will look something like this:

The ISPF Interactive Tool

From within ISPF, you can run programs, view their output, manage datasets, run utilities, and perform all other typical programmer tasks. ISPF (or "SPF") is the main tool mainframe programmers use to do their work.

For example, select option 2 RPF and you'll see this panel. This gives you a pretty good idea of what you can accomplish using ISPF:


The ISPF Interactive Tool

When using ISPF, here are a few useful PF keys to know:

PF Key:Use:
  
F1Help
F3Exit the current panel
F7Scroll up
F8Scroll down

To logoff MVS, exit the MVS full screen ISPF panels to the READY prompt. Enter the line command:

shutdown

Now you can close your 3270 terminal window. (Here's a more orderly process to use after you become a mainframe wizard.)

If you're at the READY prompt and want to start up the full screen ISPF tool, just enter:

tsoappls

After your first run of MVS, the MVS container resides on your local PC. So for future starts of your MVS container, you can enter this line command:

docker run -dit   -p 3270:3270 -p 8038:8038   rattydave/docker-ubuntu-hercules-mvs:latest

To learn more about the MVS-TK package, and to ensure you're running the latest release, see here.


Using Docker

Some knowledge of how to manage Docker containers may be useful. If you prefer to manage Docker by a graphical interface, you can get a list of good GUIs to download either here or here.

Or you can manage Docker with simple line commands. These are all you'll need:


Command:Use:
  
docker psList currently running containers
docker ps --allList all docker containers (running and stopped)
docker run -d [image_name]Run a container in the background
docker start [container_name] (or [container-id])Start an existing container
docker stop [container_name] (or [container-id])Stop an existing container
docker rm [container_name]Remove a stopped container
docker imagesList all local images
docker rmi [image_name]Delete an image
docker image pruneDelete all unused images
docker -dStart the Docker daemon
docker --helpDocker Help
docker infoDisplay system-wide Docker information

Other Operating Systems

Now that you've seen how simple it is to install and run your own personal mainframe, you may wish to explore some of the other mainframe and minicomputer operating systems available.

You can install any of these via a simple Docker download. Most come with bundled utilities and basic apps:


Operating System:Description:
  
VM/370Ancestor to today's z/VM
TSS/360IBM's Time Sharing System from the 1960s
MulticsAncestor to Unix
Cray 1Famous supercomputer of yesteryear
MinicomputersIncluding DEC PDPs and VAX, HP, Data General, AT&T, Honeywell, others
OS/360, DOS/360, DOS/VS, DOS/VSEEarly IBM mainframe OSs from the 1960s and 1970s

Whew! There's a lot more there to explore.

Most of these are available from the same website from which we downloaded and installed MVS-TK. Just access that website and grab the proper Docker container, and you're off and running.

Who knows? Maybe you'll even want to buy your own replica mainframe front panel:

DEC PDP Fake Panel


Conclusion

Whether you're a hobbyist, a mainframe developer, someone who's into retro computing, or a computer professional who needs to pick up some mainframe skills, it's easy to run a mainframe on your PC. There are several operating systems to choose from, including a host of minicomputer OSs, as well.

Most come bundled with all the apps -- languages and subsystems and components -- you would normally encounter if you were on a real mainframe.

And it's fast and easy to get up and running. Just use Docker containers.

You might like to check out the online forums on this intriguing universe at Groups.IO. Enjoy!

------------------------------

Back to RexxInfo.org

====> Like this article? Please spread the link love to Slashdot, LXer, or wherever!