End-of-memory-initiated REXX EXEC


Use the end-of-memory EXEC to ensure that critical address spaces do not terminate unnoticed.

Potential use

Normally, address space termination can be monitored by using standard MVS and JES messages.

However, there are situations when monitoring based on these messages is not sufficient because an address space may terminate without producing the expected messages. For example, the expected termination messages may not be produced if the MVS FORCE or SYSPROG EXIT command is used or when an initiator abends.

The end-of-memory EXEC allows BMC AMI Ops Automation to monitor address space termination regardless of how the address space is terminated. This EXEC is scheduled for the following objects when the associated events occur:


Batch jobs

Only when the initiator terminates

TSO users

When any TSO user is terminated

Started Tasks

When any Started Task is terminated

There is only one end-of-memory EXEC for each BMC AMI OpsA subsystem. Each time one of the above mentioned events occurs, BMC AMI OpsA automatically schedules an EXEC named IMFEOM if it exists in the SYSPROC concatenation.

Parameters passed to the EXEC

Two parameters are passed to the end-of-memory EXEC.

  • The first parameter contains the fixed string of *EOM*.
  • The second parameter contains a character string that can have one of two values:


Parameter value

Description

NORMAL

Indicates normal address space termination

ABNORMAL

Indicates address space was terminated by passing it to RTM

This situation may happen when using the SYSPROG EXIT command or the MVS FORCE command; however, it is not an indication that the address space abended with a system or user abend code.

Example

This first example shows an EXEC called STRT that is scheduled by a Rule (a Rule-initiated EXEC).

The Rule is fired when the JES2 message $HASP373 is issued for jobname PRODSTC: $HASP373 indicates that the job has started.

/*REXX EXEC */
/*----------------------------------------------------------------*/
/* THIS EXEC IS DRIVEN FROM JES2 MESSAGE, $HASP373, FOR STC       */
/* PRODSTC ONLY                                                   */
/*                                                                */
/* EXEC DESCRIPTION: SET VARIABLE 'PRODSTKN' TO STOKEN OF PRODSTC */
/*----------------------------------------------------------------*/
PRODSTKN = IMFSTOKN
'IMFEXEC VPUT PRODSTKN'

The second EXEC, IMFEOM, is scheduled automatically when any Started Task or TSO address space terminates or when a batch initiator abends.


/* REXX */
ARG IMFEOM STATUS .
/*--------------------------------------------------------------*/
/* THIS EXEC IS DRIVEN FROM END OF MEMORY EXIT                  */
/*                                                              */
/* EXEC DESCRIPTION: DETERMINE IF ADDRESS SPACE TERMINATING IS  */
/*                   'PRODSTC'.  IF SO, INFORM THE OPERATOR.    */
/*--------------------------------------------------------------*/

"IMFEXEC VGET PRODSTKN"
IF IMFSTOKN = PRODSTKN THEN DO
   PRODSTKN =''
   "IMFEXEC VPUT PRODSTKN"
   IF STATUS = ABNORMAL THEN   ,
      "IMFEXEC WTO 'PRODSTC ENDED ABNORMALLY'"
END

When the STRT EXEC is scheduled, the local variable IMFSTOKN contains an identifier that uniquely identifies the PRODSTC Started Task. Because this variable only exists for the life of the EXEC, STRT saves the IMFSTOKN value in the shared variable pool so that it can be used subsequently by the IMFEOM EXEC.

Error
Warning

If this procedure will be used for more than one address space, you should use a variable name other than IMFSTOKN in the shared variable pool or else the value IMFSTOKN might be overridden by the other procedures.

When the IMFEOM EXEC is scheduled, IMFSTOKN refers to the address space that is being terminated. The IMFEOM EXEC compares IMFSTOKN to the PRODSTKN value saved previously by the EXEC named STRT.

If the values do not match, IMFEOM exits because the address space that is terminating is not one that is being monitored. If the values do match and the parameter passed to IMFEOM indicates abnormal termination, then a WTO (write-to-operator) is issued to notify the operator.

See TSO-variables-and-USS-variables-supplied-by-BMC-AMI-Ops-Automation for more information about variables supplied by BMC AMI OpsA.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Automation 8.4