EASY/Exit provides a rule-based facility for handling console and WTO/WTOR message traffic under z/OS, enabling message suppression, highlighting, automatic replies, job/task starts, notifications, and other automated actions based on message attributes and system variables (for example, &JOBNAME, &STEPNAME, system id, date, and time).
Overview
EASY/Exit integrates with the z/OS MPF message-processing environment to provide a centralized, policy-driven mechanism for controlling message handling. Rules can match message IDs and text and set EASY/Exit variables to perform actions such as replying to WTORs, starting tasks, issuing z/OS commands, suppressing messages, changing display attributes, or passing parameters to REXX and other processing.
To apply rule changes at runtime, refresh the in-storage rules with the DIF REFRESH command, for example: DIF,REFRESH EXT.
MPF environment and activation
The MPF environment is entered when EASY/Exit receives control either via the general message-processing exit IEAVMXIT or as an MPF exit from an entry in MPFLSTxx (member of SYS1.PARMLIB). By default, no action is taken unless rules set EASY/Exit variables.
To enable MPFLSTxx processing, issue the console command: SET MPF=xx. To enable the general exit, issue: CONTROL M,UEXIT=Y. After changes to MPFLSTxx or exit modules, refresh LLA and reissue these console commands to reload configuration.
Use DISPLAY MPF to view current MPF/IEAVMXIT status and referenced exits.
IEAVMXIT versus MPFLSTxx
Each message is processed by either MPFLSTxx or IEAVMXIT, not both. If a message is listed in MPFLSTxx, it will not be delivered to IEAVMXIT. MPFLSTxx entries may optionally reference a user exit (assembler) to handle specific messages.
To have EASY/Exit handle messages listed in MPFLSTxx, include USEREXIT(EXT6000) (or appropriate module name) on the MPFLSTxx entry and ensure the EASY/Exit load module is in the linklist.
Loading and linkage
Link the EASY/Exit load module with the required exit name (for example, IEAVMXIT) and place it in a linklist library. Binder JCL example to relink EXT6000 as IEAVMXIT:
//MPF EXEC PGM=IEWL,PARM='XREF,LIST,LET,RENT',REGION=4M
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DSN=USER.LINKLIB,DISP=SHR
//SYSLIB DD DSN=DTS.EXTR71.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD *
INCLUDE SYSLIB(EXT6000) SETCODE AC(1)
NAME IEAVMXIT(R)
After link-editing, issue CONTROL M,UEXIT=Y to load the new module. Consider consolidating message-processing policies by moving MPFLSTxx entries into EASY/Exit rules and removing them from MPFLSTxx.
Rule-based message processing
When the MPF environment is active, EASY/Exit rules run for each message (WTO/WTOR). Rules can examine message text and IDs and set variables (for example, &MREPLY, &MPFCOMMAND) to trigger actions. Actions can include dynamically built commands and parameter passing to started tasks, REXX execs, and other processors.
Activate the MPF environment inside rules using a DEFENV statement, for example:
DEFENV MPF MODE(ACTIVE)
Message recursion and safety
Avoid rules that issue messages which EASY/Exit is configured to intercept, as this can create infinite recursion. For example, the following constructs can loop if the issued message matches a rule:
DEFENV MPF MODE(ACTIVE)
DEFRULE MSGRULE
IF &MSGID = ABC* THEN ISSUE WRITEMSG(MYMSG)
DEFMSG MYMSG 'ABC001 THIS MESSAGE WILL CAUSE A LOOP'
To reduce the risk, use a distinct prefix (for example, messages that begin with EXT or DIF) for EASY/Exit-issued messages; these are automatically excluded from EASY/Exit processing. If a recursion occurs, disable exits, correct rules, and re-enable exits:
CONTROL M,UEXIT=N
...fix rules...
CONTROL M,UEXIT=Y
Variables available in the MPF environment
The MPF environment exposes many variables (most begin with M or MPF) and status flags (that begin with ST_). These include message identifiers, reply and command targets, job/step names, console tokens, and flags for suppression, hardcopy, highlighting, automation, and retention. Many variables are writable to override default MPF behavior; some are read-only (noted in the table).
| Name | Values | Description |
|---|---|---|
| MSGID | 1-12 chars | Message identifier (characters preceding first blank) |
| MPFCOMMAND | 1-126 chars | z/OS command to be issued |
| MWTOSEQ | 1-nnnn | WTO sequence number |
| MLWTOID | 1-nnnn | Multiline WTO id |
| MREPLYID | 1-8 chars | EBCDIC reply id |
| MJOBNAME | 1-8 chars | Name of job that issued message |
| MCART | 1-8 chars | Command response token |
| MSYSNAME | 1-4 chars | System on which message originated |
| MAUTTOKN | 1-8 chars | Automation token (MPF) |
| MSGLEN | 1-126 | Message length |
| MREPLY | 1-126 chars | Reply to be issued in response to WTOR |
| MONTYPE | JOBNAMES, SESSION, or STATUS | Current z/OS MONITOR command in effect |
| ST_QUEUE1 | YES or NO | Queue message to a particular active console |
| ST_SUPPRESS1 | YES or NO | Message is suppressed by MPF |
| ST_HARDCOPY1 | YES, NO, or ONLY | Send message to hardcopy |
| ST_CMDRESP1 | YES or NO | Message is a command-response message |
| ST_BROADCAST1 | YES or NO | Broadcast message |
| ST_RETAIN1 | YES or NO | Message to be retained by automatic message retention facility |
| ST_AUTO1 | YES or NO | Automation specified by MPF |
| ST_REISSUED1 | YES or NO | Message is a reissued message |
| DOM1 | YES or NO | Message has been DOM'ed (deleted from console) |
| DISPLAYED1 | YES or NO | Message has already been displayed |
| MSGDELETE | YES or NO | Suppress this message |
| MSGECHO | YES or NO | Echo the message to the TSO user |
| MSGUNSUPP | YES or NO | Override MPF suppression (do not suppress) |
Note: Some variables are read-only; the table entries indicate typical usage and allowed values.
Display and presentation variables
Additional message presentation variables control hardcopy, broadcast, roll retention, automation prevention, highlighting, joblog suppression, message type, color and highlighting modes, and intensity. Common variables include:
| Name | Values | Description |
|---|---|---|
| MSGHARDCOPY | YES, NO, or ONLY | Send message to hardcopy |
| MSGBROADCAST | YES or NO | Broadcast message |
| MSGROLL | YES or NO | Message may/may not be retained (rolled off the console) |
| MSGUNAUTO | YES or NO | Prevent message automation |
| MSGHILITE | YES or NO | Highlight message |
| MSGCOLOR | BLUE, RED, PINK, GREEN, TURQ, YELLOW, WHITE | Message color (color consoles) |
| MSGMONOHI | OFF, BLINK, REVERSE, UNDER | Highlighting for monochrome consoles |
| MSGINTENSE | NORMAL, HIGH | Message intensity (supported consoles). Use MSGHILITE for most highlighting. |
Examples
Automatically reply to ICKDSF messages to initialize VTOC indexes
DEFENV MPF MODE(ACTIVE)
DEFRULE IXRULE
IF &MSGTEXT(1,51) = 'ADR369D AUTHORIZE FOR WRITE ACCESS A VTOCIX ON SMS001'
THEN SET &MREPLY = 'U'
Suppress messages from a specific job
DEFENV MPF MODE(ACTIVE)
DEFRULE MYJOBRUL
IF &JOBNAME = MYJOB1 AND &MSGID = (ASCP049I, USERMSG*) THEN SET &MSGDELETE = YES
Highlight a message and start an STC
DEFRULE A49DRUL
IF &MSGTEXT(1,06) = 'A49D4I' THEN SET &MSGHILITE = YES
SET &MPFCOMMAND = 'S ZACKERR'
Some messages are issued very early during z/OS initialization (for example, IST020I VTAM INITIALIZATION COMPLETE) before the DIF started task is available. For such cases, limited EASY/Exit processing is supported via MPFLSTxx configuration.
- List the message in
MPFLSTxx. - Set the MPFLSTxx entry
USEREXITparameter to one of:USEREXIT(EXTSTART)— to initiate a started taskUSEREXIT(EXTREPLY)— to issue a WTOR reply
- Set the
AUTOparameter to specify either the started task name (max 8 characters) or the reply value (max 8 characters).Note: Variable substitution is not supported in the AUTO parameter. - After changes to MPFLSTxx, refresh LLA and reissue
SET MPF=xxto reactivate the associated exit routines.
To centralize message handling in EASY/Exit:
- Create rules that replicate the behavior currently enforced by MPFLSTxx entries.
- Test rules in a non-production environment.
- Remove corresponding MPFLSTxx entries once rules are validated.
- Refresh LLA and reissue
SET MPF=xxandCONTROL M,UEXIT=Yas needed.