Module 0331: Quick start guide to TK4

Tak Auyeung, Ph.D.

February 21, 2020

Contents

1 About this module
2 Format of this module
3 What is needed
4 Downloading TK4
5 Installation
6 Concepts
7 Check out MVS
8 TN3270 terminal emulator

1 About this module

2 Format of this module

This module is intended as a guide to a hands-on activity. However, this module also explains important concepts along the way.

3 What is needed

A computer that has Linux or Windows installed. Using an external drive makes running the emulator very flexible.

4 Downloading TK4

5 Installation

In a file manager, navigate to the Downloads folder. Double click tk4-v1.00.current.zip, then click “Extract all files”. If you want to use an external drive, this is when you specify the external drive (and supply or keep the subfolder name) as the extraction destination. Keep the check in the check box of “Show extracted files when complete”.

6 Concepts

At this point, you have just “installed” a mainframe emulator along with the operating system and essential utilities to make a mainframe computer useful.

An “emulator” is a program that lets your computer (running Windows or Linux) to pretend to be another computer. In this case, the emulator is called Hercules and it lets your computer pretend to be a mainframe computer.

A mainframe computer refers to just the hardware. It is of no use without an operating system. TK4 is a package that includes MVS 3.8. MVS (Multiple Virtual Storage) is an operating system that runs on System/370 and System/390 mainframe computers. An operating system is the software that runs on a computer (mainframe or otherwise) that manages resources so that application and utility programs can run.

7 Check out MVS

Back to the steps to experiment with TK4. In the folder where TK4 is extracted, find a file that has the name of mvs and the type is “Windows Batch File”. Double click that file to run the Windows batch file.

You may see warning messages. TK4 is a safe application as distributed. It is safe to allow TK4 (Hercules) permissions to access your network and other resources. You will see messages scrolling in a Windows “cmd” command line window until the last line reads

Script 4: file scripts/tk4-.rc processing ended

At this point, the emulated mainframe computer is up and running, but there is no means to interact with it, yet.

8 TN3270 terminal emulator

Like most servers, the emulated mainframe computer accepts network connections, but it has no user interface of any kind. Unlike modern server computers that accept SSH (secure shell) connections, the emulated mainframe computer requires a special kind of terminal connection.

The “COBOL shared drive” has this terminal emulator ready for download. The file to download is wc3270-3.6ga9-noinstall-32.zip. Download and extract. Like TK4 itself, wc3270 can also be extracted to an external drive for flexibility.

Once you have wc3270 extracted, go to the folder and double click wc3270wiz.exe, this is the wizard that guide you through the session set up process.

First, enter 1 to “Create new session”. You will be asked to enter a session name. For the rest of this module, let us assume tk4 is the name of the session.

In the next screen, you will be asked about the “Host name”. The “Host name” or “IP address” specifies a destination on a network. The emulated mainframe computer is running on the same machine as the terminal emulator! As a result, specify 127.0.0.1 (this is the IPv4 address of localhost) when prompted “Enter host name or IP address”.

The “Model Number” also needs to be changed from the default of 4 to 2. Otherwise, the screen size is incorrect and the output is not rendered correctly.

The next screen allows you to fine tune the session parameters. You will need to modify the “TCP Port” (item 3) to 3270. This is because port 23 (the default value) is a protected port. The mainframe emulation program does not have the privilege to listen to a protected port.

After TCP Port is changed to 3270, press the enter key to proceed. Then take the default to create the session file. Pay attention to where the session file is created. In the case you want to use an external drive, you need to copy the session file to the external drive.

In the next screen, you can select option 8 to quit the wizard.

Now use a file manager to navigate to where the session file is created and double click it.

You should see the logo of TK4 displayed using text. The block (blinking) cursor should be to the right of the prompt Logon ===>.

Next, let us sign in as a user. TK4 comes with several user profiles. For this step, sign in as HERC01 with a password of CUL8TR. After pressing the enter key twice, you should see the “TSO Applications”.

At this point, let us terminate our short tour. First, “press” the PF3 key. Of course, there is no such key on a modern computer! To access a special, click the keypad menu, then click the corresponding entry. You should see a command-line screen next, the last line should read READY.

Now type shutdown, then press the enter key. The system responds to confirm the job is submitted. Give the emulator some time to complete the shut down sequence. Depending on the performance of the (host) computer, this process can take a while. When the emulated mainframe computer shuts down, the terminal emulator also exits automatically.