Sending HTML Email From Your Mainframe

2 Pages

Did you know you can send HTML-formatted email from your mainframe? I’m always looking for ways to make our mainframe look sexier and more versatile to our management team to keep them from retiring the platform.

Our organization recently experienced some rather severe performance issues with our Enterprise Resource Planning (ERP) system. The mainframe wasn’t the cause of the problem; the main symptom was high-DB2 utilization on the mainframe. While troubleshooting this problem, our middle-management team asked if they could receive some type of automatic notification when the mainframe was experiencing high-CPU utilization.

I already had in place a custom CPU performance-monitoring system that runs an RMF post-processor CPU report every 30 minutes. A Rexx program parses the RMF report and sends the CPU percent-busy numbers to a Web-based graphing system. I modified this Rexx script to send an HTML-based email when the CPU surpassed 90 percent busy (see Figure 1).

This article describes how to create and send HTML-based email via a mainframe batch job, including some techniques I used to create the automated high-CPU email alert system used in my shop. The main focus is the mechanics of sending HTML-formatted email via z/OS-based mainframes.

Getting Started

Before you can begin sending HTML-based emails via your mainframe, you must make sure the Simple Mail Transfer Protocol (SMTP) gateway process works on your system. A simple way to do this is to try sending an e-mail from the mainframe. The JCL shown in Figure 2 can be used to perform this test. Just modify the highlighted components in the JCL in Figure 2 to match your environment. Notice the SYSUT2 DD statement. The SMTP server that runs on your mainframe interfaces with Job Entry Subsystem (JES).

If the email isn’t sent, check to see if the SMTP started task is running on your system. The standard name for this task is SMTP. If all else fails, read through the “Mail Servers” chapter of the z/OS V1Rx CS: IP Configuration Guide and make the customizations shown there. The link for this manual is specified in the References section of this article.

Anatomy of an HTML Email Message

2 Pages