PY/360 is a Python-based simulation of the IBM S/360 mainframe specially redesigned to support simulation of a single-user instance of the Multiprogramming with a Variable number of Tasks operating system (MVT) with Time Sharing Option (TSO) - with the addition of the Interactive System Productivity Facility ISPF-type inteface for Windows 10/11.
It is not an emulator — it does not run real mainframe code or require mainframe software licenses. Instead, PY/360 recreates the look, feel, and workflow of interacting with a small hypothetical mainframe sysplex making legacy IBM 'Big Iron' concepts accessible to anyone curious enough to try it.
For IBM mainframe historians, the MVT OS was made available for the S/360 in 1967 and the TSO was introduced in 1971. ISPF was not actually available for the S/360 system and didn't appear until the late 1970's for the S/370 and later mainframes. PY/360 introduces its custom built version of ISPF as a training tool for the simulated S/360 environment.
PY/360 builds it simulation around four essential IBM system components - A System 360 Model 40 CPU,
If you’ve ever used an ATM or booked a flight, you’ve relied on a mainframe. Pioneered in 1964 with the IBM System/360, these machines quietly run the world’s most critical infrastructure due to their unmatched reliability and ability to handle massive data volumes.
The System/360 revolutionized the industry by introducing a forward-compatible computer system architecture that continues today with the IBM Z series. Unlike supercomputers (built for raw speed) or PCs (built for personal productivity), mainframes occupy a unique middle ground engineered specifically for throughput and stability.
Their architecture shares resources across thousands of simultaneous users through two core methods: Time-sharing: Allowing multiple users to interact with the system simultaneously via terminals. Batch job processing: Managing queued tasks in an orderly sequence using Job Control Language (JCL) and routing output to a managed spool.
Understanding mainframes offers key insights into the foundations of enterprise computing. PY/360 is an easy to use simulator designed to let you explore these concepts and experience classic "Big Iron" computing right from your desk.
MVT Operating System (Multiprogramming with a Variable number of Tasks): This was a variant of OS/360 designed for smaller System/360 models. It divided memory into fixed-size partitions, allowing several programs to reside in memory simultaneously. Historical guides detail MVT configuration and how operators managed jobs and I/O within these environments. PY/360's look and feel is based on it's reduced feature-set of MVT.
TSO (Time Sharing Option): Using 3270-type CRT terminals, this became the standard interactive facility for IBM mainframes. It functions similarly to a command-line interface and can use ISPF menus, allowing users to interact with the system in real-time rather than purely through batch processing. PY/360 has a built-in 3270 Model 2 80X24 green screen terminal.
ISPF (Interactive System Productivity Facility): Although text-based, this is similar to a PC's "graphical UI," ISPF is a menu-based environment built on top of TSO. It includes essential tools such as a text editor, file browsers, and utilities for allocating data sets. It's roots lie in enhancing productivity for system programmers and developers on older mainframe architectures. While ISPF was not available in the real S/360 environment, we include a custom version in PY/360 for ease of use and training.
To understand how a mainframe environment works, it helps to picture the physical hardware that made it up. At the heart of everything was the Central Processing Unit — a large cabinet-sized unit that housed the processor, main memory, and the channel controllers that managed communication with all attached devices. Unlike a modern PC where the processor does much of the I/O work itself, the S/360 offloaded input and output operations to dedicated hardware channels, freeing the CPU to focus on computation.
Attached to the CPU were a carefully chosen collection of peripheral devices. Primary among them was the DASD — Direct Access Storage Device — the mainframe's equivalent of a hard drive, though the resemblance ends there. Early disk storage units like the iconic IBM 2311 were large, washing machine-sized devices storing data on spinning magnetic disk platters. Unlike tape, a disk drive, often refered to as a Direct-Access Storage Drive (DASD) allowed any record to be read or written directly without reading through everything before it, like tape required.
For output, the IBM 1403 chain printer was the output workhorse of the data center. Capable of printing at speeds of up to 1,100 lines per minute, the 1403 produced the familiar wide greenbar paper reports that became synonymous with mainframe computing. Its distinctive chattering sound was the soundtrack of countless data centers.
Finally, tying the human operator to all of this machinery was the IBM 3270 terminal — a sleek, green-phosphor display device that connected to the mainframe over coaxial cable. The 3270 was a pure display terminal, sending keystrokes to the mainframe and receiving screen updates in return. It was through the 3270 that operators managed the system, users ran their Time-Share Option (TSO) sessions, and ISPF presented its now legendary full-screen panels.
PY/360 simulates these components in software, running entirely on a standard Windows 10/11 PC.
- Authentic 3270-style terminal — Custom tkinter window with green phosphor display, OIA status line, and period-correct fonts
- IPL boot sequence — Type
IPL 201to initiate system startup with real host hardware interrogation via Python's psutil and WMI packages - TSO/ISPF simulation — Full primary option menu with system information panel
- ISPF-style editor — Full screen editor with line commands (D, I, R, C, M, A, B) and primary commands (FIND, CHANGE, SAVE)
- ISPF browse — Read-only dataset viewer with search and scroll
- Dataset management — Catalog-based dataset system with LISTCAT, ALLOCATE, DELETE, RENAME, COPY, LISTDS
- REXX interpreter — Subset REXX with variables, loops, conditionals, and 20+ built-in functions
- JCL interpreter — JES2-style batch job submission with job log and condition codes
- 1403 Printer simulation — Spool output with ASA carriage control and job headers
- Spool viewer — Browse, search and purge printer spool output
- Help system — Context-sensitive F1 help with full mainframe concept glossary
- Sample library — Pre-installed SYS.REXX and SYS.JCL sample datasets
- User profiles — Per-user JSON profiles with dataset prefix and last login tracking
- Security model — User prefix isolation with read access to system datasets
* ISPF Primary Option Menu with system information panel *
* ISPF-style full screen editor *
* 1403 printer spool output viewer *
- Windows 10 or Windows 11 (Sorry, no Linux for now)
- Python 3.10 or higher
- The following Python packages (see
requirements.txt):
psutil
wmi
windows-curses
- Clone the repository: - Or just download the .zip file and unpack it anywhere you want
git clone https://github.com/ErnieTech101/py360.git
cd py360
- Install required packages:
pip install -r requirements.txt
- Run PY360:
python py360.py
That's it! On first run PY/360 will automatically create all required directories, install the sample library, and initialize the catalog. No additional configuration is needed.
- Run
python py360.pyfrom a Windows Command Prompt - At the blinking cursor, type
IPL 201and press ENTER - Watch the IPL sequence initialize the system
- The terminal window will open at the login screen
- Enter any USERID (e.g.
JOHN01) and press TAB - Any USERID that does not already exist will be created - Enter any PASSWORD and press ENTER - password security is not implemented for simplicity
- You are now at the ISPF Primary Option Menu
Try these first:
- Type
1to BROWSE — enterSYS.REXX.*to see sample programs - Type
4to FOREGROUND — enterSYS.REXX.HELLOto run a REXX program - Type
5to BATCH — enterSYS.JCL.HELLOto submit a batch job - Type
6to SPOOL — view the printer output - Press
F1at any screen for context-sensitive help - Type
HELP GLOSSARYat any COMMAND ===> prompt for mainframe terminology
- From the menu select option
2EDIT - Enter a dataset name like
USER.DAVE.MYFIRST - Type YES to allocate the new dataset
- Type your REXX program:
/* My first PY360 REXX program */
SAY "Hello from PY360!"
SAY "Today is" DATE()
DO I = 1 TO 5
SAY "Line" I
END
EXIT 0- Press F3 to save
- Select option
4FOREGROUND and enter your dataset name to run it
- Create a REXX program as above (e.g.
USER.DAVE.MYPROG) - Select option
2EDIT and create a JCL dataset (e.g.USER.DAVE.MYJCL) - Enter your JCL:
//MYJOB JOB (001),'YOUR NAME',CLASS=A,MSGCLASS=A
//* My first JCL job
//STEP1 EXEC PGM=REXXRUN
//SYSIN DD DSN=USER.DAVE.MYPROG,DISP=SHR
//SYSOUT DD SYSOUT=*- Press F3 to save
- Select option
5BATCH and enter your JCL dataset name - View the job log and then check option
6SPOOL for output
py360/
├── py360.py # Master bootstrap and boot sequence
├── config.py # IPL sequence and system configuration
├── terminal.py # 3270-style tkinter terminal engine
├── logo.py # Login screen
├── menu.py # ISPF primary option menu
├── editor.py # ISPF-style full screen editor
├── browse.py # Dataset browser
├── utilities.py # Dataset utility functions
├── spool.py # Spool viewer and 1403 printer simulation
├── jcl.py # JCL interpreter and JES2 simulation
├── rexx.py # REXX interpreter
├── catalog.py # Dataset catalog management
├── samples.py # Sample library installer
├── help.py # Help system
├── PY360.cfg # System configuration file
├── requirements.txt # Python dependencies
└── help/ # Help text files
├── main.txt
├── menu.txt
├── editor.txt
├── browse.txt
├── util.txt
├── catalog.txt
├── jcl.txt
├── rexx.txt
├── spool.txt
├── login.txt
└── glossary.txt
The following directories are created automatically at runtime:
datasets/— Simulated DASD storagespool/— Printer and punch outputusers/— User profile JSON files
PY/360 includes a REXX interpreter supporting:
| Feature | Details |
|---|---|
| Variables | Simple assignment, string and numeric |
| Output | SAY statement |
| Input | PULL, PARSE PULL |
| Conditionals | IF/THEN/ELSE (inline and multiline) |
| Loops | DO/END, DO i=1 TO n, DO WHILE, DO UNTIL, DO FOREVER |
| Branching | SIGNAL (GOTO), CALL/RETURN |
| String functions | LENGTH, SUBSTR, STRIP, UPPER, LOWER, LEFT, RIGHT, CENTER, COPIES, REVERSE, WORDS, WORD, POS, SPACE |
| Math functions | ABS, MAX, MIN, SIGN, TRUNC, FORMAT |
| System functions | DATE, TIME, DATATYPE |
| Comments | /* */ inline and multiline |
PY360 supports a practical JCL subset:
| Statement | Support |
|---|---|
| JOB | jobname, CLASS, MSGCLASS |
| EXEC | PGM=REXXRUN, PGM=IEFBR14 |
| DD | DSN=, DISP=SHR/OLD/NEW, SYSOUT=* |
| Comments | //* |
| Key | Function |
|---|---|
| F1 | Context-sensitive HELP |
| F3 | Save and exit / Exit screen |
| F4 | Exit without saving |
| F7 / PgUp | Scroll up |
| F8 / PgDn | Scroll down |
| TAB | Cycle between fields (editor) |
| ENTER | Execute command |
- Windows only (uses tkinter, WMI, and windows-curses)
- Single user environment
- REXX subset only — not full IBM REXX compliance
- JCL subset only — one step jobs, REXXRUN and IEFBR14 programs
- No PDS member support (planned)
- No VSAM support (planned)
- PDS member support (
USER.DAVE.SOURCE(MYPROG)) - SORT utility
- Multi-step JCL condition code testing
- ISPF settings panel
- Extended REXX built-in functions
- VSAM file simulation
- Additional sample programs
PY360 was developed in collaboration with Claude (claude.ai), Anthropic's AI assistant. This project represents an extended pair-programming session where Claude contributed substantially to the architecture and code throughout the development process.
The author believes in transparency about AI collaboration in software development. Rather than presenting AI-assisted work as purely human-authored, this project acknowledges that the boundaries between human creativity and AI assistance are increasingly intertwined — and that's something worth celebrating rather than obscuring.
ErnieTech's Human contributions:
- Project concept, vision and direction
- Mainframe domain expertise and authenticity guidance
- Design decisions, feature priorities and future vision
- Testing, debugging feedback and quality control
- Documentation and help text with Claude's accuracy and consistency checking
- The enthusiasm that kept the project moving! 😄
Claude's contributions:
- Architecture design and module structure
- Python implementation across all modules
- Problem solving and debugging
- Assistance with documentation and help text
- General coding partnership
If you find PY360 useful, consider exploring what's possible with AI-assisted development at claude.ai and supporting Anthropic's mission to develop AI safely and beneficially.
MIT License — feel free to use, modify and distribute PY360. If you build something cool with it, let us know!
Contributions welcome! Whether you're a mainframe veteran who wants to improve authenticity, or a Python developer who wants to add features, feel free to open an issue or submit a pull request.
If you find a bug or have a feature request, please open an issue on GitHub.
PY360 — Big Iron from the comfort of your own desk. 🖥️