4. CUSTOMIZATION › 4.3 Specifying Rates › 4.3.1 Defining the Rate Table › 4.3.1.3 Defining a Journal File Exit › 4.3.1.3.2 Journal File Exit Examples
4.3.1.3.2 Journal File Exit Examples
The following examples show methods to exclude charges for
certain variables.
Example 1, batch job charges are to be excluded for jobs
cancelled by the operator. These observations are not to be
written to the ACTJBJ Journal File. The JOBWCOST variable
contains the charges for the job and must be set to 0 since
the job is excluded from charging.
/* operator cancels not selected for charging. */
/* NONZERO is set to false. */
IF TERMCODE EQ ' 222' THEN DO;
NONZERO = 0;
JOBWCOST = 0;
END;
Example 2, zero out charges for specific compcode based on
the COSTCTRn value. In this example the charges will be
zero when the compcode is equal to 1500 and when COSTCTR4
has a value of 'XXXXXX'.
/* loop through Journal file compcode segments. */
/* the array name references are maintained by */
/* CA MICS Accounting code prior to the exit invocation. */
/*
IF COSTCTR4 = 'xxxxxx' THEN
DO UIX=1 TO DIM(AJFCPC);
/* FIND COMPCODE TO ZERO OUT ITS CHARGE */
IF AJFCPC(UIX) = '1500' THEN DO;
fffWCOST = SUM(fffWCOST,-AJFCHG(UIX));
/* ZERO OUT THE CHARGE AND QUANTITY */
AJFCHG(UIX) = 0;
AJFQNT(UIX) = 0;
END;
END;
Figure 4-20. Journal File Exits Example