REXX Program that Calls DSNUTILS Stored Procedure to Run RUNSTATS utility Forum/discussion group
Abstract
This sample REXX program calls the DSNUTILS stored procedure to invoke the RUNSTATS utility. The user invokes the command by passing the database name and the table space name and optionally the subsystem id and trace option.
The syntax is provided in statements in the source.
This example is based loosely on the PL/I sample DSN8EPU from the sample library. The code works in DB2® Version 7 or Version 8 as long as the IBM®-supplied DSNUTILS stored procedure is installed. Customization of the REXX program can be done to provide the default DB2 subsystem or to modify the utility control statement and utility ID. Error handling and doc could also be enhanced.
Content
The following files are included in this example:
CLDSNUTL REXX program that calls DSNUTILS
BINJREXX
JCL to bind the REXX program.
To run the example, complete the following steps:
1. Download the two parts, and upload them to your z/OS® system.
2. Set up WLM, RRS, DSNUTILS, and the WLM environment.
3. Edit BINJREXX as you are instructed in its prolog.
4. Run BINJREXX to bind the REXX program.
10. Run CLDSNUTL by using either a batch job or the TSO ISPF option 6 (Command). If you use TSO, type exec'data-set-and-member-name' on the command line.
User comments on this example:
"This example was so helpful. It filled in the gaps in the IBM doc which didn't really give me enough details to call DSNTUILS from a REXX pgm.
Thank you."
Example submitted by:
David Seibert, Compuware Corporation
Rate this example
Notice: This example is from the DB2® Examples Trading Post and is provided on an "as-is" basis. You may copy and modify this example in any form without payment to IBM, for the purposes of designing and developing application programs conforming to the application programming interface for the z/OS or OS/390® operating system for which these examples are written. This example has been tested, but it has not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of this example in your particular environment. Use this example as a model for your own situations.
http://www-1.ibm.com/support/docview.wss?rs=64&context=SSEPEK&q1=rexx+program+dsnutils&uid=swg27005764&loc=en_US&cs=utf-8&lang=en
P.S. Please pass my address to anyone interested in DB2 HOTLINE - thank you.
With kind regards
Michael Dewert, Software GroupTechnical Sales DB2