4. CUSTOMIZATION › 4.8 Prorating Charges › 4.8.3 Prorating to Cost Centers Other Than COSTCTR1
4.8.3 Prorating to Cost Centers Other Than COSTCTR1
With standard prorating, you can only change the values of
the COSTCTR1 variable in the prorated records. If you need
to change the values of other cost centers, you can use exit
code. The exit macros are as follows:
USROJRN Journal file macro
USROLGR Ledger file macro
USROEXT 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 invoked immediately prior to the output
of the respective files. Multiple new records with the
prorating percentages applied are made available to the exit
macro.
To use the macro for a particular prorating method, you need
to code all of the cost center values that you wish to change
in the new value field of the prorating parameter. For
example, suppose you wish to prorate 50% of the charges for
journal file records with a COSTCTR1 value of AAA to a record
with a COSTCTR1 value of BBB and a COSTCTR2 value of CCC.
The entry in the prorating parameter would have an old value
field of AAA, a new value field of BBBCCC, and a percent
field of 50. You specify the parameter information by making
entries into the Prorating Menu after you select Option 3;8
from the Installation Accounting Primary Options Menu.
The macro for each method is invoked immediately after
COSTCTR1 has been assigned in the prorated record. The macro
code must use the SAS SUBSTR function on the variable RULE1,
beginning in position 7, to assign the new cost center
values. The first six positions of RULE1 contain the
percent. For example, the journal file macro to support the
prorating situation described above would be coded as
follows:
%MACRO USROJRN;
COSTCTR1 = SUBSTR(RULE1,7,3);
COSTCTR2 = SUBSTR(RULE1,10,3);
%MEND USROJRN;
A temporary variable COSTCTRY, which contains the original
COSTCTR1 value, is available to these exit macros. If you
do NOT want the COSTCTR1 value replaced, you can code the
following in your exit:
COSTCTR1 = COSTCTRY;