Previous Topic: 4.2.4.3.6.3 Data Type Definition (COMPUTE)

Next Topic: 4.2.4.3.6.5 Alias Definition (ALIAS)

4.2.4.3.6.4 Data Type Definition (AVG/PCT)

MSI can automatically generate data element DEPENDencies,
and the SAS code to perform either an average (A = B / C) or
a percent (A = B / C * 100) equation.
 
Note that the parameters for the AVERAGE or PERCENT statement
can only be data element names.  No constants or SAS
expressions are allowed.  If a more complex average is
needed, (e.g., A = (B+(C/47.8))/D), then the COMPUTE and its
companion statements (EXP, DEPEND) must be used.
STATEMENT FORMAT
 
This keyword is coded with the KEYWORD starting in column 1,
free-form, and continuing through column 72.  Continuation is
not supported.  The following describes the format and coding
rules for the statement.
 
 AVERAGE    element-A element-B element-C
   AVG         |       |          |
 PERCENT       |       |          |
   PCT         |       |          +---denominator data
    |          |       |              element name
    |          |       |
    |          |       +---numerator data element name
    |          |
    |          +----data element name
    |
    +-----Statement identifier
STATEMENT OPTION DEFINITIONS
 
AVERAGE   - Defines a data element as type AVERAGE or PERCENT
AVG
PERCENT
PCT
            element-A - data element that will contain the
                        result of the calculation.
 
            element-B - data element that is the numerator
                        for the expression.  Note that only
                        data elements are valid here.
 
            element-C - data element that is the denominator
                        for the expression.  Note that only
                        data elements are valid here.
STATEMENT EXAMPLES
 
In this example, the data element BUSYPCT contains the
percent busy CPU, and in the INPUTSAS data set is represented
as a value from 0 to 100.  It is necessary to provide an
equation so that BUSYPCT can be properly computed at higher
timespans.
 
FILE fff
INPUTSAS SAMPLE.DSN
PERCENT BUSYPCT BUSYTIME DURATION