Home > FAQ > Salary Definitions > Testing Salary Definitions for various dates

Testing Salary Definitions for various dates

Question: I want to be sure that service (or salary or cash balance) is only credited on certain dates. How can I test my Service Definition (or Salary Definition or Cash Balance component) to make sure that it is credited only on certain dates?

Answer: One of the ways of checking is to include many and/or special dates in the calculations. Dates before and after (or in close proximity to) date of hire, date of termination, date of participation, etc. make good testing dates.

  1. In the Data Dictionary, create a new effective dated date array: ExtraDates

  2. In the Data Defaults of the Census Specs, default the array accordingly:
  3.   D_DT := #BEGMTH DOT &  ; checks dates in the month of termination
     

    2 #ARRAY  (D_DT,

    D_DT+1, D_DT+2, D_DT+3, D_DT+4, D_DT+5,

    D_DT+6, D_DT+7, D_DT+8, D_DT+9, D_DT+10,

    D_DT+11, D_DT+12, D_DT+13, D_DT+14, D_DT+15,

    D_DT+16, D_DT+17, D_DT+18, D_DT+19, D_DT+20,

    D_DT+21, D_DT+22, D_DT+23, D_DT+24, D_DT+25,

    D_DT+26, D_DT+27, D_DT+28, D_DT+29, D_DT+30,

    D_DT+31)

    Note: the result of this expression is a 16 element array where the effective dates are D_DT, D_DT+2, D_DT+4, etc. and the values are D_DT+1, D_DT+3, D_DT+5, etc.

  4. In the Plan Definition, under Plan Attributes, click the Misc. Parameters ... button. Check the last box on the dialog: Include dates associated with field: and select the field ExtraDates. Since the elements of the array are dates and it is an effective-dated array all dates between D_DT and D_DT+31 will be included as an extra calculation dates.

  5. Now you can run a few test calcs.  Check the Detailed Results for Service (or Salary) Definition Sets - Details (Expanded Dates) to see how your service or salary is working. You have the opportunity to correct coding errors if you see a problem.

  6. Repeat the steps if you want to test another set of dates. You can test all the dates you want to test by defaulting them.  Make sure there's an even number of entries in the #array list.   

  7. After you've run a few calcs that test the dates and you're certain the calc is running correctly, you can remove the field from the Misc. Parameters or remove the testing dates from the field.