Emulating MVS Mainframe on Raspberry PI


Before start reading: please consider, if this article is useful to you or if you just appreciate my work on it, to support me just sharing this article with your friends by your favourite Social Network. This would be a really appreciated help. Have a nice reading!

Last Updated on

Wikipedia Mainframe Computer page defines Mainframe as following:

Mainframe computers or mainframes (colloquially referred to as “big iron”) are computers used primarily by large organizations for critical applications; bulk data processing, such as census, industry and consumer statistics, enterprise resource planning; and transaction processing. They are larger and have more processing power than some other classes of computers: minicomputers, servers, workstations, and personal computers.

Mainframes are focused on some key factors, vital for critical businesses:

  • high availability
  • security
  • high I/O volumes
  • reliability for transaction processing

Even if they are currently considered as an outdated technology (compared to modern virtual machines / container technology), they are still deep-rooted in modern datacenters, expecially for banks, stock exchange, etc

In this article I’m going to show you how to run a Mainframe MVS (Multiple Virtual Storage) inside … a Raspberry PI!

What We Need

Raspberry PI 4 model B image
Raspberry PI 4 model B image

As usual, I suggest adding from now to your favourite ecommerce shopping chart all needed hardware, so that at the end you will be able to evaluate overall costs and decide if continuing with the project or removing them from shopping chart. So, hardware will be only:

Step-by-Step Guide

This guide will use an amazing MVS package available from wotho.ethz.ch, which includes also a User Manual explaining how to use this MVS emulation.

Installing OS

Install Raspberry PI OS using Install Raspbian Buster Lite in your Raspberry PI guide.

Install TK4 MVS Emulation

We’ll download and unzip tk4 package inside a new folder from where our system will load. From Raspberry PI type the following commands:

mkdir mvs
cd mvs
wget http://wotho.ethz.ch/tk4-/tk4-_v1.00_current.zip
unzip tk4-_v1.00_current.zip

Now your MVS emulation is ready to be started.

Basic configuration doesn’t need any change and runs in unattended mode with the simple command:

./mvs

This launches an unattended startup. At the end of load procedure, you will see the following screen:

MVS startup

Connect To MVS

To login in your MVS, you will need a terminal capable to start an x3270 session.

For Windows PC, a free terminal can be downloaded from https://sourceforge.net/projects/x3270/. Another alternative is the good Mocha TN3270 available with 30 days trial as Chrome Extension from Mocha Chrome store.

In both case, set your connection parameters with:

Once connected, a logon is required:

RPI MVS logon prompt

Use one of default users. For example:

  • user: HERC01
  • password: CUL8TR

Once connected, with 2 RETURN pressing you will go to TSO home page:

RPI MVS TSO home

Very First Exercise With TK4 TSO: Create a Simple Dataset

Terminal Emulator Screen

Before all, a few description of main parts in Terminal Emulator. It is composed by 3 main parts:

RPI MVS x3270 emulator parts

Emulation screen usually gives in top section an Option filed where to select desired option to execute (Return to execute in some terminal emulators, or CTRL in some other terminal emulator). Options are listed in following section, each line reporting option number and related action.

Function keys (F1 to F12) have an important role in terminal, because each one is a shortcut to a specific function. For example, the most common and most used is F3, to go back in previous screen.

What Is a Dataset

A data set or dataset (refer to Wikipedia for Data set description) is a file with a record organization. It can be associated to a mix of more common Windows directories and files or Linux folders and files.

To create the first dataset (which will be a simple text dataset), from TSO home page with option 2 select the RPF productivity tool. With the word “select”, in this paragraph, I will intend to write option number and press Return (or CTRL where it is configured as option confirmation):

RPI MVS create dataset (1)

Select 3 to use RPF utility:

RPI MVS create dataset (2)

Select otion 2 to Create a new dataset:

RPI MVS create dataset (3)

Here we’ll configure dataset naming (and logical position) modifying parameters circled in following picture. All other parameters can be left with default values:

RPI MVS create dataset (4)

Now select option 1 to allocate (the space) the dataset. The terminal confirms that dataset have been allocated:

RPI MVS create dataset (5)

Press F3 to go back in RPF Utility Menu and select option 4 to search available datasets:

RPI MVS create dataset (6)

Edit in search window (ops… sorry mainframers, I intended label 🙂 ) with the prefix setup in previous step. In my case, “PEPPE”:

RPI MVS create dataset (7)

And press Return (or CTRL) to list available datasets with the same prefix. In a new environment, it will show the only one datased allocated:

RPI MVS create dataset (8)

Now, the most common actions with a dataset are browse (to view their content), edit (to modify their content) or delete (to delete the entire dataset). These actions can be performed by adding the related command letter (b=browse, e=edit, d=delete) on the left of dataset. We’ll perform and edit to add content inside our dataset. So, add the “e” at the left of dataset:

RPI MVS create dataset (9)

And press Return (or CTRL). An empty editor screen will appear. Fill with text at your choice and press return to have prompt back in “Cmd” area:

RPI MVS create dataset (10)

type save near Cmd area and press return.

RPI MVS create dataset (11)

Select option 1 and press Return. Terminal will go back in dataset list, also confirming that your dataset have been edited:

RPI MVS create dataset (12)

Congratulations, you have created your very first dataset!

Now press F3 as many times to go back in TSO home screen.

Closing Emulation

To shutdown, simply exit from TSO (from TSO home screen press F3):

RPI MVS TSO exit

and simply type “shutdown” and press Return (or CTRL). This will start shutdown procedure.

Enjoy!