Defining your own resource limits

To set your own resource limits for the number of rows that are retrieved from the database, you can add a resource group to the resource control table.

About this task

This procedure adds a resource group named GROUP1. The governor prompts users in GROUP1 when the number of rows reaches 10,000 and cancels the user's activity when the number of rows reaches 15,000. For TSO, ISPF, and native z/OS® batch, the governor also prompts a user in GROUP1 when processor time reaches 300 seconds, and cancels the user’s activity when the processor time reaches 1,000 seconds. The procedure also shows an example of how to add a user to a resource group.

Procedure

To add a resource group to the resource control table, follow these steps:

  1. Set the number of rows at which the user is warned of the approaching resource limit.
    If you do not want to warn users when they are approaching their limit for the number of rows, skip to Step 2.
    Figure 1. Configuring a prompt for 10,000 retrieved rows
    INSERT INTO Q.RESOURCE_VIEW (RESOURCE_GROUP,RESOURCE_OPTION,INTVAL)
        VALUES('GROUP1','ROWPROMPT',10000)
  2. Set the number of rows at which the governor cancels the user's activity.
    The following example sets the cancellation at 15,000 rows.
    Figure 2. Configuring cancellation of QMF activity at 15,000 retrieved rows
    INSERT INTO Q.RESOURCE_VIEW (RESOURCE_GROUP,RESOURCE_OPTION,INTVAL)
        VALUES('GROUP1','ROWLIMIT',15000)
  3. Set the processor time that elapses before the user is warned of the approaching resource limit.
    Elapsed processor time applies only to TSO, ISPF, and native z/OS batch environments. If you do not want to warn users when they are approaching their limit for the time that is elapsed, skip to Step 4.
    Figure 3. Configuring a prompt to be issued after 300 seconds (5 minutes) of processor time in TSO, ISPF, and native z/OS batch
    INSERT INTO Q.RESOURCE_VIEW (RESOURCE_GROUP,RESOURCE_OPTION,INTVAL)
        VALUES('GROUP1','TIMEPROMPT',300)
  4. Set the amount of processor time that can elapse before the governor cancels the user's activity.
    Figure 4. Configuring cancellation of QMF activity after 1000 seconds (over 16 minutes) of processor time in TSO, ISPF, and native z/OS batch
    INSERT INTO Q.RESOURCE_VIEW (RESOURCE_GROUP,RESOURCE_OPTION,INTVAL)
        VALUES('GROUP1','TIMELIMIT',1000)
  5. Set the real time between intervals when the governor checks the user's activity.
    Figure 5. Configuring QMF to compare user activity against resource limits approximately every 13 minutes in TSO, ISPF, and native z/OS batch
    INSERT INTO Q.RESOURCE_VIEW (RESOURCE_GROUP,RESOURCE_OPTION,INTVAL)
        VALUES('GROUP1','TIMECHECK',800)
  6. Turn on governing for the GROUP1 resource group.
    SCOPE is a resource option that activates or deactivates governing. Each resource group in Q.RESOURCE_TABLE must have a RESOURCE_OPTION called SCOPE, and SCOPE must have a corresponding INTVAL of zero, or the resource group is not governed. Set INTVAL to 1 to deactivate governing.
    Figure 6. Turning on the governor for the GROUP1 resource group
    INSERT INTO Q.RESOURCE_VIEW (RESOURCE_GROUP,RESOURCE_OPTION,INTVAL)
        VALUES('GROUP1','SCOPE',0)
  7. Add user JONES to the GROUP1 resource group in the English QMF environment.
    Figure 7. Updating a user's resource group in the Q.PROFILES table
    UPDATE Q.PROFILES
      SET RESOURCE_GROUP='GROUP1'
      WHERE CREATOR='JONES' AND
      TRANSLATION='ENGLISH'

    Use a similar statement to update user profiles in an NLF environment, but use a value for TRANSLATION that represents the name that QMF uses for the NLF. For the name that QMF uses for an NLF, see Table 1

What to do next

Instruct the user whose profile you updated to end the current QMF session and start another to activate the new values.