"If COBOL is the backbone of banking, REXX is the duct tape that holds the enterprise together."
This project demonstrates hands-on proficiency in IBM mainframe programming using REXX — the scripting language that powers automation across thousands of enterprise systems worldwide. Built as part of IBM Z Xplore's Fundamentals track, this challenge covers Zowe CLI setup, TSO Address Space management, and interactive REXX execution on a live z/OS mainframe.
- 🧠 What Is This, Really?
- 🏗️ System Architecture
- ⚙️ Tech Stack
- 🗺️ How It All Works
- 📦 The Two Programs
- 🚀 Setup & Installation
▶️ Running the Programs- 🔐 Security Features
- 📊 Project Metrics
- 🌍 Why This Matters in Enterprise
- 🧩 Skills Demonstrated
- 📚 References
┌─────────────────────────────────────────────────────────────────────┐
│ │
│ Think of a mainframe like a massive, ultra-reliable engine │
│ running quietly behind every bank transaction, flight booking, │
│ and insurance claim you've ever made. │
│ │
│ REXX is the screwdriver that lets engineers reach inside │
│ and automate, script, and interact with that engine — without │
│ having to rebuild it from scratch. │
│ │
└─────────────────────────────────────────────────────────────────────┘
REXX (Restructured Extended Executor) is a scripting language built directly into IBM z/OS. Unlike modern languages that need to be installed separately, REXX is baked right into the mainframe operating system — making it the go-to tool for automation, task scheduling, and interactive programs in enterprise IT shops.
This project walks through:
- Setting up Zowe CLI — a modern, open-source tool that lets you talk to a mainframe from your laptop
- Configuring TSO (Time Sharing Option) profiles — your "ID badge" for mainframe access
- Running two real REXX programs on an IBM z/OS mainframe in real-time
Here's a plain-English map of how your laptop communicates with a mainframe running in a data center thousands of miles away.
flowchart TD
DEV["💻 Developer Laptop
(macOS / Windows / Linux)"]
VSCODE["🧩 VS Code
+ Zowe Explorer Plugin"]
ZOWE["⚡ Zowe CLI
npm i -g @zowe/cli"]
ZOSMF["🔌 z/OSMF REST API
Port 10443 · HTTPS"]
ZOS["🖥️ IBM z/OS Mainframe
204.90.115.200"]
TSO["📦 TSO Address Space
Time Sharing Option"]
REXX["📝 REXX Exec
SOMEREXX / GUESSNUM"]
DS["🗂️ Partitioned Data Set
Zxxxxx.SOURCE"]
DEV --> VSCODE
DEV --> ZOWE
ZOWE -->|"HTTPS / TLS"| ZOSMF
VSCODE -->|"HTTPS / TLS"| ZOSMF
ZOSMF --> ZOS
ZOS --> TSO
TSO --> DS
DS --> REXX
REXX -->|"Response Output"| ZOWE
style DEV fill:#1a1a2e,color:#fff,stroke:#4cc9f0
style ZOWE fill:#0f3460,color:#fff,stroke:#4cc9f0
style ZOSMF fill:#16213e,color:#fff,stroke:#f72585
style ZOS fill:#0f2027,color:#fff,stroke:#f72585
style TSO fill:#203a43,color:#fff,stroke:#7209b7
style REXX fill:#2c5364,color:#fff,stroke:#4cc9f0
style DS fill:#1a1a2e,color:#fff,stroke:#f72585
style VSCODE fill:#0f3460,color:#fff,stroke:#4cc9f0
| Layer | Technology | Role | Where It Runs |
|---|---|---|---|
| 🖥️ Mainframe OS | IBM z/OS | Host operating system | IBM Z Hardware |
| 📝 Language | REXX (Restructured Extended Executor) | Scripting & automation | z/OS |
| 🔌 Mainframe Interface | z/OSMF (z/OS Management Facility) | REST API gateway | z/OS |
| 🖱️ CLI Tool | Zowe CLI (@zowe/cli) |
Local-to-mainframe bridge | Your laptop |
| 🧩 IDE Plugin | Zowe Explorer for VS Code | GUI for dataset browsing | VS Code |
| 🔑 Access Protocol | TSO/E (Time Sharing Option) | Interactive session manager | z/OS |
| 🌐 Transport | HTTPS over TLS (Port 10443) | Secure data transfer | Network |
| 📦 Package Manager | npm (Node Package Manager) | Zowe CLI installer | Your laptop |
sequenceDiagram
actor Dev as 👨💻 Developer
participant CLI as ⚡ Zowe CLI
participant API as 🔌 z/OSMF API
participant ZOS as 🖥️ z/OS Mainframe
participant TSO as 📦 TSO Address Space
participant REXX as 📝 REXX Program
Dev->>CLI: zowe tso start as
CLI->>API: POST /zosmf/tsoApp/tso
API->>ZOS: Allocate memory region
ZOS->>TSO: Initialize Address Space
TSO-->>Dev: Return Address Space Key (e.g. Z99999-120-aabgaaam)
Dev->>CLI: zowe tso send as {key} --data "exec 'SOURCE(GUESSNUM)'"
CLI->>API: PUT /zosmf/tsoApp/tso/{key}
API->>TSO: Route command to Address Space
TSO->>REXX: Execute GUESSNUM program
REXX-->>Dev: "I'm thinking of a number between 1 and 10. What is your guess?"
Dev->>CLI: zowe tso send as {key} --data "5"
CLI->>TSO: Forward input "5"
TSO->>REXX: Pass user input
REXX-->>Dev: "You got it! And it only took you 1 try!"
Dev->>CLI: zowe tso stop as {key}
CLI->>API: DELETE /zosmf/tsoApp/tso/{key}
API->>ZOS: Release Address Space memory
Think of an Address Space like a private booth in a library. When you sit down in the booth:
- The library (z/OS) reserves a reading table (memory) just for you
- You can bring in books (programs like REXX scripts) and read them
- While you're in your booth, your program keeps running and waiting for your next input
- When you leave (stop the address space), the booth is freed up for someone else
This is how the GUESSNUM program can stay alive between your guesses — it's sitting in your personal address space, waiting for you to send the next number.
What it does: Displays a giant "GREETINGS FROM REXX" ASCII art banner on the mainframe. Purpose: Confirms your entire setup works end-to-end.
____________________________________________________
/ \
| ____ ____ _____ _____ _____ ___ _ _ ____ ____ |
| / ___|| _ \| ____| ____|_ _|_ _| \ | |/ ___/ ___| |
| | | _ | |_) | _| | _| | | | || \| | | _\___ \ |
| | |_| || _ <| |___| |___ | | | || |\ | |_| |___) | |
| \____||_| \_\_____|_____| |_| |___|_| \_|\____|____/ |
\____________________________________________________/
How to run it (single command mode):
zowe tso issue command "exec 'Zxxxxx.SOURCE(somerexx)'" --ssmHow to run it (via address space):
zowe tso send as {my-as-key} --data "exec 'Zxxxxx.SOURCE(somerexx)'"What it does: Runs an interactive number-guessing game. The mainframe picks a random number between 1–10 and you try to guess it. Purpose: Demonstrates stateful, interactive REXX execution — the program stays running between your inputs.
flowchart TD
START(["🎮 Start GUESSNUM"]) --> GEN["🎲 Generate Random Number
between 1 and 10"]
GEN --> PROMPT["💬 Output: What is your guess?"]
PROMPT --> INPUT["📥 Wait for User Input
via TSO Address Space"]
INPUT --> CHECK{"✅ Correct?"}
CHECK -->|"✔️ YES"| WIN["🏆 Output: You got it!
And it only took you N tries!"]
CHECK -->|"❌ NO"| RETRY["😅 Output: That's not it. Try again."]
RETRY --> PROMPT
WIN --> END(["🔚 Program Ends
Address Space returns READY"])
style START fill:#4cc9f0,color:#000
style WIN fill:#06d6a0,color:#000
style CHECK fill:#f72585,color:#fff
style RETRY fill:#fb8500,color:#000
style END fill:#4cc9f0,color:#000
The Code — Only 16 Lines! (This is what makes REXX remarkable)
/* GUESSNUM - Guess the number REXX program */
secret = RANDOM(1,10)
tries = 0
SAY "I'm thinking of a number between 1 and 10."
DO UNTIL guess = secret
SAY "What is your guess?"
PULL guess
tries = tries + 1
IF guess \= secret THEN
SAY "That's not it. Try again"
END
SAY "You got it! And it only took you" tries "tries!"
EXITPlain English:
SAY= print to screen.PULL= wait for user to type something. That's it. 16 lines. Running on a mainframe that processes billions of transactions daily. 🤯
☐ Node.js v18+ installed
☐ VS Code installed
☐ IBM Z Xplore account created
☐ z/OSMF credentials (host, userid, password)
☐ Terminal access (CMD on Windows, Zsh/Bash on Mac/Linux)
# Step 1 — Create a safe home for npm global packages
mkdir ~/.npm-global
npm config set prefix ~/.npm-global
# Step 2 — Add it to your PATH (persistent across sessions)
echo "PATH=~/.npm-global/bin/:$PATH" >> .zprofile
echo "export PATH" >> .zprofile
source .zprofile
# Step 3 — Install Zowe CLI globally
npm i -g @zowe/cli
# Step 4 — Verify installation
zowe --versionREM Step 1 — Switch from PowerShell to CMD
cmd
REM Step 2 — Install Zowe CLI
npm i -g @zowe/cli
REM Step 3 — Test it
zowe
⚠️ Windows Tip: Ifzoweis not found after install, add%AppData%\Roaming\npmto your System PATH via Control Panel → Edit environment variables for your account.
flowchart LR
A["📄 zowe.config.json"] --> B["zosmfZXPlore profile
type: zosmf
host: 204.90.115.200
port: 10443"]
A --> C["tsoZXPlore profile
type: tso
account: FB3
codePage: 1047"]
A --> D["defaults:
zosmf → zosmfZXPlore
tso → tsoZXPlore"]
style A fill:#f72585,color:#fff
style B fill:#0f3460,color:#fff
style C fill:#16213e,color:#fff
style D fill:#0f2027,color:#fff
Check your profiles:
zowe config listTest your connection:
zowe files list ds "ZXP.PUBLIC.*"✅ If you see a list of datasets, you're connected. If you're prompted for a password, your defaults aren't set yet.
| Step | Command | What Happens |
|---|---|---|
| 1️⃣ Copy source files | (VS Code Zowe Explorer) | Copy SOMEREXX + GUESSNUM from ZXP.PUBLIC.SOURCE to your own SOURCE dataset |
| 2️⃣ Test connection | zowe files list ds "ZXP.PUBLIC.*" |
Lists all public datasets — confirms your profile works |
| 3️⃣ Run SOMEREXX (quick) | zowe tso issue command "exec 'Zxxxxx.SOURCE(somerexx)'" --ssm |
Fires & forgets — shows ASCII art greeting |
| 4️⃣ Start address space | zowe tso start as |
Creates a persistent session on the mainframe — save the key it returns! |
| 5️⃣ Run SOMEREXX (via AS) | zowe tso send as {key} --data "exec 'Zxxxxx.SOURCE(somerexx)'" |
Runs greeting through your address space |
| 6️⃣ Start GUESSNUM | zowe tso send as {key} --data "exec 'Zxxxxx.SOURCE(guessnum)'" |
Launches the interactive game |
| 7️⃣ Send a guess | zowe tso send as {key} --data "5" |
Sends your number to the waiting REXX program |
| 8️⃣ Stop address space | zowe tso stop as {key} |
Cleanly releases your mainframe memory allocation |
| 9️⃣ Submit completion | Run CHKREXX1 from ZXP.PUBLIC.JCL |
Submits your completion check job |
🔁 Replace
Zxxxxxwith your own Z-userid (e.g.,Z99994).
This project demonstrates enterprise-grade security practices that are standard in mainframe environments.
flowchart TD
subgraph CLIENT ["💻 Client Side"]
A["Zowe Config
(zowe.config.json)"]
B["🔒 Secure Credential Store
Password never in plaintext"]
end
subgraph TRANSPORT ["🌐 Transport Layer"]
C["TLS/HTTPS Encryption
Port 10443"]
D["Certificate Validation
rejectUnauthorized flag"]
end
subgraph SERVER ["🖥️ Mainframe Side"]
E["RACF / ACF2 / Top Secret
z/OS Security Manager"]
F["TSO Logon Procedure
IZUFPROC"]
G["Dataset Access Control
Profile-level permissions"]
end
A --> C
B --> C
C --> D
D --> E
E --> F
F --> G
style CLIENT fill:#1a1a2e,color:#fff,stroke:#4cc9f0
style TRANSPORT fill:#0f3460,color:#fff,stroke:#f72585
style SERVER fill:#16213e,color:#fff,stroke:#7209b7
| Feature | Description | Enterprise Value |
|---|---|---|
| 🔒 Credential Encryption | Passwords stored in OS secure vault, never in plain text config files | Prevents credential leakage in version control |
| 🛡️ TLS in Transit | All communication uses HTTPS on port 10443 | Encrypts all mainframe data in flight |
| 🔑 Profile Isolation | Each user has their own z/OS credentials and data namespace (Zxxxxx.*) |
Enforces least-privilege access |
| 🪪 RACF Integration | Mainframe access controlled by z/OS Resource Access Control Facility | Industry-standard enterprise identity management |
| 📋 TSO Logon Procedure | Session initialized via IZUFPROC — a controlled startup routine |
Auditable, controllable session management |
| 🗝️ Address Space Keys | Each interactive session gets a unique, time-limited key | Prevents session hijacking |
| 📵 No SSH to Mainframe | Zowe API approach avoids direct SSH exposure | Reduces attack surface |
| ✅ Code Page Control | codePage: 1047 ensures correct EBCDIC ↔ ASCII translation |
Prevents data corruption from encoding mismatches |
| Metric | Value |
|---|---|
| 🪜 Total Steps | 12 |
| ⏱️ Estimated Time | 60 minutes |
| 📝 REXX Programs Written | 2 |
| 💻 Lines of REXX Code | 16 (GUESSNUM) |
| 🔌 APIs Consumed | z/OSMF REST API |
| 🖥️ Platforms Covered | macOS, Windows, Linux |
| 🌐 Protocols Used | HTTPS/TLS, TSO |
| 🔐 Security Layers | 8+ |
| 🧩 Tools Configured | Zowe CLI, VS Code, z/OSMF Profiles |
graph TD
REXX["📝 REXX Language"]
ZOS["🖥️ z/OS Operating System"]
TSO["📦 TSO / Time Sharing Option"]
ZOSMF["🔌 z/OSMF REST Interface"]
ZOWE["⚡ Zowe CLI"]
VSCODE["🧩 VS Code + Zowe Explorer"]
DEV["👨💻 Developer"]
ZOS -->|"natively runs"| REXX
ZOS -->|"provides"| TSO
ZOS -->|"exposes"| ZOSMF
ZOSMF -->|"used by"| ZOWE
ZOSMF -->|"used by"| VSCODE
TSO -->|"executes"| REXX
ZOWE -->|"operated by"| DEV
VSCODE -->|"operated by"| DEV
style REXX fill:#f72585,color:#fff
style ZOS fill:#0f2027,color:#fff
style TSO fill:#203a43,color:#fff
style ZOSMF fill:#16213e,color:#fff
style ZOWE fill:#0f3460,color:#fff
style VSCODE fill:#1a1a2e,color:#fff
style DEV fill:#2c5364,color:#fff
You might be wondering: "Why learn REXX in 2025?" Here's why every major bank, airline, and insurance company still depends on it:
┌───────────────────────────────────────────────────────────────────┐
│ │
│ 💳 95% of ATM transactions run on IBM mainframes │
│ ✈️ Nearly all major airline reservations processed on z/OS │
│ 🏥 Most US healthcare records managed on mainframe systems │
│ 💰 $3 trillion+ in daily financial transactions on IBM Z │
│ │
│ REXX is the automation glue inside ALL of these systems. │
│ │
└───────────────────────────────────────────────────────────────────┘
| Use Case | How REXX Is Used |
|---|---|
| 🏦 Banking Automation | Scripts to automate end-of-day batch job submissions |
| 🔍 System Monitoring | Poll job output and alert on failures |
| 🗄️ Data Migration | Move and transform dataset records between systems |
| ⚙️ JCL Generation | Dynamically build and submit JCL job control scripts |
| 🔐 Security Auditing | Parse RACF logs and check access control patterns |
| 🧪 Testing & Validation | Automate smoke tests after mainframe deployments |
| 📊 Report Generation | Pull data from DB2 and format for business reporting |
mindmap
root((REXX1
Challenge))
Mainframe Skills
REXX Programming
TSO/E Operations
z/OS Dataset Management
Address Space Lifecycle
Modern DevOps
Zowe CLI
REST API Integration
VS Code + Extensions
npm Package Management
Security
TLS/HTTPS Configuration
Credential Management
RACF-aware Access
Secure Profile Setup
Cross-Platform
macOS Setup
Windows CMD/PowerShell
PATH Environment Config
Shell Profile Management
| Skill Category | Specific Skills | Level |
|---|---|---|
| 🖥️ Mainframe | REXX scripting, TSO sessions, z/OS datasets, JCL job submission | ⭐⭐⭐⭐⭐ |
| 🔌 API Integration | z/OSMF REST API, profile-based auth, HTTPS endpoints | ⭐⭐⭐⭐⭐ |
| 🛠️ DevTools | Zowe CLI, VS Code, Zowe Explorer plugin, npm | ⭐⭐⭐⭐⭐ |
| 🔐 Security | Secure credential storage, TLS config, RACF awareness | ⭐⭐⭐⭐☆ |
| 💻 Cross-Platform | macOS zsh, Windows CMD, PATH/env configuration | ⭐⭐⭐⭐⭐ |
| 📖 Documentation | README authoring, architecture diagrams, runbooks | ⭐⭐⭐⭐⭐ |
╔══════════════════════════════════════════════════════════════════╗
║ ║
║ Senior Full-Stack Engineer | Mainframe Enthusiast ║
║ Payment Infrastructure · Distributed Systems · IBM Z ║
║ ║
║ 9+ years building systems that can't afford to fail. ║
║ Now bringing modern cloud-native thinking to the world's ║
║ most reliable computing platform — IBM Z. ║
║ ║
╚══════════════════════════════════════════════════════════════════╝
I'm a backend engineer with deep experience in payment infrastructure and distributed systems (Go, PostgreSQL, Redis, AWS) who decided to learn the foundation that the entire financial world runs on — IBM mainframes.
While most engineers move away from mainframes, I moved toward them — because I understand that knowing both worlds (cloud-native and mainframe) makes you the engineer that enterprise teams desperately need right now.
What I bring to your team:
- ✅ Can read, write, and debug REXX on z/OS
- ✅ Understands TSO, JCL, COBOL, and z/OS architecture
- ✅ Comfortable with Zowe CLI and z/OSMF — the modern mainframe DevOps stack
- ✅ Bridges the gap between legacy mainframe systems and modern cloud infrastructure
- ✅ Writes documentation that both engineers and managers can read
Engineers who can work on mainframes AND modern cloud systems are among the rarest and most valuable professionals in enterprise IT. I am one of them.
