Range definition statements


If you want to define a Property based on a numeric Descriptor (for example, the number of tape drives requested by a job) you use a range definition statement. With this method you can define one or more Properties with a single statement.

The range definition statement is a compact method for coding a definition that avoids a complex series of tests to determine the value of a numeric Descriptor. This is best shown by an example. Following is a range definition statement based on the numeric Job Descriptor $JOBCPU:

$JOBCPU  LIGHT_CPU,2,MODERATE_CPU,5,HEAVY_CPU

This example assumes that you wish to use the amount of time specified by the TIME keyword on the JOB statement to classify jobs. You want to break the workload into three groups: jobs that use little CPU time, jobs that use a moderate amount, and jobs that need a lot of CPU time.

$JOBCPU is a reserved word which identifies the Job Descriptor you are using. LIGHT_ CPU, MODERATE_CPU, and HEAVY_CPU are the names chosen for the Properties. The numbers (2 and 5 in this example) indicate the breakpoints that separate the named portions of the range. This example means:

  • If the job requests less than two CPU minutes, LIGHT_CPU is TRUE.
  • If the job requests at least two CPU minutes but fewer than five, MODERATE_ CPU is TRUE.
  • If the job requests five or more CPU minutes, HEAVY_CPU is TRUE.

ThruPut Manager assigns a TRUE value to only one of the Properties in a range definition; any others specified are assigned the value FALSE.

The simplicity and power of the range definition statement is best appreciated by comparing it to what would be needed with conventional coding techniques. Here is the logical meaning of the above range definition:

0 <= LIGHT_CPU  <  2  <=  MODERATE_CPU  <  5  <=  HEAVY_ CPU  <  357912:00

Without the range definition statement, you would need:

IF ($JOBCPU < 2)
  [actions]
ORIF ($JOBCPU < 5)
   [actions]
OTHERWISE
   [actions]
ENDIF

The conventional construction is more prone to errors and harder to modify than the range definition statement. With the range definition construct it is also simple to have different range values defined for the same type of resource to classify different types of workload. For example, you might have an environment where you impose different restrictions on the CPU time requested for production jobs and test job. The following two range definition statements address this requirement:

$JOBCPU TEST_CPU_TIME_OK,2,TEST_TOO_MUCH_CPU
$JOBCPU PROD_CPU_TIME_OK,10,PROD_TOO_MUCH_CPU

Then your JAL logic could look like this:

IF (TEST_JOB & TEST_TOO_MUCH_CPU)
  [fail job with appropriate messages]
....


 

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

BMC Compuware ThruPut Manager 18.02