How to Add a New Register Rule Algorithm

Warning:

This section is meant for technicians only!

If the register rule algorithms that are supplied with the base package are not sufficient for your rating requirements, you will have to write a new register rule algorithm. This section describes how to do this. After you have followed the steps outlined below, you can then set up the control tables necessary to invoke this algorithm as described under Setting Up Register Rules.

Warning:

Do NOT attempt to set up a new Register algorithm until you have a very good understanding of what your meters measure and how your rates charge for this consumption. In addition, you should completely understand the concepts described in UOM versus TOU versus SQI before creating a new algorithm. In addition, you should completely understand the concepts described in When And How To Manipulate Measured Consumption before creating a new algorithm.

Follow the following steps to define a new Register (register) rule:

  • Assign a two-digit identifier to the register rule. This identifier should begin with an X or Y. For example, you could give your first register rule the identifier X1, the second X2, etc.
  • Create an algorithm type for your new register rule. This algorithm type exists to define the types of parameters supplied to your register rule. Refer to Base Package Register Rules for examples. This algorithm type must be identified by the two-digit identifier allocated above.

    While register rules require an algorithm type, they do NOT require an algorithm. Why? Because you set up a register rule to define the values of the parameters passed to your program (and therefore you don't need an algorithm as algorithms exist to define the values of the parameters passed to a program).

  • Go to Look Up Options and add a new lookup value for the field REG_​RULE_​ALG_​FLG. This should have a Field Value equal to the two-digit identifier allocated above.
    • Write your new program. This program should be named CMPRR 'nn' X - where 'nn' is the same two-digit identifier. When you create the new program, please copy an existing register rule program (their program names are all in the format CIPRR_​_​X. This way you will automatically inherit the copybooks necessary to support the routine.
    Warning:

    Do NOT alter any of the copybooks contained in the linkage section of an algorithm. If you do need extra information for your algorithm you should execute SQL to get the information. If you do alter a linkage section copybook, the upgrade process will be greatly complicated. Note, however, that virtually all information available to the rate application is being passed to the rule algorithms - so it is likely the information you need will be at hand.