Space announcement This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Using a DSRSEXIT, TERMEXIT, or MAPTEXIT user exit


This topic describes the REXX-based user exits that you can use with REORG PLUS.

You can use the following user exits written in REXX:

This section describes the following information common to all REXX exits that you can use with REORG PLUS:

  • Requirements and restrictions
  • Variables and return codes

To use a sample REXX user exit from the HQL.LLQSAMP library, copy the appropriate member as the base code for your exit; edit the code if needed, and save the modified exit in your SYSEXEC library. For additional instructions, see the section for the specific exit. 

DSRSEXIT, TERMEXIT, and MAPTEXIT common restrictions

The REXX user exits have the following restrictions:

  • REORG PLUS does not permit any TSO commands, such as ALLOC, in a REXX exit.
  • You cannot perform a call to another REXX program from within one of your REXX user exit programs. Doing so will cause values in your REXX variables to be lost.

DSRSEXIT, TERMEXIT, and MAPTEXIT common variables and return codes

REORG PLUS communicates with REXX exits through REXX variables. The Variables common to all REXX exits table lists the variables that are common to all REXX exits. For the list of variables unique to a particular REXX exit, see the section about variables for that exit.

Your REXX exit should always return a return code of 0 to REORG PLUS. REORG PLUS uses the REXX variables returned from the exit, not the return code, to determine the intent of the exit. If you specifically code a nonzero return code, REORG PLUS treats it as an environment failure and terminates the job. 

The following table lists the variables that REORG PLUS passes to all REXX user exits. You cannot change the value of any of these variables.

Variable name

Description

BMC_EXIT_POINT

Name of the exit point

BMC_UTILITY_NAME

REORG

BMC_REORG_TYPE

Reorganization type, either TABLESPACE or INDEX

BMC_UTILITY_SHRLEVEL

The SHRLEVEL of the reorganization:

  • N for SHRLEVEL NONE
  • U for SHRLEVEL REFERENCE UNLOADONLY
  • R for SHRLEVEL REFERENCE
  • C for SHRLEVEL CHANGE

BMC_UTIL_ID

UTILID from the EXEC parameters

REORG PLUS truncates longer utility IDs to eight characters.

BMC_UTILPFX

BMC utility ID prefix

BMC_UTILSFX

BMC utility ID suffix

BMC_DB2_RELEASE

Three-character version, release, and maintenance number (VRM) of the Db2 release

BMC_JOBNAME

JOB name used in the JCL

BMC_STEPNAME

STEP name used in the JCL

BMC_DBNAME

Database containing the space being used for this data set allocation

BMC_TSIX

Table space or index space name

BMC_USERID

Job user ID

You must have a security package to use this variable.

BMC_VCATNAME

VCAT NAME specified in the Db2 catalog for the table space being reorganized; or, if the table space is partitioned, the VCAT name from the first part being reorganized

BMC_DB2_SSID

Db2 subsystem ID

BMC_DB2_GROUPNAME

Db2 data sharing group name

In a non-data sharing environment, this variable contains the Db2 SSID.

BMC_DATE

Current date (in the form MMDDYY)

BMC_DATEJ

Current Julian date (in the form YYYYDDD)

BMC_DATE8

Current date (in the form MMDDYYYY)

BMC_TIME

Current time (in the form HHMMSS)

BMC_TIME4

Current time (in the form HHMM)


 

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