Previous Topic: 4.8.3 Prorating to Cost Centers Other Than COSTCTR1

Next Topic: 4.8.5 Implementing Prorating

4.8.4 Prorating From More Than One Data Element


With standard prorating, you can only prorate from one
COSTCTR data element.  If you need to prorate from more than
one cost center element, you can use exit code.  The exit
macros are as follows:

    USRPJRN   Journal file macro
    USRPLGR   Ledger file macro
    USRPEXT   Complex-level external file macro

Code the journal and ledger file macros in:

    prefix.MICS.USER.SOURCE(#ACTEXIT)

Code the complex-level external file macro in:

    sharedprefix.MICS.SOURCE(#ACTEXIT)

The exit macros are taken immediately before the COSTCTRX
variable is input to the prorating format.  COSTCTRX is
assigned from the Prorate From variable, normally COSTCTR1.
You can use the exit to override the COSTCTRX assignment and
create a Prorate From variable based on more than one data
element.

For example, suppose prorating is to be based on the contents
of Cost Center 1 and Cost Center 2.  Use the concatenation of
Cost Center 1 and Cost Center 2 in the Old Value column on
the Prorating Percent Specifications panel (MWF;4;2;3;8).
Then code the USRPxxx macro in #ACTEXIT to assign the
concatenation of Cost Center 1 and Cost Center 2 to the
COSTCTRX variable as follows:

    %MACRO USRPxxx;
     COSTCTRX = COSTCTR1 || COSTCTR2;
    %MEND USRPxxx;

By concatenating cost centers together, it is possible to
have embedded blanks in the resulting COSTCTRX field.  The
Old Value as specified on the Prorating Percent
Specifications panel must reflect the presence of any
embedded blanks.  Otherwise, the value will not match, and
prorating for that cost center combination will not take
effect.