Creating special resources

About this task

The payroll system has several jobs that update the payroll database, and these cannot run together. If you submit them together, z/OS® forces one job to wait because of the DISP=OLD disposition for the database (or similar mechanism for VSAM). Letting jobs compete and be locked out in this way ties up z/OS® resources, such as initiators, and can result in deadlock.

One way of forcing serialization is to make one job a predecessor of the other, but often it is unimportant which job runs first: the important thing is that they do not run together.

The best way of doing this is to create a special resource, which in this case is the database. See Creating special resources for a full description of special resources. Create a resource to control the payroll database by following these steps:
  1. Select option 6 from the MAINTAINING DATABASES menu (EQQODBSP - Maintaining databases).
  2. Select option 3 (LIST) on the MAINTAINING SPECIAL RESOURCES menu (EQQQDTOP - Maintaining special resources). You can select option 2 (CREATE) instead, but option 3 gives you a chance to see the resources already created.

    When you select 3 (LIST), the SPECIFYING SPECIAL RESOURCE LIST CRITERIA panel is displayed, enabling you to filter the resources shown in the list. Enter an * (asterisk) in the SPECIAL RESOURCE and SPECRES GROUP ID fields to list all resources.

  3. On the LIST OF SPECIAL RESOURCES panel, enter the CREATE command. The CREATING A SPECIAL RESOURCE panel is shown (Specifying the payroll database as a resource):
    Figure 1. Specifying the payroll database as a resource
    EQQQDCRP ---------------- CREATING A SPECIAL RESOURCE -------------------
    Option ===>
    
    Select one of the following:
    
    1 INTERVALS  - Specify intervals
    2 WS         - Modify default connected work stations
    
    SPECIAL RESOURCE   ===> PAYROLL.DATABASE____________________________
    TEXT               ===> serializes access to the Paymore database________
    SPECRES GROUP ID   ===> SAMPLE__
    Hiperbatch         ===> N       DLF object Y or N
    USED FOR           ===> B       Planning and control C , P , B or N
    ON ERROR           ===> K_      On error action F , FS , FX , K or blank
    ON COMPLETE        ===> _       On complete action Y, N, R or blank
    MAX USAGE LIMIT    ===> 0       Max number of allocation before usage reset
    MAX USAGE TYPE     ===> R       Status change type Y, N or R
    
    
    
    Defaults
      QUANTITY         ===> 1_____  Number available 1-999999
      AVAILABLE        ===> Y       Available Y or N
  4. Type the values shown. Note especially these values:
    SPECIAL RESOURCE
    This name must be exactly the same in all the application descriptions that use the database.
    USED FOR
    Type B, because you want HCL Workload Automation for Z to take account of resource availability when creating plans (planning), and to check resource status before starting an operation (control).
    ON ERROR
    Type K, because the jobs are to keep the resource allocation even if they fail. This is so that there is no risk of another job taking the database before the operator (or automatic recovery) handles the error.
    QUANTITY and AVAILABLE
    This is the default for all time intervals. For this resource, you do not need to specify intervals, so these values always apply, unless altered dynamically; for example, by the EQQUSIN subroutine or the SRSTAT TSO command.
  5. Press PF3 (End) to save the resource definition.

For some resources, such as those representing tapes or communication lines, you would normally specify intervals, and, for each interval, the quantity, availability, and connected workstations.

For PAYROLL.DATABASE, the defaults are for all times, and the resource is accessible from all workstations.