Previous Topic: 4.4 Determine Cycles to be UsedNext Topic: 4.6 Plan Any Needed SAS Data Set Creation


4.5 Plan Any Needed Computations


If the data elements needed are not in the proper form, they
must be computed from data elements that are available.  In
most cases this is a simple computation.

Assume that the ratio of I/O to total CPU time is required
for the report.  From the BATPGM file, use PGMEXCPS (I/O)
and PGMCPUTM (total of TCB and SRB CPU time) to calculate a
new variable:

RATIO=PGMEXCPS/PGMCPUTM

This variable produces a ratio of the number of I/Os
generated per second of CPU time consumed, which may be used
to identify either I/O dependent (high ratio) or CPU
dependent (low ratio) batch program executions.

At times multiple files are required. For example, to
calculate the percent of CPU utilization for a workload, you
must combine both the HARCPU file (to obtain total uptime for
the CPU) and the WLMSEC file to obtain the CPU time for the
workload class (or WLM_EC to obtain CPU time for the report
class). After the files have been combined in the proper
summarization levels and sequence, variables from both files
can be used to calculate the new variable. One example of the
calculation is shown here, where SECTCPTM is from the WLMSEC
file and CPUTOUTM is from the HARCPU file:

WRKLDUTL = SECTCPTM/CPUTOUTM*100;

Some computations will require that the data be sorted in a
particular sequence. For example, to create a report of top
10 CPU users, by JOBCPUTM, the file must first be sorted in
descending order by JOBCPUTM. The computation code would
select the first 10 observations of the sorted file with a
selection statement similar to the following:

IF _N_ LE 10;