Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see DASD MANAGER PLUS for DB2 13.1.

REXX programs


Use this information to write REXX programs to evaluate user-defined exceptions.

The user-defined exception REXX program receives an eight-part stem variable, BMC_EXCEPTIONS_PARMS, as input. The exception also receives a simple variable, BMC_EXCEPTIONS_TRIGGER, which you must set to TRUE or FALSE to trigger the exception. (TRUE triggers the exception, and FALSE does not.) C ignores modified stem variables.

Input variables

The following table describes the REXX stem variables that are set when the REXX program is invoked:

Stem name

Index

Description

BMC_EXCEPTIONS_PARMS.EXCEPTION_NAME

BMC_EXCEPTIONS_PARMS.1

Name of the exception from the threshold row being evaluated

BMC_EXCEPTIONS_PARMS.EXEC_NAME

BMC_EXCEPTIONS_PARMS.2

Name of the REXX program from the threshold row being evaluated

BMC_EXCEPTIONS_PARMS.SSID

BMC_EXCEPTIONS_PARMS.3

Db2 SSID

BMC_EXCEPTIONS_PARMS.QUALIFIER

BMC_EXCEPTIONS_PARMS.4

Qualifier of the object being analyzed

For type TS, it is the database name. For type IX, it is the creator name.

BMC_EXCEPTIONS_PARMS.NAME

BMC_EXCEPTIONS_PARMS.5

Name of the object being analyzed

For type TS, it is the table space name. Fo type IX, it is the index name.

BMC_EXCEPTIONS_PARMS.OBJTYPE

BMC_EXCEPTIONS_PARMS.6

Type of the object being analyzed

It is TS for table space and IX for index.

BMC_EXCEPTIONS_PARMS.PARTNUM

BMC_EXCEPTIONS_PARMS.7

Partition number being analyzed

This number can be 0.

BMC_EXCEPTIONS_PARMS.ACTION

BMC_EXCEPTIONS_PARMS.8

Corrective action that is defined for the exception

Important

The REXX stem variable BMC_EXCEPTIONS_PARMS.0 is equal to 8.

Return data

By default, the simple variable BMC_EXCEPTIONS_TRIGGER is set to FALSE.

You can cause BMCTRIG to indicate that an exception has occurred for the threshold by setting the variable to TRUE as follows:

 BMC_EXCEPTIONS_TRIGGER = TRUE /* this will raise the exception */

Important

  • You can use uppercase, lowercase, or mixed case for TRUE or FALSE.
  • Modifying other variables has no effect on BMCTRIG processing.

Connecting to Db2

The REXX programs run under a separate TCB than BMCTRIG.

Therefore, the REXX program must establish a connection to Db2, which creates a new Db2 thread. When using DSNREXX, you can interact with Db2 in either of the following ways:

  • Db2 Call Level Interface
  • ADDRESS DSNREXX
Warning

Do not mix the two connection methods within the same invocation of BMCTRIG. You will receive unreliable results.

SYSEXEC

Ensure that your BMCTRIG JCL contains a SYSEXEC with the PDS(s) for executing the REXX programs.

The SYSEXEC is defined in the JCL Options File (POF) that is created during installation. You can view and modify options online. For more information about the JCL POF, see Using-the-product-options-file-POF.

Environment and error recovery

To invoke the user-defined REXX programs, BMCTRIG establishes a REXX environment under a separate task by using the IBM TSO/E environment service IKJTSOEV.

Some TSO services are not available in this environment. After BMCTRIG evaluates all exceptions, it detaches the subtask and removes the TSO/E environment. If an abend occurs in the subtask, BMCTRIG discontinues evaluating user-defined exceptions but continues with other processing.

For more information about REXX and the TSO/E environment, see the TSO/E REXX Reference and TSO/E Programming Services from IBM.

Sample

DASD MANAGER PLUS provides a sample REXX program in the HLQ.EXEC PDS named ASURTSRS.

The sample program queries the IBM Db2 Real-time Statistics tables to determine whether it is necessary to update the catalog statistics due to insert, update, and delete activity on the table space or index.

 

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