Previous Topic: Arithmetic Expressions

Next Topic: Use of Parentheses


Format


field-name1[(suffixes)] =
     field-name2[(suffixes)]  { + } field-name3[(suffixes)]
                              { - }
                              { * }
                              { / }
             [  { + } field-name4[(suffixes)] ]...
             [  { - }                         ]
             [  { * }                         ]
             [  { / }                         ]

The following arithmetic operations can be performed:

Example:

A run may include the following COMPUTE instructions to calculate billing costs:

COMPUTE CPU CHG(.2) = CPU TIME * .016,
        ACTIVE CHG(.2) = ACTIVE TIME * .008,
        PROC CHG(.2) = CPU CHG + ACTIVE CHG

These sample instructions call for two multiplications and an addition. The results are saved in CA JARS Wizard work fields.