Creating your own resource control table

You can create your own table or rename Q.RESOURCE_TABLE.

About this task

You can include additional columns in the table you create if Q.RESOURCE_VIEW is the view defined on this table and the table includes the columns structure of the Q.RESOURCE_TABLE table.

Important: When running QMF for TSO and CICS®, you invalidate the QMF application plan when you drop the view. For this reason, you should work outside of QMF when you drop and re-create the resource table and view.

Procedure

To create your own resource table, follow these steps. These example SQL statements create a table called MY_RESOURCES. Substitute your own table, column, and table space names in the statement.

  1. Erase Q.RESOURCE_TABLE from the database with a statement like the following, because Q.RESOURCE_VIEW is defined on this table:
    DROP TABLE Q.RESOURCE_TABLE
  2. Re-create the table.
    Under TSO, substitute your own table space name for DSQTSSN1.
    Figure 1. Creating a resource control table or renaming Q.RESOURCE_TABLE
    CREATE TABLE MY_RESOURCES
      (GROUP_NAME    CHAR(16) NOT NULL,
       CONSTRAINT    CHAR(16) NOT NULL,
       INTEGER       INTEGER,
       FLOAT_VALUE   FLOAT,
       CHARACTER     VARCHAR(80))
    IN DSQTSSN1
  3. If you do not use the table space supplied with QMF, you must create your own. If you rebind the QMF application plan explicitly, you also need the BIND privilege on the plan.
  4. Redefine Q.RESOURCE_VIEW as a view on the new table, MY_RESOURCES.
    Always re-create Q.RESOURCE_VIEW if you decide to use a table other than Q.RESOURCE_TABLE or decide to give Q.RESOURCE_TABLE a different name, because QMF queries the view, not the table, to obtain resource control information to pass to the governor exit routine.

    The following example shows how to redefine Q.RESOURCE_VIEW as a view on the new table, MY_RESOURCES. Substitute your own table and column names for those in the example.

    CREATE VIEW Q.RESOURCE_VIEW
     (RESOURCE_GROUP, RESOURCE_OPTION, INTVAL, FLOATVAL, CHARVAL)
      AS SELECT GROUPNAME, CONSTRAINT, INTEGER, FLOAT_VALUE, CHARACTER
      FROM MY_RESOURCES
  5. Grant the SELECT privilege on Q.RESOURCE_VIEW to PUBLIC.
  6. Test the new view; you can test the view using SPUFI. Finally, rebind the QMF application plan.