Previous Topic: Example 1: Defining Conditional Rates by Qualifier

Next Topic: Qualifier Entry Panel


Example 2: Defining Conditional Rates by Qualifier

In this example, we are extending the algorithm we used in Example 1 (on the previous page) to include a 50% discount for CPU weekend usage. As in the previous example, we must list each qualifier and its associated rate for each shift which now includes weekend rates for each shift. The W stands for weekend.

Note: You must scroll the panel to see the rate for @SHIFT2 which is 150.00000 and @SHIFT3 which is 100.00000

When a qualifying condition is met, the appropriate rate is applied.

USERID CA PMA Chargeback MM/DD/YY HH:MM:SS __ Acctdefs Cbdefs Query Data Period Options Exit Help +-- CBCELMR ------------- Qualified Rates -------------------------+ | Panel Exit Help | | ---------------------------------------------------------------- | | Type information. Then select an action. | | | | Version . . . : PROD | | ORD Type . . . : MBJ | | Charge Element : CPU-CHARGE | | | | More: - + ____ Row 0001 of 0006 | | Cmd Qualifier Rate | | | | _ @SHIFT1W________ 100.0000________ | | _ @SHIFT2W________ _75.00000_______ | | _ @SHIFT3W________ _50.00000_______ | | _ @SHIFT1_________ 200.00000_______ | | | | F2=Qual F5=Save F6=Delete F7=Bkwd F8=Fwd F11=Expand | +------------------------------------------------------------------+ Command ===> ____________________________________________________________ F1=Help F3=Exit F4=Prompt F9=Command F10=Action Bar F12=Cancel PA1=Susp

Using the panel above, if the MBJ ORD record meets the @SHIFT1W qualification, then the rate charged is 100 per unit. If the record does not meet the @SHIFT1W qualification, then the @SHIFT2W qualification is tested. The testing continues through @SHIFT3 until a true condition is encountered. However, if none of the qualifiers' conditions are met, the default rate specified on the Charge Elements Entry panel is used.

Tip

Test for the weekend first.