       IDENTIFICATION DIVISION.                                         
       PROGRAM-ID.     SCSCA108.                                        
      ***************************************************************** 00030000
      **             SOUTH CAROLINA ELECTRIC & GAS                   ** 00040000
      **                   PRICE WATERHOUSE                          ** 00050000
      **                                                             ** 00060000
      **              CUSTOMER INFORMATION SYSTEM                    ** 00070000
      ***************************************************************** 00080000
      **              P R O G R A M  S U M M A R Y                   ** 00090000
      **                                                             ** 00100000
      ** THIS PROGRAM WAS DERIVED FROM PORTIONS OF PCSCA101          ** 00110000
      **                                                             ** 00120000
      ** SCSCA108 PRICES ALL NON-UTILITY CHARGES (DEPOSITS, DFA'S,   ** 00130000
      ** LPC, ETC).                                                  ** 00140000
      **                                                             ** 00150000
      ** OVERVIEW:   1 - AGE THE MONEY (AND ZERO OUT 0-DAY)          ** 00160000
      **                      2030-AGE-RECEIVABLES                   ** 00170000
      **             2 - PROCESS EACH AR-CNTL RECORD (ADD AMOUNT     ** 00180000
      **                 TO 0-DAY-BUCKETS)                           ** 00190000
      **                      2000-PROCESS-AR-CNTRL AND              ** 00200000
      **                      2100-PROCESS-CURRENT-CHARGES           ** 00210000
      **                      PARAGRAPHS 2120- THROUGH 2200- ARE     ** 00220000
      **                         TO PROCESS EACH PYMT PRIORITY LEVEL ** 00230000
      **             3 - CREATE UTE/UTG AR-CNTL IF NECESSARY (I.E.   ** 00240000
      **                 INITIAL BILL)                               ** 00250000
      **                      1010-CREATE-UTILITY-AR-CNTRL           ** 00260000
      **             4 - APPLY CREDITS (DEP. REFUNDS, CIA, CRED CNTR)** 00270000
      **                      1040-APPLY-NEW-CREDITS                 ** 00280000
      **                        THIS PARAGRAPH CALLS SUBPROGRAMS     ** 00290000
      **                        SCSCA101, SCSCA117 AND SCSCA106      ** 00300000
      **             5 - DETERMINE AMOUNT TO CALCULATE LPC ON        ** 00310000
      **                      2020-COMPUTE-LPC-BASE                  ** 00320000
      **             6 - PROCESS LPC AR-CNTL                         ** 00330000
      **                      1050-APPLY-LPC                         ** 00340000
      **             7 - COMPUTE TOTAL AR BALANCE                    ** 00350000
T21893**   THIS LOGIC WAS MOVED TO SCSCA110.                         ** 00360000
      **             8 - SET CREDIT HISTORY, CREDIT GROUP AND CREDIT ** 00370000
      **                 STATUS                                      ** 00380000
      **             NOTE: PARAGRAPHS 2010-, 2015- AND 2040- ARE     ** 00390000
      **                     USED FOR CANCEL/REBILLS                 ** 00400000
      ***************************************************************** 00410000
      **                                                             ** 00420000
      **              PROGRAM  MODIFICATION  LOG                     ** 00430000
      **                                                             ** 00440000
      **    DATE    INITIALS     REASON                              ** 00450000
      **  -------   --------     ------                              ** 00460000
      **  10/6/94     WTF        INITIAL PROGRAM VERSION             ** 00470000
      **  3/28/95     HC         ADDITIONAL CODE FOR JOURNALING      ** 00480000
      **  6/13/95     FB         TPR 5138 - CONTRACT EARNED INTEREST ** 00490000
      **                         ADDED 2184- PARAGRAPH               ** 00500000
      **  7/27/95     KMG        KMG - FIXED BALANCING ERROR WHEN    ** 00510000
      **                         ACCT HAD UNUSED CREDIT ERROR        ** 00520000
      **  1/23/96     LMB        TPR 2733 - IF ACCT IS WRITTEN OFF,  ** 00530000
      **                         THE CREDIT STATUS IS BAD.           ** 00540000
      **  1/25/96     ELJ        TPR 2233 - ACCOUNTS WITH            ** 00550000
      **                         CT_METER_RATED_IND MARKED AS 'N'    ** 00560000
      **                         SHOULD NOT BE ALLOWED TO DROP THERE ** 00570000
      **                         CREDIT GROUP TO B.                  ** 00580000
      **  3/15/96     MJL        FIELD CASH CHANGES FCSCHG           ** 00590000
KMG1  **  3/25/96     KMG1       MOVED LOGIC TO RELEASE GUARANTOR    ** 00600000
      **  3/26/96     LMB        TPR 3615 - MOVE CORRECT INFO TO     ** 00610000
      **                         POPULATE FIOBE11 FILE.              ** 00620000
      **  4/16/96     PD         CHANGED 8200- TO CHECK FOR NEG VALUE** 00630000
TP3882**  4/24/96     LMB        TPR 3882 - FINAL BILL PROCESSING    ** 00640000
TP3882**                         FOR CONTRACTS.                      ** 00650000
TP3882**  7/30/96     CDS        TPR 3753 - ADD COMPOUND INT CALC TO ** 00660000
      **                         SCSCA101 AND REMOVE INT TABLE FROM  ** 00670000
      **                         SCSCA108.                           ** 00680000
PCR363**  9/05/96     CDS        PCR363- DO NOT BILL PJS ON FINL BILL** 00690000
PCR294**  9/05/96     CDS        PCR294- DO NOT BILL MNTHLY CRED OR  ** 00700000
PCR294**                         CHARGE ON FINAL BILL. ALSO CREATE WQ** 00710000
PCR294**                         FOR SERVICE CARE ON FINAL BILL.     ** 00720000
      **  9/17/96     CSG        TPRS 5428 & 4520 & 5499 & 5513:     ** 00730000
      **                                                             ** 00740000
T5428 **                         TPR 5428 - ADD STMTS TO CORRECTLY   ** 00750000
      **                         UPDATE WS-TOTAL-AR-BALANCE-AR FOR   ** 00760000
      **                         A REBILL (CURRENTLY GETS ZEROED OUT)** 00770000
      **                                                             ** 00780000
T4520 **                         TPR 4520 - REMOVE UNNECESSARY LOGIC ** 00790000
      **                         IN 2184-ADD-ON-INTEREST.            ** 00800000
      **                                                             ** 00810000
T5499 **                         TPR 5499 - PASS PROJECT SHARE       ** 00820000
      **                         WORKING STORAGE TO SCSCA101 & 117.  ** 00830000
PCR305**  9/  /96     CSS        PCR305 MODS- CREATE 105 JRNLS       ** 00840000
      **                         INSTEAD OF 101 TO ACCOMODATE ADDED  ** 00850000
      **                         FIELDS TO CSS_CONTRACT              ** 00860000
PCR072** 10/01/96     PD         PCR072 - REMOVED CIAC CODE.         ** 00870000
PCR072** 10/20/96     ADA        ADD CODE TO DISTRIBUTE CREDIT IN    ** 00880000
PCR072**                         ADVANCE TO CHARGES.                 ** 00890000
PCR212** 10/09/96     CSG        PCR212 - ADD LOGIC TO CALCULATE AN  ** 00900000
      **                         ARREARS ALLOCATION FACTOR FOR ELEC  ** 00910000
      **                         & GAS COMBINATION ACCTS, TO USE NEW ** 00920000
      **                         LPN REVENUE SUMMARY GL ACCT NO, AND ** 00930000
      **                         TO ALLOCATE LPC CHARGES FOR         ** 00940000
      **                         COMBINATION ACCOUNTS.               ** 00950000
      ** 11/04/96     CSG        TPRS 5633, 5679, 5605, 5615, & 5512 ** 00960000
T5679 **                         TPR 5679 - ADD LPC CHARGE TO BI-TOT-** 00970000
      **                         OTHER-CHARGES.                      ** 00980000
T5633 **                         TPR 5633 - CHG LOGIC FOR CREDIT     ** 00990000
      **                         GROUP 'A' ACCTS TO BE CHG'D TO GROUP** 01000000
      **                         'B' WHEN THEY HAVE MORE THAN 1 DISC ** 01010000
      **                         NOTICE IN THE LAST 6 MONTHS.        ** 01020000
      ** 11/12/96     CSG        TPRS 5832 & 5846.                   ** 01030000
T5832 **                         TPR 5832 - CHANGE CODE THAT SETS    ** 01040000
      **                         PJS TO INACTIVE IF IT'S DELINQUENT  ** 01050000
      **                         OVER 30 DAYS TO OVER 60 DAYS.       ** 01060000
T5846 **                         TPR 5846 - INCLUDE ONETIME PROJECT  ** 01070000
      **                         SHARE CONTRIBUTIONS IN TOTAL-AR.    ** 01080000
T5679 ** 11/20/96     CSG        TPR 5679.  ADD JOURNALING FOR LPC   ** 01090000
      **                         ON A CANCEL/REBILL.                 ** 01100000
T7988 **                         TPR 7988.  CHANGE VALUE ASSIGNED    ** 01110000
      **                         TO MI-CHG-COLUMN-VALUE-TEXT IN PARA ** 01120000
      **                         3300-REMOVE-SECURITY.               ** 01130000
T8203 ** 12/16/96     CSG        TPR 8203.  CHANGE THE CREDIT GL     ** 01140000
      **                         ACCOUNT NUMBER FOR A DEPOSIT.  IT   ** 01150000
      **                         IS CURRENTLY THE SAME AS THE DEBIT  ** 01160000
      **                         GL ACCOUNT NUMBER.                  ** 01170000
T8121 ** 12/19/96     CSG        TPR 8121.  ADD LOGIC TO USE THE     ** 01180000
      **                         DATE_CONTRACT IF THE STATUS CHG DATE** 01190000
      **                         HAS LOW VALUES FOR THE ADD INTEREST.** 01200000
T8447 ** 01/16/97     CSG        TPR 8447.  CHECK UNUSED-CR-FL NOT   ** 01210000
      **                         'Y' INSTEAD OF = 'N' WHEN CREATING  ** 01220000
      **                         THE PJS JOURNALS.                   ** 01230000
T8548 ** 01/22/97     CSG        TPR 8548.  BACKOUT THE CHANGES FOR  ** 01240000
      **                         TPR 8203.  THE SCREENS JOURNAL THE  ** 01250000
      **                         ENTIRE DEPOSIT.  BILLING JUST SHOWS ** 01260000
      **                         FOR RECORDS ONLY JOURNALS.          ** 01270000
T8620 ** 01/25/97     CSG        TPR 8620.  INITIALIZE THE 101       ** 01280000
      **                         JOURNAL FIELDS BEFORE A NEW ONE IS  ** 01290000
      **                         CREATED.                            ** 01300000
T8560 ** 01/27/97     CSG        TPR 8560.  EXECUTE CIA CODE IF THE  ** 01310000
      **                         ACCOUNT ONLY HAS A GAS UTILITY.     ** 01320000
T8560 ** 01/31/97     ADA        TPR 8560.  FIX TO CORRECT TPR 8560  ** 01330000
      **                         FOR GAS UTILITY ONLY ON AN ACCOUNT. ** 01340000
T7970 ** 01/31/97     FW         TPR 7970. BE11 IS BEING CHANGED TO A * 01350000
      **                         VSAM FILE AND NEEDED CHANGING.      ** 01360000
TP9134** 02/04/97     ADA        TPR 9134. ADDED MOVE FOR THE UPDATE  * 01370000
TP9134**                         ACTION IND WHEN CREATING LPC AR_CNTL.* 01380000
T8804 ** 02/06/97     CSG        TPR 8804. REMOVED SPECIAL PROCESSING * 01390000
      **                         FOR DPP ACCOUNTS IN PARAGRAPH 5003-. * 01400000
      **                         THIS WAS CAUSING THE TOTAL DPP       * 01410000
      **                         BALANCE TO BE ADDED INTO THE TOTAL   * 01420000
      **                         ACCOUNT BALANCE AND TOTAL ARREARS.   * 01430000
T8902 ** 02/18/97     CSG        TPR 8902. CHANGED CODE COMPLIANCE    * 01440000
      **                         HISTORY VALUES FROM 'A' AND 'B' TO   * 01450000
      **                         'Y' AND 'N'.                         * 01460000
T8736 **                         TPR 8736. REDUCE TRAN BALANCE WHEN   * 01470000
      **                         CIA IS APPLIED.                      * 01480000
T8568 **                         TPR 8568. MOVE THE DEP. REFUND AND   * 01490000
      **                         CRED. CONTRACT LOGIC TO AFTER AGING. * 01500000
T8921 ** 02/25/97     CSG        TPR 8921. CORRECTED LOGIC TO ADD THE * 01510000
      **                         DPP AMOUNT BEFORE CALCULATING THE    * 01520000
      **                         LPC.                                 * 01530000
T8556 **                         TPR 8556. ADD TOTAL SUMM UNBILLED TO * 01540000
      **                         ZERO DAY AND JOURNAL.                * 01550000
T9216 ** 03/03/97     MED        SUBTRACT THE MONTHLY DFA AMOUNT FROM * 01560000
      **                         THE UNBILLED BALANCE FOR PCSCA154.   * 01570000
      **                                                              * 01580000
      ** 03/04/97     CSG        TPRS 9560 AND 5466.                  * 01590000
T9560 **                         INITIALIZE THE 105 JOURNAL RECORD    * 01600000
      **                         BEFORE WRITING TO IT. TPR 9560       * 01610000
T5466 **                         CREATE AN AR RECORD IF THE ACCT HAS  * 01620000
      **                         GAS AND AN UNMETERED ELEC (OR VICE   * 01630000
      **                         VERSA).  TPR 5466                    * 01640000
      ** 03/10/97     CSG        TPRS 9633 AND                        * 01650000
T9633 **                         MOVE GL CREDIT NO. FOR NSF/NSA/NSN   * 01660000
      **                         WHEN APPLYING CIA.                   * 01670000
CG0310**                         ONLY INCLUDE THE 90-90 ROW FOR DPP   * 01680000
      **                         WHEN CALCULATING LPC.                * 01690000
PCR470**                         MOVE SETTING THE CIA AMOUNT AFTER    * 01700000
      **                         PROCESSING EACH AR-CNTL RECORD.      * 01710000
CG0311**                         THE AMT POSTED SHOULD BE POSITIVE    * 01720000
      **                         WHEN CREATING THE JOURNALS FOR CIA.  * 01730000
T9627 **                         MOVE THE LPC/LPN LOGIC AFTER THE     * 01740000
      **                         LOGIC THAT APPLIES CREDITS.          * 01750000
CG0325** 03/25/97     CSG        REMOVE THE LPC FIELDS FROM GETTING   * 01760000
      **                         MODFIED IN 1010- SINCE 2101- IS AFTER* 01770000
      **                         THIS AND DOES THE MODIFICATION.      * 01780000
T9791 ** 03/28/97     CSG        SET ALL FLAGS TO 'N' WHEN ENTERING   * 01790000
      **                         THE MODULE.                          * 01800000
      ** 03/31/97     CSG        TPRS 9463 AND 9919 AND 9941 AND 9932.* 01810000
T9463 **                         INCLUDE THE DPP ARREARS WHEN         * 01820000
      **                         COMPUTING THE LPC-ALLOC.             * 01830000
T9919 **                         DIVIDE THE CONTRACT INTEREST BY 100  * 01840000
      **                         BEFORE USING TO UPDATE THE TRAN BAL. * 01850000
T9941 **                         CORRECT THE DETAIL END AR BAL WHEN   * 01860000
      **                         SPLITTING THE LPC CHARGE.            * 01870000
T9932 **                         OVERLAY EXCEP CRED HIST WITH A 1 WHEN* 01880000
      **                         A BILL IMMEDIATE DEPOSIT.            * 01890000
      ** 04/03/97     CSG        TPRS 10051 AND 9648.                 * 01900000
T10051**                         SET THE UPDATE FLAG FOR THE DFA_ACCT * 01910000
      **                         TABLE WHEN CHANGING THE COMPLY HIST. * 01920000
T9648 **                         WHEN MOVING A NUMBER TO RCNTLY BLLD  * 01930000
      **                         FIELD ON THE DFA_ACCT TABLE, USE A   * 01940000
      **                         NUMERIC FIELD.                       * 01950000
CG0318** 03/18/97     CSG        ADD CALL TO NEW PROGRAM - SCSCA106 - * 01960000
      **                         WHICH USES CPD00010 TO APPLY CIA.    * 01970000
      **                         REMOVE UNNECESSARY CIA LOGIC.        * 01980000
      ** 04/08/97     CSG        TPRS 10082 AND 10211 AND 10439.      * 01990000
T10082**                         ADD LINKAGE FOR CALL TO SCSCA112.    * 02000000
T10211**                         ADD 1 TO THE MONTH BILLED COUNTER TO * 02010000
      **                         COUNT THIS CURRENT BILL.             * 02020000
      **                         DON'T UPDATE THE COMPLIANCE HIST IF  * 02030000
      **                         THIS IS THE FIRST TIME BILLING.      * 02040000
T10439**                         MOVE WHERE THE LPC CREATED FLAG IS   * 02050000
      **                         SET TO 3000- INSTEAD OF 3010- (IF AN * 02060000
      **                         ACCOUNT NEVER CALLS 3010-, THE FLAG  * 02070000
      **                         ISN'T RESET - I.E. NEW ACCOUNTS).    * 02080000
T10457** 04/17/97     CSG        MAKE SURE THE MONTHS TO EVALUATE     * 02090000
      **                         DOESN'T EXCEED 24.                   * 02100000
T10450** 04/18/97     CSG        INCLUDE EARNEST PAYMENTS IN THE TOTAL* 02110000
      **                         AR BALANCE.                          * 02120000
      ** 04/22/97     CSG        TPRS 10533 AND 10566 AND 10577.      * 02130000
T10533**                         REMOVE COMPUTATION OF TOT-OTHER-CHRGS* 02140000
      **                         AND TOTAL-ARREARS.  THIS WAS PUT INTO* 02150000
      **                         SCSCA113.                            * 02160000
T10566**                         INITIALIZE THE WORKING STORAGE FIELD * 02170000
      **                         BEFORE SETTING COMPLIANCE HISTORY.   * 02180000
T10577**                         USE THE SAME COMPLIANCE LOGIC FOR    * 02190000
      **                         DPP AS DFA COMPLIANCE LOGIC.         * 02200000
T10607** 04/24/97     CSG        DON'T USE MONTHS-2-EVALUATE TO       * 02210000
      **                         DETERMINE THE CREDIT STATUS.         * 02220000
T10602** 04/28/97     CSG        INCLUDE DEP AMOUNT IN TOTAL-AR-BAL   * 02230000
      **                         DURING A CANCEL/REBILL.              * 02240000
T10667** 04/29/97     CSG        ADD SUMMARY ROWS TO THE AR-CNTL WS   * 02250000
      **                         TABLE BEFORE APPLYING CREDITS USING  * 02260000
      **                         CPD00010 AND THEN REMOVE THEM FROM   * 02270000
      **                         THE TABLE IMMEDIATELY AFTERWARD.     * 02280000
      ** 04/29/97     CSG        TPRS 10550, 10549 AND 10503.         * 02290000
T10550**                         POPULATE WS-UTE-NEW-ACCUM FOR NEW    * 02300000
      **                         ACCOUNTS (INITIAL BILL).             * 02310000
T10549**                         POPULATE WS-DEP-NEW-ACCUM AND        * 02320000
      **                         WS-DEP-BAL-ACCUM CORRECTLY.          * 02330000
T10503**                         RESET VALUES ON NONUTIL ACCUMS.      * 02340000
      ** 05/01/97     CSG        TPRS 10672 AND 10783.                * 02350000
T10672**                         DO NOT ASSESS LPC ON FINAL BILLS.    * 02360000
T10783**                         REMOVE DETAIL END AR BAL ON THE LPC. * 02370000
      **                         THIS WILL REMOVE TPR 9941.           * 02380000
      ** 05/03/97     CSG        TPRS 10673 AND 10840.                * 02390000
T10673**                         DO NOT MOVE CREDIT HISTORY ON FINAL  * 02400000
      **                         FILLS OR LPC ONLY BILLS.             * 02410000
T10840**                         WHEN COMPUTING MONTHS BILLED, SUBTR. * 02420000
      **                         1ST AND 2ND EARNEST AMOUNTS FROM THE * 02430000
      **                         ORIG BALANCE FIRST.                  * 02440000
      ** 05/06/97     CSG        TPRS 10894 AND 10910.                * 02450000
T10894**                         IF LPC IS MOVED FROM UNBILLED TO 0DAY* 02460000
      **                         CHECK THE OTHER AR TYPES BEFORE      * 02470000
      **                         JOURNALLING.                         * 02480000
T10910**                         DON'T MOVE CREDIT HISTORY ON CANCEL/ * 02490000
      **                         REBILLS.                             * 02500000
T10933** 05/07/97     CSG        IF JOURNALLING THE UNBILLED-TO-0DAY  * 02510000
      **                         THE ENTRY SHOULD BE A WASH.          * 02520000
      ** 05/07/97     CSG        TPRS 10953 AND 10985.                * 02530000
T10953**                         EPP WITH A CREDIT BALANCE AT ANNIV.  * 02540000
      **                         SHOULD NOT GENERATE A WQ WHEN THE    * 02550000
      **                         0 DAY BUCKET IS SET TO 0.            * 02560000
T10985**                         DON'T REBILL 'BILL IMMEDIATE'        * 02570000
      **                         DEPOSITS WHEN THE ACCT IS ON-CYCLE.  * 02580000
T11016** 05/09/97     CSG        ONLY LOOK AT DPP ARREARS WHEN        * 02590000
      **                         DETERMINING COMPLIANCE.              * 02600000
T11078** 05/12/97     CSG        MOVE PART OF THE UPDATE OF EPP-OFFER-* 02610000
      **                         AMT FROM 112 TO INCLUDE ALL 0-DAY    * 02620000
      **                         BUCKETS.                             * 02630000
T11123** 05/13/97     CSG        REDEFINE WS-MONTHLY-REMAINDER SO IT  * 02640000
      **                         HAS NO DECIMAL PLACES.               * 02650000
T11185** 05/15/97     CSG        UPDATE THE COMPLIANCE FIELD AS:      * 02660000
      **                         'N' IF THERE'S 30-DAY DFA/DPP ARREARS* 02670000
      **                         'Y' IF NO 30-DAY AND BILLING 0-DAY   * 02680000
      **                         (WS-DPP-AMOUNT-DELINQ WILL ONLY HOLD * 02690000
      **                             30-DAY ARREARS)                  * 02700000
      **                         {REMOVE T11016 LOGIC}                * 02710000
PCR393** 05/28/97     MAD        MODIFICATIONS TO PROPERLY UPDATE     * 02720000
      **                         UTILITY AND NON-UTILITY ARREARS HIST * 02730000
      **                         ON CSS_CREDIT_PROFILE.  UTILITY ACCTS* 02740000
      **                         WILL NO LONGER USE NON-UTILITY       * 02750000
      **                         ARREARS HISTORY.  ALL NON-UTILITY    * 02760000
      **                         ARREARS ON UTILITY ACCTS WILL BE     * 02770000
      **                         REFLECTED IN UTILITY ARREARS.        * 02780000
      ** 06/05/97     CSG        TPRS 11460 AND 11544.                * 02790000
T11460**                         USE THE LS-INPUT-DATE TO POPULATE THE* 02800000
      **                         JOURNAL RECORDS INSTEAD OF THE DATE- * 02810000
      **                         BILLED-BI (NEEDED FOR ACCOUNTS THAT  * 02820000
      **                         DON'T GO THROUGH SCSCA105 - MASTERS  * 02830000
      **                             AND NON-UTILS)                   * 02840000
T11544**                         WHEN REMOVING PJS, DON'T SUBTRACT 00 * 02850000
      **                         DAY FROM THE TOT-YTD-AM-PJ (THE LOGIC* 02860000
      **                         TO ADD TO THIS FIELD WAS MOVED FROM  * 02870000
      **                         SCSCA113 TO CPD00010)                * 02880000
PCR393**                         TREAT EPP ACCOUNTS THE SAME AS UTL   * 02890000
      **                         ACCOUNTS.                            * 02900000
      ** 06/11/97     CSG        TPRS 11600 AND 11624 AND 11651       * 02910000
T11600**                         ONLY PERFORM 3210- AGAIN IF THE      * 02920000
      **                         RELOAD SWITCH IS SET.                * 02930000
T11624**                         BACKOUT PJS ACCUM FIELDS WHEN THE    * 02940000
      **                         ACCOUNT DROPS PJS FOR NON-PAY.       * 02950000
T11651**                         DROP PJS WHEN IT'S MOVED TO 60 DAY   * 02960000
      **                         BUCKET, NOT 90 DAY (THIS IS A BACKOUT* 02970000
      **                         OF TPR 5832).                        * 02980000
PCR530** 06/18/97     CSG        CORRECT THE ADD-ON INTEREST CALC.    * 02990000
T11825** 06/26/97     CSG        INACTIVATE PJS IF OVER 60 DAYS BEFORE* 03000000
      **                         CREDITS ARE APPLIED (SO PJS ISN'T    * 03010000
      **                         CHARGED 0 DAY & JRNLED AND THEN      * 03020000
      **                         BACKED OUT IF NO CREDITS ARE APPLIED)* 03030000
PCR548** 07/03/97     CSG        USE MAX AMT IF THE CNT STATUS WAS SET* 03040000
      **                         TO 'CLOSED' (AMT-MO-PYMT IS 99999.99)* 03050000
      ** 07/08/97     CSG        TPRS 10791, 11966, 11910 AND 12012.  * 03060000
T10791**                         CONSOLIDATED BILLING CHGS: USE THE   * 03070000
      **                         DB2 TABLE INSTEAD OF THE BE11 FILE.  * 03080000
T11966**                         DO NOT UPDATE THE MO PYMT FIELD ON   * 03090000
      **                         THE DFA TABLE IF THE LAST PYMT IS    * 03100000
      **                         LESS.                                * 03110000
T11910**                         UPDATE CODES-DATA-PRESENT WHEN THE   * 03120000
      **                         LAST GUARANTEED ACCT DROPS.          * 03130000
T12012**                         CREATE A CIA WITH UNUSED-CR ON UTE   * 03140000
      **                         AND UTG (ANNUAL MIN. CONTRACTS).     * 03150000
      ** 07/18/97     CSG        TPR 12034 AND NONUTL CHANGES.        * 03160000
T12034**                         UPDATE NON UTIL DELINQ FIELDS FOR    * 03170000
      **                         CONTRACTS.                           * 03180000
NONUTL**                         BACKOUT PCR393 CHANGES.              * 03190000
T12224** 07/21/97     CSG        CORRECT THE NUMBER OF DAYS           * 03200000
      **                         CALCULATION ON CONTRACT INTEREST.    * 03210000
T12245** 07/22/97     CSG        WS-*-BAL-ACCUM FIELDS SHOULD BE THE  * 03220000
      **                         UNBILLED BAL (TRAN BAL - 0/30/60/90).* 03230000
      ** 07/24/97     CSG        TPRS 12148 AND 11925.                * 03240000
T12148**                         DON'T REJOURNAL THE RECEIVABLES ON   * 03250000
      **                         A REBILL.                            * 03260000
T11925**                         INCREASE ITEM ID.                    * 03270000
T12334** 07/29/97     CSG        UPDATE TOT-NEW-CHARGES FOR A ONE TIME* 03280000
      **                         CONTRACT.                            * 03290000
      ** 07/30/97     CSG        TPR 12440 AND 12329.                 * 03300000
T12440**                         CORRECT ROUNDING ERROR FOR CONTRACT  * 03310000
      **                         INTEREST.                            * 03320000
T12329**                         UPDATE CONTRACT COMPLIANCE HISTORY.  * 03330000
T12331** 07/31/97     CSG        CHANGE THE LOGIC TO POPULATE THE     * 03340000
      **                         DELINQ FIELDS.                       * 03350000
T12593** 08/06/97     CSG        MOVE 00-DAY TO BILL AMT FOR CONTRACTS* 03360000
      **                         THAT HAVE 99999.99 IN THE MO-PYMT.   * 03370000
      ** 08/07/97     CSG        TPRS 12173 AND 12602.                * 03380000
T12173**                         MOVE VALUE TO UTE/UTG 0-DAY UNLESS   * 03390000
      **                         THERE WAS A BACKOUT AMT DURING A C/R.* 03400000
T12602**                         CREATE AR-CNTL ON DEADHEAD ACCTS IF  * 03410000
      **                         IT DOESN'T EXIST.                    * 03420000
T12651** 08/11/97     CSG        USE FINAL-INSTALLMENT LOGIC FOR ACCTS* 03430000
      **                         THAT ARE FINAL BILLING (INTRST CALC).* 03440000
CSG811** 08/11/97     CSG        DO NOT SET THE 6 MONTHS GOOD CREDIT  * 03450000
      **                         FLAG IF THERE IS NO DEPOSIT ON HAND. * 03460000
T12728** 08/13/97     CSG        WHEN DELETING THE AR SUMMARY ROWS,   * 03470000
      **                         MAKE SURE THE ITEM ID IS 0.          * 03480000
T12774** 08/15/97     CSG        DO NOT ASSESS LPC ON ON-CYCLE MSTRS. * 03490000
CSG818** 08/18/97     CSG        CORRECT THE DATES USED TO DETERMINE  * 03500000
      **                         NUMBER OF DAYS ON CONTRACTS IF THE   * 03510000
      **                         CNT IS CLOSED OR CANCELLED.          * 03520000
T12845** 08/19/97     CSG        DO NOT CREATE A CIA ON SUB ACCOUNTS. * 03530000
      ** 08/20/97     CSG        T12835 AND T12846 AND T12856         * 03540000
T12835**                         UPDATE THE ENDING RECEIVABLE BAL ON  * 03550000
      **                         UNEARNED INTEREST JOURNALS.          * 03560000
T12846**                         CONTRACT COMPLIANCE SHOULD BE TREATED* 03570000
      **                         LIKE ARREARS HIST (DO NOT UPDATE ON  * 03580000
      **                         FINAL BILLS).                        * 03590000
T12856**                         UPDATE MASTER ARREARS HIST BASED ON  * 03600000
      **                         IF AN LPC/LPN EXISTS OR NOT.         * 03610000
T12850** 08/21/97     CSG        DON'T CHECK FLAG WHEN AGING NSC,     * 03620000
      **                         CHECK IT WHEN DECIDING WHETHER TO    * 03630000
      **                         INCLUDE IT IN THE LPN CALCULATION.   * 03640000
T12900** 08/21/97     CSG        ONLY MOVE UNUSED CREDIT TO CIA IF    * 03650000
      **                         THE ACCOUNT IS ANNUAL MINIMUM.       * 03660000
      **                         **ALSO, SWAPPED THE ORDER SO WE MOVE * 03670000
      **                         **SUMM UNBILLED BEFORE APPLYING      * 03680000
      **                         **UNUSED CREDIT.                     * 03690000
T13029** 09/17/97     CSG        CORRECT THE LOGIC WHEN REMOVING A    * 03700000
      **                         GUARANTOR SO THE BE21 FIELDS ARE     * 03710000
      **                         FILLED CORRECTLY.                    * 03720000
T13130** 09/19/97     CSG        ADDED NEW FIELDS TO BE21.            * 03730000
      ** 09/24/97     CSG        TPRS 12600, 13155.                   * 03740000
T12600**                          MOVE AN 'A' TO AR-AGE FOR EPP JRNLS * 03750000
      **                          THAT MOVE SUM-UNBILLED TO 0-DAY     * 03760000
      **                          (THIS IS NECESSARY FOR BILL PRINT)  * 03770000
T13155**                          CHANGE 'BATCH' TO 'SYSTEM' ON THE   * 03780000
      **                          BE21 FILE.                          * 03790000
T13274** 10/08/97     CSG        CORRECTED PJS LOGIC TO ALLOW AN      * 03800000
      **                         INACTIVE PJS TO RUN THROUGH BILLING  * 03810000
      **                         AND JUST NOT CHARGE ANY 0-DAY        * 03820000
      **                         (THIS IS DIFFERENT THAN THE PJS DROP)* 03830000
T13597** 11/11/97     CSG        CLOSED MONTHLY CONTRACT SHOULDN'T    * 03840000
      **                         BILL (AMT MO PYMT IS 99999.99)       * 03850000
T13738** 11/12/97     CSG        DO NOT UPDATE AMT MO PYMT FOR CNTS   * 03860000
      **                         WHEN THE MAX AMT TO BILL IS 0.       * 03870000
T13536** 11/13/97     CSG        INCREASE SIZE OF WK03 HOLD AREA.     * 03880000
T13862** 11/21/97     CSG        ADD LPC/LPN CHARGES TO 0-DAY (IF     * 03890000
      **                         THERE WAS SUM UNBILLED CHARGES, THEY * 03900000
      **                         HAVE ALREADY BEEN MOVED TO 0-DAY).   * 03910000
T13975** 12/04/97     CSG        FOR MASTER ACCOUNTS UPDATE THE NON   * 03920000
      **                         UTIL ARREARS CREDIT HISTORY, NOT UTIL* 03930000
      **                         ARREARS CREDIT HISTORY.              * 03940000
      **                                                              * 03950000
T13990** 12/08/97     PD         SUMM UNBILLED LPC IS ADDED UP AND    * 03960000
T13990**                         WHEN REGULAR LPC IS CALULATED AND    * 03970000
T13990**                         ADDED TO                             * 03980000
T13990**                         WS-LPC-UTIL-ELIG-AFT-BILL-CALC       * 03990000
T13990**                         THE SUM OF UNBILLED LPC IS SUBTRACTED* 04000000
T13989** 12/08/97     PD         ADD NSA/NSF/NSC IN THE JOURNALLING   * 04010000
T13989**                         LOGIC IN 5300-.                      * 04020000
T13989**                         RCC SUMM UNBILLED IS SUBTRACTED      * 04030000
T13989**                         FROM 0 DAY CALCUALTION FOR REGULAR   * 04040000
T13989**                         RCC BILLING IN 2140- .               * 04050000
      ** 12/09/97     CSG        TPRS 14005 AND 14034.                * 04060000
T14005**                         MONTHS TO EVALUATE SHOULDN'T AFFECT  * 04070000
      **                         THE CREDIT STATUS (DON'T JUMP OUT OF * 04080000
      **                         PARAGRAPH IF MONTHS TO EVAL = 0).    * 04090000
T14034**                         REGULAR LPC JOURNAL SHOULD USE LPC   * 04100000
      **                         GL NUMBER (REMOVE SPECIAL LOGIC IN   * 04110000
      **                         5300- FOR CIA -- CIA JOURNALS ARE    * 04120000
      **                         CREATED IN SCSCA106 NOW).            * 04130000
CWSCHG** 01/05/98     CSG     CHANGE CWS10000 AND CWS10001 TO        ** 04140000
      **                      CWS1000A/CWS1000B AND CWS1001A/CWS1001B** 04150000
      ** 01/05/98     CSG     TPRS 12327 AND 13994                   ** 04160000
T12327**                      THE AGE ON CONTRACT JOURNALS SHOULD BE ** 04170000
      **                      BLANK (CURRENTLY IS SET TO '0').       ** 04180000
T13994**                      DELETE THE DPP WQ THAT STATES:         ** 04190000
      **                      'UNBILLED BAL REMAINS ON DPP'.         ** 04200000
T12629**                      FOR LPC/LPN JRNLS, DETAIL END AND      ** 04210000
      **                      DETAIL END AR FIELDS SHOULD BE 0.      ** 04220000
T14446** 01/21/98     CSG     CORRECT CANCEL/REBILL LOGIC - NOT      ** 04230000
      **                      WORKING FOR C/R ON $0 BILL.            ** 04240000
T14586** 01/29/98     CSG     DO NOT CHECK FOR AN EXISTING CCC ROW   ** 04250000
      **                      AFTER THE CREDIT PROCESS.              ** 04260000
T14658** 02/05/98     GAC     ADDED A SEARCH IN 5310 TO SET CONTRACT ** 04270000
      **                      DETAIL INDEX                           ** 04280000
T15026** 02/23/98     GAC     FOR CANCEL/REBILL FUTURE AND RELEASE   ** 04290000
      **                      BILLS, AGE THE AR DATES.               ** 04300000
T14861** 02/24/98     GAC     FOR CANCEL/REBILL, AGE THE BUCKETS     ** 04310000
      **                      BEFORE ADDING IN THE REBILL.           ** 04320000
PCR614** 03/05/98     GAC     CREDIT BALANCE FROM A CANCEL/REBILL    ** 04330000
      **                      SHOULD BE APPLIED TO A CIA ROW, NOT TO ** 04340000
      **                      THE UTE OR UTG UNUSED-CREDIT.          ** 04350000
T15231** 03/17/98     GAC     IF ARREARS AMNT IS SO SMALL THAT LPC ON** 04360000
      **                      IT IS ZERO, DON'T JOURNAL THE ZERO OR  ** 04370000
      **                      WRITE IT TO AR TRANS HISTORY DET.      ** 04380000
      ** 03/18/98     CSG     TPRS 15304 AND 15456 AND 15472         ** 04390000
T15304**                      CORRECT C/R LOGIC FOR EPP ACCOUNTS     ** 04400000
T15456**                      CALC LPC ON DPP REMAINING AMT NOT      ** 04410000
      **                      ORIGINAL AMT.                          ** 04420000
T15472**                      TREAT A CREATE C/R LIKE A REGULAR C/R: ** 04430000
      **                      USE ADJ-REASON ALONG WITH DATE-ORIG.   ** 04440000
T15484** 03/23/98     GAC     WHEN CHECKING TO SEE NUM MONTHS SINCE  ** 04450000
      **                      CREDIT GROUP WAS CHANGED, ALWAYS ROUND ** 04460000
      **                      UP.                                    ** 04470000
T15554** 03/23/98     GAC     IN 2181, SET WS-FINAL-INSTALLMENT-SW   ** 04480000
      **                      ONLY IF NOT AN INSTALLMENT CONTRACT    ** 04490000
      **                      (I.E., IT'S A MONTHLY CONTRACT, ETC.). ** 04500000
T?????** 03/26/98     GAC     IN 5205, ADJUSTED SETTING OF           ** 04510000
      **                      WS-101-AR-AGE.                         ** 04520000
T15701** 04/03/98     GAC     FOR CNT, DEP AND DFA, CALCULATION OF   ** 04530000
      **                      MAX AMT TO BILL SHOULD INCLUDE TOT SUM ** 04540000
      **                      UNBILLED.                              ** 04550000
T15797** 04/06/98     CSG     USE WS-MST-SUB-ACCT-IND-AT TO IDENTIFY ** 04560000
      **                      MASTER ACCTS INSTEAD OF WS-MASTER-ACCT ** 04570000
T14478** 04/27/98     GAC     CREDIT LPC WHEN THE CANCEL/REBILL IS   ** 04580000
      **                      FOR LESS MONEY.                        ** 04590000
T16162** 04/29/98     GAC     MASTER ACCOUNT SHOULD USE NON UTIL     ** 04600000
      **                      ARREARS AND EXCEPTIONAL HISTORY.       ** 04610000
T16142** 04/29/98     GAC     ALTERED CONDITIONAL WHEN CHECKING THE  ** 04620000
      **                      NUMBER OF MONTHS IN A CONTRACT.        ** 04630000
GAC123** 04/29/98     GAC     IN 3010-, IF LPC ROW IS BEING DELETED  ** 04640000
      **                      DUE TO CREDIT APPLIED, BUT THEN IS     ** 04650000
      **                      ADDED AGAIN WHEN NEW LPC IS CALC'D,    ** 04660000
      **                      CHANGE UPDATE-ACTION-IND FROM DELETE TO** 04670000
      **                      UPDATE.                                ** 04680000
T16185** 04/29/98     GAC     IN 5300, SET WASH GL FOR LPN JUST LIKE ** 04690000
      **                      FOR LPC.                               ** 04700000
T16366** 05/13/98     GAC     INITIALIZE 2 FLAGS ADDED FOR TPR14478. ** 04710000
T16332** 05/14/98     GAC     WHEN LOADING THE REBILL ARRAY FOR A    ** 04720000
      **                      CANCEL/REBILL OF UNMETERED, SET THE    ** 04730000
      **                      PROPER SERVICE TYPE FROM THE CUST PLAN.** 04740000
T16373** 05/14/98     GAC     USE 2 DIFFERENT AR HOLD INDEXES FOR    ** 04750000
      **                      PROCESSING A CANCEL/REBILL AND CREATING** 04760000
      **                      A CIA.                                 ** 04770000
T15952** 5/20/98      SJM     CREDIT GROUP SHOULD HAVE CHANGED FROM  ** 04780000
      **                      'C' TO 'A' AND DID NOT                 ** 04790000
T15892** 5/20/98      SJM     GUARANTORS NOT BEING RELEASED AND      ** 04800000
      **                      SHOULD BE                              ** 04810000
T16306** 5/20/98      SJM     COMMENT OUT 3 CONSECUTIVE ARREARS LOGIC** 04820000
T15481** 5/20/98      SJM     GUARANTORS REALEASED FOR GOOD CREDIT   ** 04830000
      **                      SHOULD UPDATE TIMESTAMP AND STATUS     ** 04840000
      **                      REASON                                 ** 04850000
T16648** 6/02/98      CSG     MOVE CODES DATA PRESENT AFTER SETTING  ** 04860000
      **                      VALUE IN 1010- FOR CIA APPLICATION TO  ** 04870000
      **                      USE NEW VALUES.                        ** 04880000
T16972** 7/01/98      GAC     CHANGED INDEX SIZE FOR CANCEL/REBILL   ** 04890000
      **                      ARRAY FROM 12 TO 48.                   ** 04900000
T17123** 7/22/98      AMG     CHANGED 1001 SO THAT WS-AR-HOLD-INDX   ** 04910000
T17123**                      IS ALSO SET TO 1.                      ** 04920000
T16974** 7/22/98      RAH     REBILLS DO NOT REQUIRE AN ACTIVE CUST  ** 04930000
T16974**                      PLAN.  ONE JUST NEEDS TO BE PRESENT.   ** 04940000
T17189** 7/28/98      JYL     CHANGE FOR TPR17189.  ONLY GO THROUGH  ** 04950000
T17189**                      LPC LOGIC IF ACCOUNT IS NOT A MASTER   ** 04960000
T17189**                      ACCOUNT.  ALL LPC PROCESSING FOR MASTER** 04970000
T17189**                      ACCOUNTS SHOULD BE DONE IN PCSCA130.   ** 04980000
T17275** 9/1/98       GAC     INITIALIZE WS-HAS-GUARANTOR-SW         ** 04990000
      **                      SO VALUE FROM PREV ACCT DOESN'T REMAIN.** 05000000
T17541** 9/02/98      RAH     GO TO DB2 FOR UNMETERED SERVICE TYPE   ** 05010000
T17541**                      WHEN NECESSARY.                        ** 05020000
T16786** 9/04/98      JYL     MODIFIED PARA-1040 TO PROCESS CIA      ** 05030000
T16786**                      CORRECTLY WHEN THERE IS BOTH CIA-CASH  ** 05040000
T16786**                      AND CIA-LIHEAP PRESENT.                ** 05050000
T17699*  9/10/98      MDJ     ADDED WS-CONNECT-CHRG-CC TO PROCEDURE  ** 05060000
T17699*                       USING STATEMENT INORDER TO USE WORKING ** 05070000
T17699*                       STORAGE  IN SCSCA101.                  ** 05080000
T17604*  9/18/98      KLP     ONLY ACTIVE ACCOUNTS - NO FINAL BILLS -** 05090000
T17604*                       ARE TO GO THROUGH THE CHANGE CREDIT    ** 05100000
T17604*                       GROUP LOGIC                            ** 05110000
T17777*  9/23/98      JYL     CHANGED EPP LOGIC TO CALL SCSCA106 IF -** 05120000
T17777*                       THERE IS CIA ON THE ACCOUNT BEFORE     ** 05130000
T17777*                       CALLING SCSCA112.                      ** 05140000
T18038*  10/2/98      JYL     ADD MOVE CODES-DATA-PRESENT LOGIC AFTER** 05150000
T18038*                       CALLING SCSCA106 (PARA2055-).          ** 05160000
T18111*  10/9/98      JYL     CHANGED 2131- TO ONLY APPLY CIA AGAINST** 05170000
T18111*                       EPP AND JOURNAL THE WASH ENTRY WHEN IT ** 05180000
T18111*                       IS EPP ANNIVERSARY.                    ** 05190000
T12820*  10/14/98     BP      CHANGED 2180- TO REMOVE UNWANTED WQ    ** 05200000
      *                       TEXT FOR FINAL BILL(RUNCATE TEXT AFTER ** 05210000
      *                       FINAL BILL = XXXX)                     ** 05220000
T17939*  10/15/98     JYL     CHANGED PARA-2184.  DO NOT ALLOW FOR   ** 05230000
T17939*                       SITUATIONS WHERE WS-BILL-AMOUNT AND    ** 05240000
T17939*                       CONTRACT TRAN-BAL TO BE NEGATIVE WHEN  ** 05250000
T17939*                       IT IS AN EARLY PAYOFF, AND DELETE      ** 05260000
T17939*                       AR_CNTL ROWS IF THERE IS NO MONEY LEFT ** 05270000
T17939*                       IN CONTRACT RECV.                      ** 05280000
T18133*  10/15/98     JYL     CHANGED PARA-2180. IF THE CONTRACT     ** 05290000
T18133*                       TRAN-BAL IS LESS THAN THEN CONTRACT    ** 05300000
T18133*                       CHARGES, THAN MOVE THE TRAN-BAL        ** 05310000
T18133*                       INTO THE 00-DAY BUCKET.                ** 05320000
T18130*  10/16/98     JYL     CHANGED PARA-2130. FOR EPP ANNIVERSARY ** 05330000
T18130*                       LOGIC, MOVE WS-TOTAL-AR-BALANCE-AT TO  ** 05340000
T18130*                       101-END-ACCT-BAL AND WK03-TOTAL-AR-BAL.** 05350000
T18230*  10/20/98     JYL     CHANGED PARA-2130. CALL DEPOSIT REFUND ** 05360000
T18230*                       PROCESS BEFORE APPLYING CIA TO EPP     ** 05370000
T18230*                       BALANCE AT ANNIVERSARY.                ** 05380000
T17969*  10/21/98     JYL     CHANGED PARA-2020. ADDED LOGIC TO      ** 05390000
T17969*                       ASSESS LPC ON UNPAID EARNEST PAYMENTS  ** 05400000
T17969*                       ON DPP ACCOUNTS.                       ** 05410000
T18278*  11/02/98     JYL     CHANGED PARA-5300. IF JOURNALLING FOR  ** 05420000
T18278*                       SUMM-UNBILLED, IT SHOULD BE A WASH     ** 05430000
T18278*                       ENTRY.                                 ** 05440000
T18375*  11/04/98     JYL     CHANGED PARA-2015. CREATE UTILITY AR   ** 05450000
T18375*                       CNTL IF THE ACCOUNT DOES NOT HAVE ONE  ** 05460000
T18375*                       FOR CANCEL/REBILL.                     ** 05470000
T18387*  11/05/98     JYL     CHANGED PARA-1001. INITIALIZE          ** 05480000
T18387*                       WS-DEP-ALREADY-REFUNDED.               ** 05490000
T18416*  11/10/98     JYL     CHANGED PARA-4510,-4520,-4530. WHEN    ** 05500000
T18416*                       CREATING A CIA FROM CANCE/REBILL LPC,  ** 05510000
T18416*                       THE CREDIT IN THE LPC REC SHOULD BE    ** 05520000
T18416*                       ZEROED OUT.                            ** 05530000
T18424*  11/11/98     JYL     CHANGED PARA-2184. IF THE CNT TRAN-BAL ** 05540000
T18424*                       GREATER THAN THE DEFERRED INT, JRNL    ** 05550000
T18424*                       THE TRAN-BAL AS DEFERRED INT. AND THE  ** 05560000
T18424*                       DIFFERENCE AS EARNED INTEREST.         ** 05570000
T18486*  11/18/98     JYL     INITIALIZE WORKING STORAGE VARIABLES   ** 05580000
T18486*                       IN THE PROCEDURE DIVISION.             ** 05590000
T18599*  12/02/98     JYL     CHANGED PARA-2184. IF THE CNT TRAN-BAL ** 05600000
T18599*                       IS LESS THAN THE DEFERRED INT. AMT, IT ** 05610000
T18599*                       IS AN EARLY PAYOFF,THEREFORE DO NOT BILL* 05620000
T18599*                       THE CONTRACT CHARGES.                  ** 05630000
T18600*  12/02/98     JYL     CHANGED PARA2184-. IF THE CNT TRAN-BAL ** 05640000
T18600*                       IS GREATER THAN DEFERRED INT. JRNL THE ** 05650000
T18600*                       TRAN-BAL AS DEF. INT AND THE DIFFERENCE** 05660000
T18600*                       AS EARNED INT., REGARDLESS OF THE STATUS* 05670000
T18600*                       OF THE CONTRACT.                       ** 05680000
T18579*  12/04/98     JYL     CHANGED PARA2130-. FOR EPP ANNIV.,     ** 05690000
T18579*                       WRITE A WASH ENTRY FOR THE EPP-TRAN-BAL** 05700000
T18579*                       OR THE EPP-MO-AMT, WHICHEVER IS SMALLER.* 05710000
T18579*                       IF EPP-TRAN-BAL IS A CREDIT, DO NOT    ** 05720000
T18579*                       CREATE WASH JOURNAL.                   ** 05730000
T18699*  01/05/99     JYL     CHANGED PARA2184-. FOR CONTRACTS, WHEN ** 05740000
T18699*                       DEFERRED INT. IS LESS THAN EARNED INT. ** 05750000
T18699*                       USE DEFERRED INTEREST AS EARNED INT.   ** 05760000
T17883*  01/06/99     JYL     IF CANCEL/REBILL ON EPP ANNIV. MONTH,  ** 05770000
T17883*                       GENERATE WQ FOR MANUAL RECALCULATION OF** 05780000
T17883*                       EPP AMOUNT.                            ** 05790000
T18833*  01/12/99     JYL     CHANGED PARA 2010-. CHANGED SEARCH     ** 05800000
T18883*                       CRITERIA FOR ADDING NEW REBILL ROW IN  ** 05810000
T18883*                       REBILL ARRAY TO USE CODE-UTIL-TYPE     ** 05820000
T18883*                       INSTEAD OF DATE-BILLED.                ** 05830000
T18838*  01/13/99     KDF     COMMETED YEAR END PROCESSING FOR       ** 05840000
T18838*                       PROJECT SHARE                          ** 05850000
T18520*  01/20/99     KDF     CHANGED WQ CATEGORY FOR DATABASE EXCEPS** 05860000
T18829*  01/21/99     KDF     CHANGED RETURN CODE FOR ACCT SPECIFIC  ** 05870000
T18829*                       ERROR FROM +16 TO +12.                 ** 05880000
T18966*  02/02/99     KDF     CORRECT LOGIC PARA 2131- FOR EPP AT    ** 05890000
T18966*                       ANNIVERSARY                            ** 05900000
T19040*  02/23/99     KDF     CORRECT LOGIC PARA 2131- FOR EPP C/R   ** 05910000
T18779*  02/24/99     MDJ     CHANGED CREDIT GROUP MOVEMENT LOGIC TO ** 05920000
T18779*                       NOT TAKE INTO ACCOUNT THE REMAINDER WHEN* 05930000
T18779*                       CALCULATING # MONTHS TO CONSIDER FOR   ** 05940000
T18779*                       CREDIT GROUP CHANGE.                   ** 05950000
T19174*  02/24/99     MDJ     CREDIT GROUP SHOULD NOT CHANGE IF ACCOUNT 05960000
T19174*                       HAS AN ACTIVE MEDICAL CERTIFICATE.     ** 05970000
T19198*  03/09/99     KDF     ADDED LOGIC TO BACK CIA AMOUNT OUT OF  ** 05980000
T19198*                       LPC BASE CACLULATION.                  ** 05990000
KDFKDF*  03/11/99     KDF     CHANGED LOGIC TO SET BILL CORECTION    ** 06000000
KDFKDF*                       FLAG FOR WS-CODE-BILL-CALC-BG <> A     ** 06010000
T19643*  04/19/99     ZB17046 ALLOW CT METER ACCOUNTS TO BE CHANGED  ** 06020000
T19643*                       TO CREDIT GROUP BALANCE.               ** 06030000
T19214*  04/22/99     MDJ     A WQ WILL BE CREATED WHEN CREDIT GROUP ** 06040000
      *                       CHANGES FROM A TO B AND THERE IS NO    ** 06050000
      *                       FORECASTED CREDIT GROUP.  COMMENT WILL ** 06060000
      *                       SPECIFY IF AN ACTIVE STA EXISTS        ** 06070000
      *                       AND THE CODE-TEMP-BILL WILL BE SET.    ** 06080000
T19747*  04/26/99     KDF     COMPUTE 0 DAY $ FOR ONE TIME PAY       ** 06090000
T19747*                       CONTRACT                               ** 06100000
T19857*  05/03/99     KDF     FIX NUMBER OF DFA INSTALMENT           ** 06110000
T19463*  05/13/99     KDF     DO NOT COMPUTE NEW AR-BALANCE AFTER    ** 06120000
T19463*                       C/R FOR EPP                            ** 06130000
T19421*  05/24/99     KDF     UPDATE CODES-DATA-PRESANT AFTER CALL   ** 06140000
T19421*                       TO SCSCA101                            ** 06150000
T20101*  06/04/99     MDJ     DO NOT CREATE WQ IF CREDIT GROUP IS    ** 06160000
      *                       CHANGING FROM A TO B AND FORECASTED    ** 06170000
      *                       CREDIT GROUP = SPACE, UNLESS ACTIVE STA** 06180000
      *                       EXISTS.                                ** 06190000
T20142*  06/07/99     MDJ     IF ACCOUNT IS ON EPP (WS-CODE-BUDGET)  ** 06200000
      *                       DO NOT ALLOW CREDIT GROUP TO CHANGE FROM* 06210000
      *                       ARREARS TO BALANCE.                    ** 06220000
T20006*  06/18/99     KDF     BYPASS LPC FOR C/R IMIDIATE            ** 06230000
T20007*  06/18/99     KDF     BYPASS DEP INT LOGIC FOR C/R IMIDIATE  ** 06240000
T20173*  06/18/99     KDF     CALC LPC FOR LANDLORD TYPE MASTERS     ** 06250000
T19844*  06/18/99     KDF     SET "HAS-ELE" AND "HES-GAS" FLAG WHEN  ** 06260000
T19844*                       UTIL IS ADDED                          ** 06270000
T20063*   7/14/99     RDF     BAD RETURN CODE FROM SCSCA101          ** 06280000
T20064*   7/14/99     RDF     BAD RETURN CODE FROM SCSCA106          ** 06290000
T20065*   7/14/99     RDF     BAD RETURN CODE FROM SCSCA117          ** 06300000
T20366*   7/14/99     RDF     DO NOT SET WS-CODE-TEMP-BILL-AT        ** 06310000
T20491*  07/26/99     KDF     DO NOT ARBITRARILY SET BAD RETUND FROM ** 06320000
T20491*                       SCSCA112 TO +16                        ** 06330000
T20554*  8-10-99      RDF     MOVE SPACES TO WS-WARNING-BILL-IND-BI  ** 06340000
T20569*  8-10-99      RDF     MOVE SPACES TO WS-WARNING-BILL-IND-BI  ** 06350000
T20570*  8-10-99      RDF     MOVE SPACES TO WS-WARNING-BILL-IND-BI  ** 06360000
T20531*  8-10-99      RDF     CUSTOMER NBR AND XFER TO ACCOUNT NBR   ** 06370000
T20531*                       FOR FINAL SERVICE CARE WQ              ** 06380000
T20530*  8/11/99      KDF     CHANGE CAT ID FOR EPP WQ               ** 06390000
T20503*  8/11/99      KDF     MISC WQ AT EPP ANIVERSARY              ** 06400000
T20794*  10/6/99      KDF     DO NOT RECALC LPC FOR EPP C/R          ** 06410000
T20924*  10/18/99     MDJ     DO NOT ALLOW SEB ACCOUNTS TO CHANGE TO ** 06420000
      *                       CREDIT GROUP = BALANCE.                ** 06430000
T20793*  10/21/99     KDF     CHANGE CONTRACT PAYOFF CALCULATION     ** 06440000
T21512*  01/26/00     KDF     CHANGE DEFAULT FOR LPC GL FOR GAS      ** 06450000
T21512*                       ONLY LOC OFFICES IN PARA 5300-         ** 06460000
T21169*  02/10/00     KDF     TRANSFERED MTHLY CNT LOOSING TRAN_BAL  ** 06470000
T21169*                       IF FINALED ON NEW ACCT                 ** 06480000
T21893** 03/27/00     MDJ     LOGIC WAS MOVED FROM SCSCA108 TO SCSCA110 06490000
T21893**                 SET CREDIT HISTORY, CREDIT GROUP AND CREDIT ** 06500000
T21893**                 STATUS.                                     ** 06510000
T21934*  04/06/00     BAB     APPLY LPC RECV TO UTE & UTG FOR CONS   ** 06520000
T21934*                       BILL MASTER ACCOUNTS                   ** 06530000
T21753*  04/28/00     CBSI    METER READ EXCEPTIONS FOR SOME SECURED ** 06540000
T21753*               CHENNAI RATES RECEIVE WRONG WORK QUEUES        ** 06550000
T22749*  09/01/00     KDF     ADD LOGIC FOR $10 MIN LPC              ** 06560000
T23418*  12/27/00     VIJAY   MADE CHANGES TO CORRECT THE PROBLEM OF ** 06570000
      *                       BILLING TOTAL AMOUNT INSTEAD  OF       ** 06580000
      *                       INSTALLMENT AMOUNT OF DFA, DEP ETC.,   ** 06590000
T23513*  01/30/01     AS      MADE CHGS TO CHECK FOR SEB-DATABASE    ** 06600000
T23513*                       INSTEAD OF LS-SEB FOR SEB REGION       ** 06610000
T23642*  02/26/01    DCS      ADDED DISPLAY TO AID IN LOCATING THE   ** 06620000
T23642*                       CANCEL REBILL OOB PROBLEM. (THIS CODE  ** 06630000
T23642*                       SHOULD BE DELETED WHEN THE PROBLEM IS  ** 06640000
T23642*                       RESOLVED.)                             ** 06650000
C23181*  03/06/01    VIJAY    FOR PSNC 00-DAY-DEPOSIT SHOULD BE AGED ** 06660000
      *                       IMMEDIATELY.                           ** 06670000
C23501*  04/04/01    VIJAY    MULTI-COMPANY CHANGES FOR DELINQUENCY  ** 06680000
      *                       VALUES.                                ** 06690000
T24024*  05/01/01    COVANSYS MADE CHANGES TO PASS RC=12 INORDER TO  ** 06700000
T24024*                       CONTINUE PROCESSING WITH NEXT ACCT     ** 06710000
IF0802*  08/02/01    CIF      ADD COMPANY-NO WHEN RETRIEVING LPC     ** 06720000
T21265*  08/20/01    SA       IF CONTRACT WITH LIEN PAID OFF         ** 06730000
T21265*              C0VANSYS WRITE AN WQ.                           ** 06740000
T21274*  08/20/01    SA       AMT_MO_PYMT SHOULD NOT BE UPDATED WITH ** 06750000
T21274*              COVANSYS NEGATIVE AMOUNT                        ** 06760000
C24365*  10/31/01    AS82045  MADE CHANGES TO AGE THE DEPOSIT IF LESS** 06770000
C24365*                       THAN 25 DAYS OLD                       ** 06780000
T21568*  05/07/02    VD88125  MADE CHANGES TO LAST INSTALLMENT BILLING* 06790000
T21568*                       NOT SHOWING THE CORRECT INSTALLMENT NO.** 06800000
T21568*                       ESPECIALLY IF ACCT HAS 60 INSTALLMENTS ** 06810000
C26130*  06/05/02 MDJ        ADDED/CHANGED LOGIC FOR AUTOMATIC EPP   ** 06820000
C26130*                      OFFER.                                  ** 06830000
C26954*  08/21/02 VIJAY      20 DAY RULE FOR AGING FOR LPC/DNP FOR   ** 06840000
      *                      SEBR.                                   ** 06850000
C26990*  09/24/02 BASKAR     CHANGES MADE FOR SEBR ACCOUNTS TO APPLY ** 06860000
C26990*                      20 DAY RULE FOR LPC.                    ** 06870000
C27553*  10/02/02 SRIDEVI    CHANGES MADE TO OFFER EPP TO ACCOUNTS   ** 06880000
C27553*                      THAT ARE RECIPIENT OF A TRANSFER WHEN   ** 06890000
C27553*                      THE FROM ACCOUNT IS FINAL BILLED        ** 06900000
C27742*  10/14/02 SRIDEVI    WQ SHOULD NOT BE GENERATED FOR NOT FOUND** 06910000
C27742*                      CONDITION IN 7251E-PARA.                   06920000
T28021*  12/05/02 PD80186    DO NOT BILL PENDING MSE CONTRACTS WITH  ** 06930000
T28021*                      DOWN PAYMENTS UNTIL THEY ARE ACTIVE.       06940000
C28085*  12/16/02 SRIDEVI    RESTRICT EPP OFFER TO SEB ONE RATE,     ** 06950000
C28085*                      SEBR AND COBB EMC CUSTOMERS             ** 06960000
C28085*  01/16/03 SRIDEVI    DO NOT OFFER EPP TO CUSTOMERS WHO HAVE  ** 06970000
C28085*                      A CREDIT BALANCE                        ** 06980000
T27700*  05/14/03 GOKUL      ALWAYS CONSIDER NSA/NSN AS ARREARS      ** 06990000
T27700*           COVANSYS   WHEN AGED TO 30, 60, 90 DAY BUCKET      ** 07000000
T28838*  07/29/03 VIJAY ACT1-CONTRACT ENARNED INTEREST NOT CREDITING ** 07010000
T28838*                      ON FINAL INSTALLMENT.                   ** 07020000
T28838*                 ACT2-CONTRACT INSTALLMENTS SHOWING ON THE BILL* 07030000
T28838*                      INCORRECTLY.                             * 07040000
C29752*  11/10/03 MDJ        REMOVED THE LOGIC THAT REFERENCED        * 07050000
      *                      WS-INTEREST-RATE-TABLE.  THIS IS NO      * 07060000
      *                      LONGER BEING USED.                       * 07070000
C30137*  01/06/04 KSB        CHANGED LOGIC FOR SEB TO CHARGE LPC      * 07080000
      *                      OF $10 ONLY IF THE COMPUTED LPC AMOUNT   * 07090000
      *                      IS 15 CENTS ($10 ARREARS AMT) OR MORE    * 07100000
C30122*  02/10/04 KSB        CHANGED LOGIC FOR ENERGY AMERCIA CUSTOMER* 07110000
      *                      TO CHARGE THE GREATER OF 1.5% OF ARREAR  * 07120000
      *                   AMT OR $5 ONLY IF THE COMPUTED LPC AMOUNT   * 07130000
      *                      IS 15 CENTS ($10 ARREARS AMT) OR MORE    * 07140000
T30467*  05/05/04 VIJAY      UPDATE CSS_DFA_ACCT REVENUE-MONTH WITH   * 07150000
      *                      BILLED REVENUE-MONTH(LS-REVENUE-MONTH).  * 07160000
T30199*  11/03/04 VIJAY      FIX TO BILL ENTIRE UNBILLED MONEY IN LAST* 07170000
      *                      INSTALLMENT OF A CONTRACT.               * 07180000
T31155*  01/31/05 VIJAY      SET WS-CODE-UTL PROPERLY WHEN IT FINDS   * 07190000
      *                      NON-CALC ROW ENTERED THROUGH CANCEL/REBIL* 07200000
      *                      CREDIT.                                    07210000
T31966*  12/30/04 VIJAY      CHANGES MADE TO NOT TO CROSS FOOT ERROR IN 07220000
      *                      BILL PRINT WHEN NON CALCS ARE DONE.        07230000
      *                      (WHEN NON CALS (CREDITS BY PANEL) ARE DONE 07240000
      *                      FOR FUTURE BILL, IT IS DEDUCTING THE MONEY 07250000
      *                      FROM UTILITIES AND ALSO FROM ARREARS THRO- 07260000
      *                      UGH CIA.I.E, ADJUSTING TWICE INSTEAD OF    07270000
      *                      ONCE.FIXED THE CODE TO DO CORRECT CIA PRO- 07280000
      *                      CESS WHEN CREDITS ARE DONE BY NON CALCS    07290000
      *                      IN ICP LEVEL THROUGH CANCEL/REBILL PANEL). 07300000
T32429*  03/10/05 VIJAY      CODE FIXED TO NOT TO CREDIT TWICE FOR CRE- 07310000
      *                      DET CONTRACT AT EPP ANNIVERSARY.           07320000
T32645*  04/19/05 VIJAY      30-DAY , 60 -DAY, 90-DAY MONEY MOVED FOR   07330000
      *                      LPC-CALC FOR SEB ONLY,                     07340000
C32490*  04/26/05 SV         ESTABLISH CRITERIA TO OFFER EPP TO PSNC ** 07350000
T31692*  07/12/05 DL85939    REMOVED TPR31692 CHANGE TO FIX DPP PROBLEM 07360000
T33192*  09/28/05 JAYANTHI   CALCULATE TAXES FOR SERVICE CARE CONTRACTS 07370000
T33192*                      ADD NEW FIELDS IN CONTRACT COPYBOOK TO     07380000
T33192*                      PASS THOSE TAXES TO BILL PRINT             07390000
T33192*  02/10/06 JAYANTHI   PASS REVENUE MONTH TO CONTRACT COPYBOOK    07400000
T31692*  07/11/05 VIJAY      FIX CALCULATION OF INSTALLEMENT FOR        07410000
      *  02/15/06            CONTRACTS AND ALSO PASS INSTALLMENT NUMBER 07420000
      *                      TO BILL PRINT FOR DFA AND DEPOSIT TOO      07430000
      *                      TO PRINT ON BILL.                          07440000
      *                      NOTE: THIS WILL AVOID RECALCULATION OF     07450000
      *                      INSTALLMENT NUMBER IN BILL PRINT PROCESS.  07460000
      *                      5010- PARA FIXED TO CALCULATE FOR DFA AND  07470000
      *                      DEPOSITS INSTALMENT NO.                    07480000
      *  04/10/06         1. IF WS-MONTHS-REMAINING-COUNTER COMPUTES AS 07490000
      *                      ZERO DUE TO TRANSFERS OR IMPROPER CLOSING  07500000
      *                      OF CONTRACTS,CALCULATE                     07510000
      *                      WS-MONTHS-BILLED-COUNTER CORRECTLY.        07520000
      *                   2. IF CONTRACT IS CLOSED AND FINAL BILLED     07530000
      *                      SEND NO_SCHED_PYMTS TO BILL PRINT.         07540000
T34188*  04/25/06 VIJAY     CODE FIXED TO NOT TO CALCULATE LPN WHEN     07550000
T34188*                     CODE_LPC_XMT SET TO 'B'(INDEFINITE-NON-UTL- 07560000
T34188*                     ONLY).                                      07570000
C34216*                                                                 07580000
C34216**  05/01/06 WILLIE CHECK TO SEE IF THE CUSTOMER ACCOUNT       ** 07590000
C34216**                  BALANCE IS LESS THAN EPP PAYMENT PLUS      ** 07600000
C34216**                  ARREARS.  IF SO MOVE TRANS BALANCE TO ZERO ** 07610000
C34216**                  DAY AND CREATE WASH TRANSACTION.           ** 07620000
T34776** 02/01/07 SK88120 IF THE TOTAL AMOUNT FOR CURRENT CHARGES    ** 07630000
T34776**                  IS LESS THAN ZERO THEN MADE NECESSARY      ** 07640000
T34776**                  CHANGES TO CREATE CIA ROW.(FOR SEB ONLY)   ** 07650000
C32408**                                                                07660000
C32408** 03/23/07  WILLIE CHANGE CODE TO SO THAT DPP BILL WITH ONLY  ** 07670000
C32408**                  NSA OR RCC ON CSS_DFA_RECVBLE WILL BILL AND** 07680000
C32408**                  NOT ABEND.                                 ** 07690000
C36304** 10/02/07 VP94820 FOR CANX/REBILLS POPULATING INSTALMENT     ** 07700000
C36304**                  NUMBER.                                    ** 07710000
C36418** 10/11/07 VP94820 REMOVED 25 DAY CHECK FOR ONLY CSR & BALANCE** 07720000
C36418**                  CREDIT GROUP CUSTOMERS.                    ** 07730000
C36418** 12/14/07 VP94820 ADDED CREDIT PROFILE CHECK. IT'S AN        ** 07740000
C36418**                  ADDTIONAL REQUIREMENT TO PREVIOUS CHANGE.  ** 07750000
C36223** 12/27/07 VP94820 BYPASSING LPC ADJUSTMENT FOR SEB REBILLS   ** 07760000
C36223**                  WITH MINIMUM LPC AMOUNT.                   ** 07770000
C36303** 12/27/07 VP94820 PACE CHANGES                               ** 07780000
C36303**                  - FOR SCEG CONTRACTS WITH ITEM-ID BETWEEN  ** 07790000
C36303**                  - 9500000  AND 9500999                     ** 07800000
C36303**                  - LPC EXEMPT                               ** 07810000
C36303**                  - IF ARREARS > 55 DAYS CHARGE BACK & CLOSE ** 07820000
C36303**                  - IF FINAL BILLED CHARGE BACK              ** 07830000
C34569** 03/03/08 VP94820 SEB CRM CHANGES                            ** 07840000
C34569**                  - ADDITIONAL I/P PRARAMETERS FOR 'SCSCA112'** 07850000
C34569**                  - ALLOW EPP OFFERS FOR COBB/EMC CUSTOMERS  ** 07860000
C34569**                  - LOGIC TO EVALUATE THE RATE TYPE(FIX/VAR) ** 07870000
C36956** 10/07/08 RC41079 BUDGET BILLING CHANGES    - CHANGED ALL    ** 07880000
C36956**                  ERRORS CONTAINING EPP TO BBP.              ** 07890000
A35920** 01/09/09 VP94820 -MOVE PJS SUB-UNBILLED TO 00-DAY & WRITE A ** 07900000
A35920**                   WASH JOURNAL FOR THE SAME.                ** 07910000
A35920**                  -MOVE CATEGORY 137 FOR ERR HANDLING        ** 07920000
P00097** 01/26/09 VP94820 INCREASE NUMBER OF ACTIVE DFA/CNT AND      ** 07930000
P00097**                  FORECASTED CREDIT ACTIONS  ALLOWED ON AN   ** 07940000
P00097**                  ACCOUNT TO 50. ALSO INCLUDES CHANGES FOR   ** 07950000
P00097**                  'I00177'.                                  ** 07960000
A37061** 04/02/09 VP94820 USE ACCT-TYPE INSTED REVENUE-CLASS.        ** 07970000
A00312** 05/05/09 VV94890 FIX TO SET CIA CDP POSITION 6 LOGIC FOR    ** 07980000
A00312**                  CANCEL\REBILLS.                            ** 07990000
A35967** 05/12/09 VV94890 FIX TO DO NOT OFFER EPP AUTO ENROLL TO TOU ** 08000000
A35967**                  CUSTOMERS.                                 ** 08010000
A00869** 05/27/09 SK42147 FIX OOB RELATED TO TOT_SUMM_UNBILLED. FOR  ** 08020000
A00869**                  SEB AFTER INITIALIZING LPC CHARGES ADD     ** 08030000
A00869**                  TOT_SUMM_UNBILLED BACK.                    ** 08040000
A00869**                  DELETED EA RATES.                          ** 08050000
A35648** 06/09/09 WR19680 FIX LPC CALCULATION ROUTINE.  ELECTRIC LPC ** 08060000
A35648**                  CHARGES BOOKING TO GAS GLS WHEN THERE IS NO** 08070000
A35648**                  GAS CHARGES ON THE ACCOUNT AND VICE VERSA  ** 08080000
A03730** 09/15/09 MN90523 REMOVED DATA ITEMS RELATED TO TABLE RA     ** 08081000
P00166** 10/10/09 AW41078 ADD UNIQUE ID TO WS-FIODB07.               ** 08082000
P00166** 01/11/10 AW41078 ADD PROCESS FLAG TO WS-FIODB07.            ** 08082100
A01702** 01/19/10 SP95538 LPC ASSESSMENT ON LANDLORD ACCTS MOVED TO  ** 08083000
A01702**                  PCSCA130.                                  ** 08084000
A00908** 01/20/10 VP94820 FIXED DPP SUB-UNBILLED ISSUE & CLEAN-UP.   ** 08084100
A02036** 02/16/10 VP94820 FIXED ONE-TIME CONTRACTS NOT TO GET BILLED ** 08084200
A02036**                  MORE THAN TRAN BALANCE(ACT0009).           ** 08084300
P00251** 03/08/10 WR19680 BLOCK CO-GENERATION ACCOUNTS FROM BEING    ** 08084400
P00251**                  SETUP ON BBP.                              ** 08084500
A02036** 04/14/10 SK42147 INITIAL BILL AND FINAL BILL OF SERVICE CARE** 08084600
A02036**                  MONTHLY CONTRACTS CAN HAPPEN ON THE SAME DAY* 08084700
A02036**                  CHANGES WERE MADE TO BILL CORRECTLY AND AVOID 08084800
A02036**                  ABEND IN SCSCA113.                         ** 08084900
P00394** 06/08/10 SP95538 REMOVE THE CALL TO SCSCA101.               ** 08085002
A02036** 08/09/10 VP94820 A)CHANGED FINAL BILL VALIDATION TO 'AT' TAB** 08085003
A02036**                  B)CREATE CIA ROW FOR CREDIT UTE/UTG BALANCE** 08085003
A02036**                  (REMOVED SEB DATABASE CHECK)               ** 08085003
A02036** 11/09/10 DM94438 FIXED THE REV ELECT ALLOCATION PERCENT ERR ** 08085003
A02036**                  FROM BEING USED FROM PREVIOUS ACCOUNT      ** 08085003
A02036**                  ACTIVITY#  114                             ** 08085003
P00492*  03/10/11 VP94820 CORRECTED COMPUTING PAST DUE AMT LOGIC     **         
ACT059*  03/14/11 VP94820 CLOSING ONE-TIME CONTRACTS AS SOON AS IT   **         
ACT059*                   GETS BILLED & WRITE MNT TRANS HIST.        **         
ACT059*                   (APPL00003082)                             **         
A03044*  03/17/11 VP94820 MOVE SUM-UNBILLED TO 00-DAY FOR ONETIME PJS**         
ACT106*  05/05/11 VIJAY   CLOSE SERVICE CARE ONE-TIME CHARGE CONTRACT**         
ACT106*           A03082  ONLY DURING BILLING                        **         
P00453*  05/09/11 VP94820 SCANA PRE-PAY-PLAN CHANGES                 **         
ACT188*  10/06/11 BD09555 CHANGE DATES FOR SERVICE CARE TAX CALC     **         
ACT188*           A03082  FOR SCE&G ACCOUNTS                         **         
P00471*  09/03/11 SP95538 REMOVE DPP-AMOUNT-DELINQ COMPUTATION.      **         
P00496** 04/05/11 SS97726 INDUSTRIAL BILLING ENHANCEMENTS.           **         
VKSACT*  09/08/11 VIJAY   HISTORY ROWS CREATION FOR EVENT PROCESS.   **         
VKSACT*           P00496  THIS INCLUDES CURTAILMENT, MAINTENANCE     **         
VKSACT*                   AND STANDBY EVENTS.                        **         
P00453*  11/09/11 VP43661 PRP PRESENTATION ISSUES FIXED              **         
P00453*  01/27/12 VP43661 PRP ISSUES WITH HIGHT CR BAL FIXED         **         
P00473*  03/07/12 MS93554 ADDED CRM VERSIONING CHANGES TO PULL       **         
P00473*                   APPROVED VERION.                           **         
P00599*  06/25/12 GV7A828 INCLUDE CREDIT GROUP 'NEW' TO ALLOW BBP    **         
P00599*                   OFFER                                      **         
P00694*  09/21/12 VIJAY   INITIALIZE ARREARS FIELDS.                 **         
P00694*                                                              **         
ACT109*  10/03/12 MC95456 INCLUDE NEW RULE NOT TO GENERATE BBP OFFER **         
ACT109*   A03967-ACT109   IF AN ACCOUNT WAS DROPPED FROM BBP IN LAST **         
ACT109*                   2 MONTHS.                                             
ACT002** 01/18/13 VIJAY   IF THE TOTAL AMOUNT FOR CURRENT CHARGES(ELEC) 07630000
ACT002** A04527           IS LESS THAN ZERO THEN MADE NECESSARY      ** 07640000
ACT002**                  CHANGES TO CREATE CIA ROW.                 ** 07650000
P00794** 12/02/13 VIJAY   Calculate tax on 'ServiceCare Appliance -  ** 07630000
P00794**                  repair' contract(PSNC) FROM 2014-01-01.    ** 07640000
P00794**                  -LOAD TAX DATA ONCE AND REUSE.             ** 07650000
P00794**                  -SCSCA200 REMOVED.                 '       ** 07650000
P00794** 02/17/14 VIJAY   CHANGE JRNL-FORMAT-NO TO 105 FOR CONTRACTS.** 07630000
P00794**                  FIX REVENUE-DISTRICT ISSUE WHICH WAS NOT   ** 07640000
      **                  POPULATING IN JOURNALING.                  ** 08090000
I01687** 02/26/14 VIJAY 1.DO NOT CALCULATE LPC IF IT IS ALREADY ASSE-** 07630000
I01687**                  SSED IN PRE-BILLING (PCSKR120).            ** 07640000
I01687**                2.MOVE PROGRAM NAME TO WS-CREATED-BY-WF IN   ** 07640000
I01687**                  WQ PROCESS.                                ** 07640000
ACT102** 05/13/14 VIJAY   CHARGE LPC ONLY WHEN BALANCE IS >= 30 FOR  **         
ACT102** A04880           SEB. VALUE IS FROM DELINQUENCY TABLE       **         
ACT102**                  'AMT-LPC-MIN-BALANCE'                      **         
      **                                                             **         
A04880** 08/13/14 RF10596 COMMENT OUT SERVICE CARE FINAL BILL WQ     **         
ACT288** 11/03/14 VIJAY   TAX PSNC SVC FROM 2014011.                 **         
      **  A04880                                                     **         
ACT302** 11/05/14 VIJAY   CREATE WQ IF SERVICE CARE TAX RATE IS NOT  **         
ACT302**  A04880          FOUND FOR SOME REASON.                     **         
A05136** 11/17/15 SS7F226 ELIMINATE CSS_LPC_RATE AND GET NEW VALUES  **         
A05136**          ACT234  FROM CSS_DELINQUENCY TABLE.                **         
A05460** 02/17/16 SS7F226 ADDED ADDITIONAL CONTRACT NAME CODES ON    **         
A05460**          ACT059  NC SALES TAX CALCULATION.                  **         
ACT284*  09/28/16  VIJAY  SET INDEXES TO 1 TO AVOID EXCEPTIONS IN    *          
ACT284*   A05460          MFES ENVIRONMENT.                                     
ACT305*  10/14/16  VIJAY  SET INDEXES TO 1 TO AVOID EXCEPTIONS IN    *          
ACT305*   A05460          MFES ENVIRONMENT.                                     
ACT393*  12/23/16 RAMESH  ADDED ADDITIONAL CONTRACT NAME CODES ON    *          
ACT393*   A05460          NC SALES TAX CALCULATION.                             
ACT400*  12/29/16 VIJAY   DO NOT INCLUDE PBI RATE MONEY IN TOTAL AR  *          
ACT400*   A05460          BALANCE.                                              
ACT020*  02/21/17 GD43988 COMMENTED WS-BILL-WQ-INDX CODE CAUSING     *          
ACT020*   A05745          INDEX ISSUE                                *          
      ***************************************************************** 08090000
      /                                                                 08100000
       ENVIRONMENT DIVISION.                                            
       INPUT-OUTPUT SECTION.                                            
       FILE-CONTROL.                                                    
      *                                                                 08140000
       DATA DIVISION.                                                   
       FILE SECTION.                                                    
      /                                                                 08170000
       WORKING-STORAGE SECTION.                                         

MSQ017 01 MFA-PROGRAM-ID PIC X(8) VALUE 'SCSCA108'.
MSQ017     COPY MFASQLM.
       01  PROGRAM-WORK-VARIABLES.                                      
      **     THE WORK VARIABLE AREA IS USED FOR TRANSIENT DATA. IT   ** 08200000
      **     IS INITIALIZED ON EACH CALL TO THE SUBROUTINE.          ** 08210000
      **     THE OTHER WORK AREAS ARE INITIALIZED UNDER PROGRAM      ** 08220000
      **     CONTROL.  ADD ANY NEW DATA FIELDS ACCORDINGLY.          ** 08230000
      **                                                             ** 08240000
COB305     05 WS-INTEREST-BEARING-AMOUNT        PIC S9(09)V99 COMP-3 
COB305       VALUE 0.     
COB305     05 WS-ARREARS-AMT-SEB-LPC        PIC S9(9)V99999 COMP-3 
COB305       VALUE 0.   
COB305     05 WS-ITEM-ID-HOLD        PIC S9(09) COMP-3 VALUE 0.     
T12012     05  WS-AR-HOLD-INDX                PIC S9(4) COMP.           
COB305     05 WS-ACCOUNT-NO-HOLD-AC        PIC S9(13) COMP-3 VALUE 0.        
COB305     05 WS-AMT-UNUSED-CR-HOLD-AC        PIC S9(9)V99 COMP-3 
COB305       VALUE 0.      
COB305     05 WS-HOLD-DAY-00-AC        PIC S9(9)V99 COMP-3 VALUE 0.      
COB305     05 WS-MO-PYMT-DESIRED        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-TOTAL-ARREARS        PIC S9(9)V99 COMP-3 VALUE 0.      
C34216     05  WS-ARREARS-AMOUNT            PIC S9(9)V99 COMP-3 VALUE 0.
COB305     05 WS-NEW-REVENUE-ACCUM        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-MAXIMUM-AMOUNT-TO-BILL        PIC S9(09)V99 COMP-3 
COB305       VALUE 0.     
COB305     05 WS-AMT-TRAN-BAL-HOLD        PIC S9(09)V99 COMP-3 VALUE 0.     
T19198     05  WS-TOTAL-CIA              PIC S9(09)V99 COMP-3 VALUE 0.  
T19198     05  WS-CIA-LEFT-FOR-NONUT     PIC S9(09)V99 COMP-3 VALUE 0.  
T11078     05  WS-TEMP-REVENUE-MTH            PIC 9(6).                 
T11078     05  WS-HOLD-REVENUE-MTH.                                     
T11078         10  WS-HOLD-REVENUE-MTH-CCYY   PIC 9999.                 
T11078         10  WS-HOLD-REVENUE-MTH-MM     PIC 99.                   
T11078     05  WS-HOLD-REVENUE-MTH-CHAR       PIC X(6).                 
COB305     05 WS-NEW-BALANCE        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-UNBILLED-DFAC        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-TOTAL-AR-AGED        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-HIGH-BUDGET-BALANCE        PIC S9(09)V99 COMP-3 
COB305       VALUE 0.     
COB305     05 WS-LOW-BUDGET-BALANCE        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-XFOOT-BALANCE        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-MONTHS-BILLED-COUNTER        PIC S9(03) COMP-3 VALUE 0.        
T9648      05  WS-MONTHS-BILLED-NUMERIC       PIC  9(02).               
COB305     05 WS-MONTHS-REMAINING-COUNTER        PIC S9(03) COMP-3 
COB305       VALUE 0.        
COB305     05 WS-SCHED-PYMTS        PIC S9(03) COMP-3 VALUE 0.        
COB305     05 WS-REBATE-AMT        PIC S9(9)V99 COMP-3 VALUE 0.      
COB305     05 WS-MO-PYMT        PIC S9(9)V99 COMP-3 VALUE 0.      
COB305     05 WS-ORIG-BAL        PIC S9(9)V99 COMP-3 VALUE 0.      
COB305     05 WS-TEMP-BAL        PIC S9(9)V99 COMP-3 VALUE 0.      
           05  WS-NULL-ID-1                   PIC S9(04)  COMP.         
           05  WS-NULL-ID-2                   PIC S9(04)  COMP.         
           05  WS-NULL-ID-3                   PIC S9(04)  COMP.         
C34216     05  WS-NULL-IND-00               PIC S9(4) COMP.             
C34216     05  WS-NULL-IND-30               PIC S9(4) COMP.             
C34216     05  WS-NULL-IND-60               PIC S9(4) COMP.             
C34216     05  WS-NULL-IND-90               PIC S9(4) COMP.             
C34216     05  WS-NULL-IND-UCR              PIC S9(4) COMP.             
           05  WS-PYMT-PRIORITY-HOLD          PIC S9(04)  COMP.         
           05  WS-CODE-BILL-FREQ-SPLIT.                                 
               10  WS-CODE-BILL-FREQ-HOLD     PIC X(01).                
               10  FILLER                     PIC X(02).                
           05  WS-CODE-RMOVE-FRM-RVC-HOLD     PIC X(01).                
T11910     05  WS-HAS-MORE-GUARANTEES         PIC X(01).                
T11910     05  WS-HOLD-GUAR-STATUS            PIC X(01).                
T11910     05  WS-CODES-DATA-PRES-HOLD        PIC X(32).                
           05  WS-ADD-MONTHS                  PIC S9(9) COMP.           
T10667     05  WS-HOLD-SUM-START              PIC S9(4) COMP.           
T7970      05  WS-SEQ-NO                      PIC S9(5) COMP VALUE 0.   
T7970      05  WS-ACCOUNT-NO-PREV            PIC S9(13)V COMP-3 VALUE 0.
COB305     05 WS-NET-CURRENT-AMT        PIC S9(9)V9(2) COMP-3 VALUE 0.    
COB305     05 WS-UNUSED-CR-APPLIED        PIC S9(9)V9(2) COMP-3 VALUE 0.    
COB305     05 WS-CIA-APPLIED        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-CIA-CREDIT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-CIA-LIHEAP-CREDIT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-WORK-90-DAY-DELINQ        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-WORK-60-DAY-DELINQ        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-WORK-30-DAY-DELINQ        PIC S9(09)V99 COMP-3 VALUE 0.     
           05  WS-WORK-HIST-DATA              PIC X(24).                
           05  WS-TEMP-ARREARS-HIST           PIC X(24).                
           05  WS-TEMP-DISCONNECT-HIST        PIC X(24).                
           05  WS-TEMP-DISC-EXCEPTN-HIST      PIC X(24).                
           05  WS-RELOAD-HIST-SW              PIC X(01).                
           05  WS-ARREARS-COUNT               PIC S9(4) COMP.           
           05  WS-DISCONN-ENTRIES             PIC S9(4) COMP.           
           05  WS-DATE-1                      PIC X(10).                
           05  WS-DATE-2                      PIC X(10).                
           05  WS-MONTH                       PIC S9(4) COMP.           
           05  WS-MONTHS-TO-EVALUATE          PIC S9(9) COMP.           
COB305     05 WS-REBILL-NET        PIC S9(9)V99 COMP-3 VALUE 0.      
COB305     05 WS-LPC-ADJUST-AMT        PIC S9(9)V99 COMP-3 VALUE 0.      
           05  WS-START-POS                   PIC S9(4) COMP.           
COB305     05 WS-ELEC-AMT        PIC S9(9)V99 COMP-3 VALUE 0.      
COB305     05 WS-GAS-AMT        PIC S9(9)V99 COMP-3 VALUE 0.      
T21719     05  WS-DETAIL-END-BAL              PIC S9(09)V99.            
T21719     05  WS-DETAIL-END-AR-BAL           PIC S9(09)V99.            
           05  WS-UNUSED-CR-FL                PIC X(01).                
COB305     05 WS-CUR-ACCUM        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-ARR-ACCUM        PIC S9(09)V99 COMP-3 VALUE 0.     
A35967     05  WS-TOU-EXISTS                  PIC X(1)   VALUE 'N'.     
P00251     05  WS-COGEN-EXISTS                PIC X(1)   VALUE 'N'.     
COB305     05 WS-ORIG-LPC-ELEC        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-REBILL-LPC-ELEC        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-ADJUST-LPC-ELEC        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-ORIG-LPC-GAS        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-REBILL-LPC-GAS        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-ADJUST-LPC-GAS        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-TOTAL-LPC        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-TOTAL-ADJUST-LPC        PIC S9(05)V99 COMP-3 VALUE 0.     
COB305     05 WS-DPP-ELEC-ARREARS        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-DPP-GAS-ARREARS        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-TOT-SUMM-UNBILLED-LPC        PIC S9(09)V99 COMP-3 
COB305       VALUE 0.     
COB305     05 WS-TOT-SUMM-UNBILLED-LPN        PIC S9(09)V99 COMP-3 
COB305       VALUE 0.     
T15484     05  WS-MONTHS-TO-EVAL-REM          PIC S9(09) COMP.          
COB305     05 WS-MO-PORTION-OF-REV-MO        PIC S9(02)V COMP-3 VALUE 0.       
COB305     05 WS-AMT-POSTED-TOTAL        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-AMT-CIA-FOR-REBILL        PIC S9(09)V99 COMP-3 VALUE 0.     
T16373     05  WS-AR-HOLD-CR-INDX             PIC S9(4) COMP.           
T17777     05  WS-HOLD-BUDGET-INDX            PIC S9(4) COMP.           
COB305     05 WS-HOLD-TRAN-BALANCE        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-NEW-TRAN-BALANCE        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-EPP-BILLED-AMOUNT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-PRP-ARREARS-AMT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-PRP-TRAN-BAL-AMT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-PRP-ADJ-AMT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-PRP-30-DAY-AMT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-JRNL-AMT-POSTED        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-JRNL-ACCT-END-AR-BAL        PIC S9(09)V99 COMP-3 
COB305       VALUE 0.     
COB305     05 WS-TOTAL-AR-BALANCE-HOLD        PIC S9(09)V99 COMP-3 
COB305       VALUE 0.     
T17883     05  WS-INT-BU-ANNIV-YR             PIC S9(04).               
T17883     05  WS-INT-CURR-REV-YR             PIC S9(04).               
T17883     05  WS-INT-NEXT-REV-YR             PIC S9(04).               
T17883     05  WS-CNT-STATUS-CD               PIC X(01).                
COB305     05 WS-TOTAL-SVCARE-TAX        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-TAX-AMOUNT        PIC S9(09)V99 COMP-3 VALUE 0.     
T33192     05  WS-RETURN-CODE                 PIC S9(04).               
T33192     05  WS-COUNT                       PIC S9(02) VALUE ZEROS.   
ACT109     05  WS-BBP-CUTOFF-DT               PIC X(10)  VALUE SPACES.  
ACT109     05  WS-BBP-DATE                    PIC X(10)  VALUE SPACES.  
ACT109     05  WS-BBP-DROP-EXISTS             PIC X(01)  VALUE 'N'.     
      /                                                                 09440000
        01 WS-ADD-ON-FIELDS.                                            
COB305     05 WS-INTEREST-TO-DATE        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-INTEREST-ACCRUED        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-AMT-DEF-INTEREST-LOST        PIC S9(09)V99 COMP-3 
COB305        VALUE 0.     
COB305     05 WS-DEF-TO-EARNED        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-INT-NOT-CALCULATED        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-BILL-AMOUNT        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-UNBILLED-PRINCIPAL        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-TOTAL-INTEREST        PIC S9(09)V99 COMP-3 VALUE 0.     
PCR212     05  WS-UTE-ARREARS         PIC S9(09)V99 COMP-3 VALUE 0.     
PCR212     05  WS-UTG-ARREARS         PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-TOTAL-UTIL-ARREARS        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-LPC-ELEC        PIC S9(09)V99 COMP-3 VALUE 0.     
COB305     05 WS-LPC-GAS        PIC S9(09)V99 COMP-3 VALUE 0.     
           05  WS-START-DATE                  PIC X(10).                
           05  WS-START-DATE-NUM              PIC 9(08).                
           05  WS-END-DATE                    PIC X(10).                
           05  WS-END-DATE-NUM                PIC 9(08).                
           05  WS-NUMBER-DAYS                 PIC S9(09) COMP.          
PCR530     05  WS-NUMBER-MTHS                 PIC S9(09) COMP.          
COB305     05 WS-DAILY-INTEREST-RATE        PIC S9V9(04) COMP-3 VALUE 0.      
COB305     05 WS-MTHLY-INTEREST-RATE        PIC S9V9(04) COMP-3 VALUE 0.      
COB305     05 WS-FINANCE-CHARGE        PIC S9(09)V99 COMP-3 VALUE 0.     
C26130     05  WS-VARIABLE-ID              PIC X(20).                   
COB305     05 WS-VARIABLE-VALUE        PIC S9(4)V99999 COMP-3 VALUE 0.      
C26130     05  WS-DELINQ-COMPANY           PIC X(02).                   
C26130     05  WS-CURRENT-COMPANY          PIC X(02) VALUE SPACES.      
C26130     05  WS-BH-DATE-FROM-REV-MON   .                              
C26130         10  WS-BH-DATE-CCYYY    PIC 9(04) VALUE ZERO.            
C26130         10  FILLER              PIC X(01) VALUE '-'.             
C26130         10  WS-BH-DATE-MM       PIC 9(02) VALUE ZERO.            
C26130         10  FILLER              PIC X(01) VALUE '-'.             
C26130         10  WS-BH-DATE-DD       PIC 9(02) VALUE 01.              
C26130     05  WS-REV-CCYYMM-TEMP           .                           
C26130         10  WS-REV-CC-TEMP           PIC 9(02).                  
C26130         10  WS-REV-YYMM-TEMP         PIC 9(04).                  
C26130     05  WS-REV-MONTH  REDEFINES WS-REV-CCYYMM-TEMP.              
C26130         10  WS-REV-CCYY-TEMP         PIC 9(04).                  
C26130         10  WS-REV-MM-TEMP           PIC 9(02).                  
      *                                                                 09850000
C26130 01  WS-DELINQUENCY-VALUES-TABLE.                                 
C26130     05  WS-DELINQ-COMPANY-ENTRY-TB                               
C26130         OCCURS 5 TIMES                                           
C26130         INDEXED BY TB-CO-INDEX.                                  
C26130         10  WS-DELINQ-VALUE-ENTRY-TB                             
C26130             OCCURS 20 TIMES                                      
C26130             INDEXED BY TB-VAL-INDEX.                             
C26130             15  WS-DELINQ-COMPANY-TB  PIC X(02).                 
C26130             15  WS-DELINQ-CODE-TB     PIC X(20).                 
C26130             15  WS-DELINQ-VALUE-TB    PIC S9(4)V9(5).            
                                                                        
A35648 01  WS-LOC-OFF-CHECK                  PIC X(01) VALUE SPACES.    
T20531 01  WS-SC-HONK-LIT                     PIC X(50) VALUE           
T20531      'FINAL BILL GENERATED WITH A SERVICE CARE CONTRACT '.       
      *                                                                 10000000
T12820 01  WS-RESET-SUPPLEMENTAL-TXT.                                   
T20531     05 WS-WANTED-SUP-TXT-PART    PIC X(124) VALUE SPACES.        
T20531     05 WS-UNWANTED-SUP-TXT-PART  PIC X(39) VALUE SPACES.         
      /                                                                 10060000
       COPY FIOWK03.                                                    10070000
      /                                                                 10080000
        01 WS-PPL.                                                      
           05  WS-PYMT-LVL-CHECK               PIC S9(04) COMP.         
               88 NSF         VALUE +0019.                              
               88 NSA         VALUE +0020.                              
               88 NSN         VALUE +0029.                              
               88 LPC         VALUE +0030.                              
               88 LPN         VALUE +0039.                              
               88 UTE         VALUE +0040.                              
               88 UTG         VALUE +0045.                              
               88 BUD         VALUE +0050.                              
               88 CCC         VALUE +0060.                              
               88 DFA         VALUE +0090.                              
               88 CIA         VALUE +0070.                              
               88 DEP         VALUE +0080.                              
               88 CNT         VALUE +0100.                              
               88 RVC         VALUE +0110.                              
               88 PJS         VALUE +0129.                              
      *                                                                 10260000
ACT059  01 WS-CNT.                                                      
ACT059     05 WS-CNT-NAME-CODE                PIC S9(04) COMP.          
ACT059        88 CNT-NAME-CODE-1   VALUE                                
ACT059          +0645,+0648,+0658,+0669,+0670,+0671,+0673,+0674,+0677,  
ACT059          +0678,+0680,+0690,+0693,+647,+649,+659,+660,+672,       
ACT393          +0663,+0664,+0665,+0666,+667,+668.                      
ACT059        88 CNT-NAME-CODE-2   VALUE                                
ACT059          +1523,+1518,+1524,+1500,+1501,+1502,+1503,+1504,+1505   
ACT059          +1506,+1507,+1508,+1509,+1510,+1511,+1512,+1514,+1517   
ACT059          +1519,+1520,+1522,+1528.                                
ACT059*                                                                 10260000
       01  WS-SWITCHES.                                                 
T32429     05  WS-CREDIT-CNT-APPLIED             PIC X(01) VALUE 'N'.   
           05  WS-WAS-LPC-AC-CREATED             PIC X(01).             
               88  WS-LPC-AC-WAS-CREATED           VALUE 'Y'.           
               88  WS-LPC-AC-NOT-CREATED           VALUE 'N'.           
           05  WS-IS-THERE-AN-LPC-AC             PIC X(01).             
               88  WS-THERE-IS-AN-LPC-AC           VALUE 'Y'.           
               88  WS-THERE-IS-NO-LPC-AC           VALUE 'N'.           
           05  WS-IS-THERE-A-UTL-LPC-AC          PIC X(01).             
               88  WS-THERE-IS-A-UTL-LPC-AC        VALUE 'Y'.           
               88  WS-THERE-IS-NO-UTL-LPC-AC       VALUE 'N'.           
           05  WS-IS-THERE-A-NONUT-LPC-AC        PIC X(01).             
               88  WS-THERE-IS-A-NONUT-LPC-AC      VALUE 'Y'.           
               88  WS-THERE-IS-NO-NONUT-LPC-AC     VALUE 'N'.           
T14446     05  WS-CANCEL-REBILL-FLAG             PIC X(01).             
T14446         88  WS-NOT-BILL-CORR                VALUE 'N'.           
T14446         88  WS-BILL-CORRECTION              VALUE 'Y'.           
C32490     05  WS-EPP-COMMERICAL-FLAG            PIC X(01) VALUE 'N'.   
C32490         88  NOT-EPP-COMMERICAL              VALUE 'N'.           
C32490         88  EPP-COMMERCIAL                  VALUE 'Y'.           
T8556      05  WS-JOURNAL-SUMM-UNBILLED          PIC X(01).             
T8556          88  WS-SUMM-UNBILLED                VALUE 'Y'.           
T8556          88  WS-NOT-SUMM-UNBILLED            VALUE 'N'.           
T10933     05  WS-WASH-LPC-JRNL                  PIC X(01).             
T10933         88  WASH-LPC-JRNL                   VALUE 'Y'.           
T10933         88  NOT-WASH-LPC-JRNL               VALUE 'N'.           
           05  WS-HAVE-UTL-DOLLARS-BEEN-USED     PIC X(01).             
           05  WS-HAVE-GAS-DOLLARS-BEEN-USED     PIC X(01).             
PCR212     05  WS-FOUND-BOTH-SW                  PIC X(1) VALUE 'N'.    
PCR212         88  WS-FOUND-BOTH                    VALUE 'Y'.          
PCR212     05  WS-BUD-ELEC-SERVICE-IND           PIC X(1).              
PCR212         88  HAS-BUD-ELEC-SERVICE             VALUE 'Y'.          
PCR212         88  NO-BUD-ELEC-SERVICE              VALUE 'N'.          
PCR212     05  WS-BUD-GAS-SERVICE-IND            PIC X(1).              
PCR212         88  HAS-BUD-GAS-SERVICE              VALUE 'Y'.          
PCR212         88  NO-BUD-GAS-SERVICE               VALUE 'N'.          
PCR072     05  WS-APPLYING-CIA-IND               PIC X(1).              
PCR072         88  WS-APPLYING-CIA                  VALUE 'Y'.          
PCR072         88  WS-NOT-APPLYING-CIA              VALUE 'N'.          
           05  WS-BUD-AC-IND                     PIC X(1).              
               88  HAS-BUD-AC                       VALUE 'Y'.          
               88  NO-BUD-AC                        VALUE 'N'.          
           05  WS-ELE-AC-IND                     PIC X(1).              
               88  HAS-ELE-AC                       VALUE 'Y'.          
               88  NO-ELE-AC                        VALUE 'N'.          
           05  WS-GAS-AC-IND                     PIC X(1).              
               88  HAS-GAS-AC                       VALUE 'Y'.          
               88  NO-GAS-AC                        VALUE 'N'.          
T5679      05  WS-ELEC-90-DAY-REBILL-SW          PIC X(1).              
T5679          88  ELEC-90-DAY-REBILL               VALUE 'Y'.          
T5679      05  WS-ELEC-60-DAY-REBILL-SW          PIC X(1).              
T5679          88  ELEC-60-DAY-REBILL               VALUE 'Y'.          
T5679      05  WS-ELEC-30-DAY-REBILL-SW          PIC X(1).              
T5679          88  ELEC-30-DAY-REBILL               VALUE 'Y'.          
T5679      05  WS-GAS-90-DAY-REBILL-SW           PIC X(1).              
T5679          88  GAS-90-DAY-REBILL                VALUE 'Y'.          
T5679      05  WS-GAS-60-DAY-REBILL-SW           PIC X(1).              
T5679          88  GAS-60-DAY-REBILL                VALUE 'Y'.          
T5679      05  WS-GAS-30-DAY-REBILL-SW           PIC X(1).              
T5679          88  GAS-30-DAY-REBILL                VALUE 'Y'.          
           05  WS-DISCONNECT-ACTION              PIC X(1).              
               88  NO-DISCONNECT-OCCURRED        VALUE '0'.             
               88  DISCONNECT-OCCURRED           VALUE '1'.             
           05  WS-HAS-GUARANTOR-SW               PIC X(1) VALUE '0'.    
               88  WS-HAS-GUARANTOR              VALUE '1'.             
           05  WS-FINAL-INSTALLMENT-SW           PIC X(1) VALUE '0'.    
               88  WS-FINAL-INSTALLMENT          VALUE '1'.             
               88  WS-NOT-FINAL-INSTALL          VALUE '0'.             
PCR530     05  WS-FINAL-INSTALL-EARLY-SW         PIC X(1) VALUE '0'.    
PCR530         88  WS-FINAL-INSTALL-EARLY        VALUE '1'.             
PCR530         88  WS-NOT-FINAL-INSTALL-EARLY    VALUE '0'.             
T12012     05  WS-CREATE-CIA-SW                  PIC X(1) VALUE '0'.    
T12012         88  CREATE-CIA-FROM-UNUSED        VALUE '1'.             
T12012         88  NOT-CREATE-CIA                VALUE '0'.             
T13862     05  WS-LPC-JOURNAL-SW                 PIC X(1) VALUE '0'.    
T13862         88  LPC-JOURNAL                   VALUE '1'.             
T13862         88  NO-LPC-JOURNAL                VALUE '0'.             
T14478     05  WS-CIA-FOR-REBILL-SW              PIC X(1) VALUE 'N'.    
T14478         88  WS-CIA-FOR-REBILL             VALUE 'Y'.             
T14478         88  WS-CIA-NOT-FOR-REBILL         VALUE 'N'.             
T14478     05  WS-AR-TRN-CSR-OPN-SW              PIC X(1) VALUE 'N'.    
T14478         88  WS-AR-TRN-CSR-OPN             VALUE 'Y'.             
T18579     05  WS-EPP-WASH-JRNL-SW               PIC X(1) VALUE 'N'.    
T18579         88  WS-EPP-WASH-JRNLED            VALUE 'Y'.             
T18579         88  WS-EPP-WASH-NOT-JRNLED        VALUE 'N'.             
T18579     05  WS-CREDIT-APPLIED-SW              PIC X(1) VALUE 'N'.    
T18579         88  WS-CREDIT-APPLIED             VALUE 'Y'.             
T18579         88  WS-CREDIT-NOT-APPLIED         VALUE 'N'.             
C26130     05  WS-ROW-EXISTS                     PIC X(1) VALUE 'N'.    
C26130         88  ROW-EXISTS                    VALUE 'Y'.             
C26130         88  ROW-DOES-NOT-EXIST            VALUE 'N'.             
C26130     05  WS-DELINQ-WORK-AREA-LOAD-CNTRL    PIC X(1) VALUE '0'.    
C26130         88  DW-NOT-LOADED                 VALUE '0'.             
C26130         88  DW-LOADED                     VALUE '1'.             
P00794     05  WS-PSNC-TAX-RATES-FLAG            PIC X(1) VALUE '0'.    
P00794         88  TAX-RATES-NOT-LOADED          VALUE '0'.             
P00794         88  TAX-RATES-LOADED              VALUE '1'.             
C36303     05  WS-PACE-CNT-STATUS                PIC X(1) VALUE '0'.    
C36303         88  PACE-CNT-OTHER                VALUE '0'.             
C36303         88  PACE-CNT-CANCEL               VALUE '1'.             
P00453     05  WS-PRP-ADJ                        PIC X(1) VALUE '0'.    
P00453         88  PRP-ADJ-NONE                  VALUE '0'.             
P00453         88  PRP-ADJ-BILL                  VALUE '1'.             
C28085     05  WS-ALLOW-OFFER                    PIC X(1) VALUE 'Y'.    
C34569     05  WS-FIXED-RATE                     PIC X(1) VALUE 'N'.    
C34569     05  WS-REVENUE-MONTH-1                PIC X(06).             
C34569     05  FILLER REDEFINES WS-REVENUE-MONTH-1.                     
C34569         10  WS-REVMTH-CCYY                PIC 9(04).             
C34569         10  WS-REVMTH-MM                  PIC 9(02).             
C28085     05  WS-SEBR-ACCT                      PIC X(1) VALUE 'N'.    
C28085     05  WS-CREDIT-BALANCE                 PIC S9(9)V99 COMP-3    
C28085                                                    VALUE 0.      
C27553     05  WS-ACCT-XFER-FINAL-BILLED         PIC X(1) VALUE 'N'.    
C26130 01  WS-DELINQUENCY-AMT-CONSTANTS USAGE COMP-3.                   
COB305     05 WS-EPP-OFFER-REV-MTH        PIC 9(6) VALUE 0.                  
COB305     05 WS-AMT-ARREARS        PIC S9(5)V99 VALUE 0.              
COB305     05 WS-AMT-LPC-MIN-CHG        PIC S9(5)V99 VALUE 0.              
COB305     05 WS-AMT-LPC-MIN-BALANCE        PIC S9(4)V99999 VALUE 0.           
C26130*                                                                 11470000
C26130 01  WS-GAS-EPP-OFFER-TABLE.                                      
C26130     05  WS-GAS-EPP-OFFER-ENTRY                                   
C26130            OCCURS 12 TIMES                                       
C26130            INDEXED BY WS-OFFER-INDX.                             
C26130         10  WS-GAS-EPP-OFFER-MONTH    PIC 9(06).                 
C26130*                                                                 11530000
      /********************************************************         11540000
      *                                                       *         11550000
      *   WORKING STORAGE FOR BASIC WQ MESSAGE TEXT           *         11560000
      *                                                       *         11570000
      *********************************************************         11580000
       01  WS-WQ-MESSAGE-DATA.                                          
           05  WS-MESSAGE-PATTERN.                                      
               10  WS-WQ-CATEGORY-ID       PIC S9(4) COMP.              
               10  WS-WQ-PRIORITY          PIC X(1).                    
               10  WS-WQ-ROUTE-CATEGORY    PIC X(1).                    
               10  WS-WQ-MESSAGE-LENGTH    PIC S9(4) COMP.              
               10  WS-WQ-MESSAGE-TEXT      PIC X(30).                   
           05  WS-PRIOR-TENANT-ON-BUDGET.                               
               10  FILLER                  PIC S9(4) COMP VALUE +17.    
               10  FILLER                  PIC X(1)  VALUE 'N'.         
               10  FILLER                  PIC X(1)  VALUE '4'.         
               10  FILLER                  PIC S9(4) COMP VALUE +29.    
               10  FILLER                  PIC X(30) VALUE              
                   'PRIOR ACCOUNT STILL ON BUDGET'.                     
           05  WS-INVALID-BUDGET-AMOUNT.                                
               10  FILLER                  PIC S9(4) COMP VALUE +17.    
               10  FILLER                  PIC X(1)  VALUE 'N'.         
               10  FILLER                  PIC X(1)  VALUE '4'.         
               10  FILLER                  PIC S9(4) COMP VALUE +26.    
               10  FILLER                  PIC X(30) VALUE              
                   'BUDGET AMOUNT LESS THAN $5'.                        
T17883     05  WS-CANCEL-REBILL-EPP-ANNIV.                              
T20530         10  FILLER                  PIC S9(4) COMP VALUE +169.   
T17883         10  FILLER                  PIC X(1)  VALUE 'N'.         
T17883         10  FILLER                  PIC X(1)  VALUE '4'.         
T17883         10  FILLER                  PIC S9(4) COMP VALUE +30.    
T17883         10  FILLER                  PIC X(27) VALUE              
T17883             'CANCEL/REBILL AT BBP ANNIV.'.                       
T19214     05  WS-CR-GRP-FRCAST-NOT-SET-STA.                            
T19214         10  FILLER                  PIC S9(4) COMP VALUE +162.   
T19214         10  FILLER                  PIC X(1)  VALUE 'N'.         
T19214         10  FILLER                  PIC X(1)  VALUE '4'.         
T19214         10  FILLER                  PIC S9(4) COMP VALUE +50.    
T19214         10  FILLER                  PIC X(50) VALUE              
T19214             'CR GRP CHANGED TO B. FRCAST NOT SET TO B, HAS STA.'.
           05  WS-INSUFF-RVC-MO-PYMT.                                   
               10  FILLER                  PIC S9(4) COMP VALUE +17.    
               10  FILLER                  PIC X(1)  VALUE 'N'.         
               10  FILLER                  PIC X(1)  VALUE '4'.         
               10  FILLER                  PIC S9(4) COMP VALUE +30.    
               10  FILLER                  PIC X(30) VALUE              
                   'MONTHLY RVC PMNT LESS THAN $15'.                    
           05  WS-INSUFF-CNT-MO-PYMT.                                   
               10  FILLER                  PIC S9(4) COMP VALUE +17.    
               10  FILLER                  PIC X(1)  VALUE 'N'.         
               10  FILLER                  PIC X(1)  VALUE '4'.         
               10  FILLER                  PIC S9(4) COMP VALUE +29.    
               10  FILLER                  PIC X(30) VALUE              
                   'NO MNTHLY CNT PMNT; SET TO $5'.                     
           05  WS-INSUFF-DFA-MO-PYMT.                                   
               10  FILLER                  PIC S9(4) COMP VALUE +17.    
               10  FILLER                  PIC X(1)  VALUE 'N'.         
               10  FILLER                  PIC X(1)  VALUE '4'.         
               10  FILLER                  PIC S9(4) COMP VALUE +29.    
               10  FILLER                  PIC X(30) VALUE              
                   'NO MNTHLY DFA PMNT; SET TO $5'.                     
           05  WS-DATABASE-EXCEPTION.                                   
T18520         10  FILLER                  PIC S9(4) COMP VALUE +137.   
               10  FILLER                  PIC X(1)  VALUE 'N'.         
               10  FILLER                  PIC X(1)  VALUE '4'.         
               10  FILLER                  PIC S9(4) COMP VALUE +29.    
               10  FILLER                  PIC X(30) VALUE              
                   'A DATABASE EXCEPTION OCCURRED'.                     
           05  WS-MISCELLANEOUS-MESSAGE.                                
KDFKDF         10  FILLER                  PIC S9(4) COMP VALUE +137.   
               10  FILLER                  PIC X(1)  VALUE 'N'.         
               10  FILLER                  PIC X(1)  VALUE '4'.         
               10  WS-MISC-MSG-LEN         PIC S9(4) COMP VALUE +60.    
               10  WS-MISC-MSG-TEXT        PIC X(60).                   
PCR294     05  WS-SERVICE-CARE-FIN-BILL.                                
PCR294         10  FILLER                  PIC S9(4) COMP VALUE +107.   
PCR294         10  FILLER                  PIC X(1)  VALUE 'N'.         
PCR294         10  FILLER                  PIC X(1)  VALUE '4'.         
PCR294         10  FILLER                  PIC S9(4) COMP VALUE +108.   
T20531         10  WS-SERVICE-CARE-AREA    PIC X(108).                  
T20531         10  SERV-CARE-MESSAGE REDEFINES WS-SERVICE-CARE-AREA.    
PCR294             15  WS-SC-FINAL-LIT         PIC X(50).               
T20531             15  WS-SC-CUSTOMER-LIT      PIC X(15).               
T20531             15  WS-SERV-CARE-CUSTOMER   PIC 9(10).               
T20531             15  WS-SC-XFER-LIT          PIC X(20).               
T20531             15  WS-SERV-CARE-XFER-TO    PIC 9(13).               
T21265 01  WS-LIEN-WQ-COMMENT.                                          
T21265     05  WS-LIEN-LIT1                PIC  X(26) VALUE             
T21265         'IF BILLED SUCCESSFULLY ON ' .                           
T21265     05  WS-LIEN-DATE-WQ             PIC  X(10) VALUE SPACES.     
T21265     05  WS-LIEN-LIT2                PIC  X(35) VALUE             
T21265         'ACCOUNT HAS PAID OFF CONTRACT ID = '.                   
T21265     05  WS-LIEN-CNT-ITEM-ID         PIC  9(11).                  
T21265     05  WS-LIEN-LIT3                PIC  X(18) VALUE             
T21265         ' WHICH HAD A LIEN.'.                                    
PCR072*   WORKING STORAGE SUPPLEMENTAL WQ TEXT.                         12560000
           COPY CWS0070B.                                               12570000
      /                                                                 12580000
PCR072*   WORKING STORAGE FOR CODES-DATA-PRESENT.                       12590000
           COPY CWS00056.                                               12600000
PCR072/                                                                 12610000
PCR072*****WORKING STORAGE FOR CPD00010 AND CPD0130B.                   12620000
PCR072     COPY CWS00017.                                               12630000
      /                                                                 12660000
       01  WS-LITERALS.                                                 
           05  WS-SUBROUTINE-IDS.                                       
               10  SCSCA101              PIC X(8) VALUE 'SCSCA101'.     
CG0318         10  SCSCA106              PIC X(8) VALUE 'SCSCA106'.     
               10  SCSCA117              PIC X(8) VALUE 'SCSCA117'.     
               10  SCSCA112              PIC X(8) VALUE 'SCSCA112'.     
           05  WS-GUARANTOR-DESC         PIC X(15) VALUE                
               'GUAR-STATUS-REA'.                                       
           05  WS-MAINTENANCE-DESC       PIC X(25) VALUE                
               'CHANGE GUARANTOR STATUS  '.                             
           05  FILLER                    PIC X(20) VALUE                
               'ACTIVE PARAGRAPH IS:'.                                  
           05  ACTIVE-PARAGRAPH          PIC X(04).                     
T12845     05  WS-SUB                  PIC X(01)     VALUE 'S'.         
T17189     05  WS-MASTER               PIC X(01)     VALUE 'M'.         
           05  WS-YES                  PIC X(01)     VALUE 'Y'.         
           05  WS-NO                   PIC X(01)     VALUE 'N'.         
PCR072     05  WS-DELETE               PIC X(01)     VALUE 'D'.         
TP9134     05  WS-INSERT               PIC X(01)     VALUE 'I'.         
           05  WS-LPC                  PIC X(03)     VALUE 'LPC'.       
           05  WS-UTL                  PIC X(03)     VALUE 'UTL'.       
           05  WS-NSA                  PIC X(03)     VALUE 'NSA'.       
           05  WS-NSC                  PIC X(03)     VALUE 'NSC'.       
           05  WS-ELEC                 PIC X(1)      VALUE 'E'.         
           05  WS-GAS                  PIC X(1)      VALUE 'G'.         
           05  WS-PEND-ASAP            PIC X(1)      VALUE 'A'.         
           05  WS-PEND-NEXT            PIC X(1)      VALUE 'B'.         
           05  WS-CODE-USED            PIC X(1)      VALUE 'A'.         
           05  WS-NO-INT-SELECTED      PIC X(1)      VALUE ' '.         
           05  WS-NO-INTEREST          PIC X(1)      VALUE 'A'.         
           05  WS-ADD-ON-INTEREST      PIC X(1)      VALUE 'B'.         
           05  WS-SIMPLE-INTEREST      PIC X(1)      VALUE 'C'.         
           05  WS-ANNUAL               PIC X(1)      VALUE 'A'.         
           05  WS-BI-MONTHLY           PIC X(1)      VALUE 'B'.         
           05  WS-MONTHLY              PIC X(1)      VALUE 'M'.         
           05  WS-QUARTERLY            PIC X(1)      VALUE 'Q'.         
           05  WS-SEMI-ANNUAL          PIC X(1)      VALUE 'S'.         
           05  WS-TRANSFER             PIC X(1)      VALUE 'T'.         
           05  WS-ACTIVE               PIC X(1)      VALUE 'A'.         
           05  WS-FINAL-BILL           PIC X(1)      VALUE 'B'.         
           05  WS-INACTIVE             PIC X(1)      VALUE 'J'.         
           05  WS-PJS-INACTIVE         PIC X(1)      VALUE 'I'.         
           05  WS-CHARGED-OFF          PIC X(1)      VALUE 'S'.         
           05  WS-CURRENT-CYCLE        PIC X(1)      VALUE 'C'.         
           05  WS-DPP                  PIC X(1)      VALUE 'B'.         
           05  WS-EMPLOYEE-ACCT        PIC X(1)      VALUE 'B'.         
T12602     05  WS-DEADHEAD             PIC X(1)      VALUE 'D'.         
           05  WS-LPC-PPL              PIC S9(4) COMP VALUE +30.        
           05  WS-PRJ-SHR-PPL          PIC S9(4) COMP VALUE +120.       
           05  WS-BACKOUT-BILL-ITEM    PIC X(1)      VALUE 'B'.         
           05  WS-CURRENT-BILL-ITEM    PIC X(1)      VALUE 'C'.         
           05  WS-ACTIVE-ITEM          PIC X(1)      VALUE 'A'.         
           05  WS-NORMAL-BILL          PIC X(1)      VALUE 'A'.         
           05  WS-SEASONAL-BILL        PIC X(1)      VALUE 'B'.         
           05  WS-NON-PAY-BILL         PIC X(1)      VALUE 'C'.         
           05  WS-OVER-30-DAYS         PIC X(1)      VALUE '1'.         
           05  WS-OVER-60-DAYS         PIC X(1)      VALUE '2'.         
           05  WS-OVER-90-DAYS         PIC X(1)      VALUE '3'.         
           05  WS-DFA-COMPLETE         PIC X(1)      VALUE 'C'.         
           05  WS-ONE-TIME-CHARGE-CNTRACT  PIC X(1)  VALUE 'A'.         
           05  WS-MONTHLY-AMOUNT-CNTRACT   PIC X(1)  VALUE 'B'.         
           05  WS-INSTALLMENT-CNTRACT      PIC X(1)  VALUE 'C'.         
           05  WS-90-SAME-AS-CASH-CNTRACT  PIC X(1)  VALUE 'D'.         
PCR072     05  WS-MNTHLY-CREDIT            PIC X(1)  VALUE 'E'.         
CSG818     05  WS-CNT-CLOSED               PIC X(1)  VALUE 'E'.         
PCR294     05  WS-MONTHLY-CHARGE           PIC X(1)  VALUE 'B'.         
PCR294     05  WS-SERVICE-CARE-CNT         PIC X(1)  VALUE 'F'.         
           05  WS-4                        PIC S9(01) VALUE 4.          
PCR072     05  WS-90-DAY                   PIC X(1)  VALUE '9'.         
PCR072     05  WS-60-DAY                   PIC X(1)  VALUE '6'.         
PCR072     05  WS-30-DAY                   PIC X(1)  VALUE '3'.         
PCR072     05  WS-00-DAY                   PIC X(1)  VALUE '0'.         
           05  WS-APPROVED                 PIC X(1)  VALUE 'B'.         
           05  WS-PLEDGE                   PIC X(1)  VALUE 'P'.         
T5846      05  WS-ONETIME                  PIC X(1)  VALUE 'O'.         
           05  WS-UPDATE                   PIC X(1)  VALUE 'U'.         
           05  WS-GOOD                     PIC X(1)  VALUE 'G'.         
           05  WS-BAD                      PIC X(1)  VALUE 'B'.         
           05  WS-UNKNOWN                  PIC X(1)  VALUE 'U'.         
           05  WS-CODE-APPLIES             PIC X(1)  VALUE 'A'.         
           05  WS-RELEASED                 PIC X(1)  VALUE 'R'.         
           05  WS-REL-GOOD-CREDIT          PIC X(1)  VALUE 'G'.         
T11910     05  WS-LETTER                   PIC X(1)  VALUE 'L'.         
T11910     05  WS-OUTGOING                 PIC X(1)  VALUE 'O'.         
           05  WS-101                      PIC S9(05) COMP-3            
                                                 VALUE +00101.          
PCR305     05  WS-105                      PIC S9(05) COMP-3            
PCR305                                           VALUE +00105.          
T15481     05  WS-SYSTEM                   PIC X(20) VALUE              
T15481                                     'SYSTEM              '.      
=====>     05  WS-X                        PIC X(01) VALUE 'X'.         
=====>     05  WS-A                        PIC X(01) VALUE 'A'.         
=====>     05  WS-B                        PIC X(01) VALUE 'B'.         
=====>     05  WS-P                        PIC X(01) VALUE 'P'.         
           05  WS-BILL                     PIC X(04) VALUE 'BILL'.      
           05  WS-BAT                      PIC X(04) VALUE 'BAT'.       
=====>     05  WS-1                        PIC S9 COMP-3 VALUE +1.      
=====>     05  WS-PGRMNAME                 PIC X(08) VALUE 'SCSCA108'.  
T18230     05  WS-EPP-CREDIT-FLAG          PIC X(01) VALUE 'N'.         
T18230     05  WS-DEP-ALREADY-REFUNDED     PIC X(01) VALUE 'N'.         
T18424     05  WS-EARLY-PAYOFF-PROC-FLG    PIC X(01) VALUE 'N'.         
T21753     05  WS-CATEGORY-ID-138          PIC S9(04)  COMP             
T21753                                               VALUE 138.         
C23181     05  WS-SCEG                     PIC X(02) VALUE '01'.        
C23181     05  WS-PSNC                     PIC X(02) VALUE '26'.        
                                                                        
       01  WS-JOURNAL-DESCRIPTIONS.                                     
           05  WS-TRANSFER-RECV.                                        
               10  FILLER  PIC S9(4) COMP VALUE +16.                    
               10  FILLER  PIC X(30) VALUE 'BILLED TRANSFERS'.          
           05  WS-BUDGET-BILL.                                          
               10  FILLER  PIC S9(4) COMP VALUE +14.                    
               10  FILLER  PIC X(30) VALUE 'BUDGET BILLING'.            
           05  WS-BUDGET-PRE-PAY.                                       
               10  FILLER  PIC S9(4) COMP VALUE +22.                    
               10  FILLER  PIC X(30) VALUE 'PRE-PAID BUDGET CREDIT'.    
           05  WS-RECONNECT-CHARGE.                                     
               10  FILLER  PIC S9(4) COMP VALUE +24.                    
               10  FILLER  PIC X(30) VALUE 'CURRENT RECONNECT CHARGE'.  
           05  WS-RECONNECT-PREPAY.                                     
               10  FILLER  PIC S9(4) COMP VALUE +25.                    
               10  FILLER  PIC X(30) VALUE 'PRE-PAID RECONNECT CREDIT'. 
           05  WS-DEP-CHARGE.                                           
               10  FILLER  PIC S9(4) COMP VALUE +22.                    
               10  FILLER  PIC X(30) VALUE 'CURRENT DEPOSIT CHARGE'.    
           05  WS-DEP-PREPAY.                                           
               10  FILLER  PIC S9(4) COMP VALUE +23.                    
               10  FILLER  PIC X(30) VALUE 'PRE-PAID DEPOSIT CREDIT'.   
           05  WS-DFA-CHARGE.                                           
               10  FILLER  PIC S9(4) COMP VALUE +22.                    
               10  FILLER  PIC X(30) VALUE 'CURRENT DFA/DPP CHARGE'.    
           05  WS-DFA-PREPAY.                                           
               10  FILLER  PIC S9(4) COMP VALUE +23.                    
               10  FILLER  PIC X(30) VALUE 'PRE-PAID DFA/DPP CREDIT'.   
           05  WS-CNT-CHARGE.                                           
               10  FILLER  PIC S9(4) COMP VALUE +23.                    
               10  FILLER  PIC X(30) VALUE 'CURRENT CONTRACT CHARGE'.   
           05  WS-CNT-PREPAY.                                           
               10  FILLER  PIC S9(4) COMP VALUE +24.                    
               10  FILLER  PIC X(30) VALUE 'PRE-PAID CONTRACT CREDIT'.  
           05  WS-RVC-CHARGE.                                           
               10  FILLER  PIC S9(4) COMP VALUE +23.                    
               10  FILLER  PIC X(30) VALUE 'CURRENT REV CHRG CHARGE'.   
           05  WS-RVC-PREPAY.                                           
               10  FILLER  PIC S9(4) COMP VALUE +24.                    
               10  FILLER  PIC X(30) VALUE 'PRE-PAID REV CHRG CREDIT'.  
           05  WS-PJS-CHARGE.                                           
               10  FILLER  PIC S9(4) COMP VALUE +23.                    
               10  FILLER  PIC X(30) VALUE 'CURRENT PROJ SHR CHARGE'.   
           05  WS-PJS-PREPAY.                                           
               10  FILLER  PIC S9(4) COMP VALUE +24.                    
               10  FILLER  PIC X(30) VALUE 'PRE-PAID PROJ SHR CREDIT'.  
                                                                        
       01  WS-LPC-RATES.                                                
ACT234     05  WS-NONUTIL-LPC-RATE        PIC S9(4)V9(5).               
ACT234     05  WS-NONUTIL-LPC-RATE-TOT    PIC S9(4)V9(5).               
ACT234     05  WS-UTIL-LPC-RATE           PIC S9(4)V9(5).               
ACT234     05  WS-UTIL-LPC-RATE-TOT       PIC S9(4)V9(5).               
       01  WS-PYMTS-START-END                PIC X(10).                 
T16974 01  WS-ACCOUNT-NO                     PIC S9(13)V COMP-3 VALUE 0.
T16974 01  WS-CODE-UTIL-TYPE                 PIC X(01).                 
T16974 01  WS-IC-NO                          PIC S9(04) COMP.           
       01  WS-CCYYMM-DATE                    PIC 9(09).                 
       01  WS-CCYYMM-DATE-RED                                           
           REDEFINES WS-CCYYMM-DATE.                                    
           05  FILLER                      PIC X(03).                   
           05  WS-CC-CCYYMM-DATE           PIC 9(02).                   
           05  WS-YY-CCYYMM-DATE           PIC 9(02).                   
           05  WS-MM-CCYYMM-DATE           PIC 9(02).                   
      /                                                                 14360000
COB305 01 WS-TAX-RATE-ST        PIC S9V9(04) COMP-3 VALUE 0.        
COB305 01 WS-TAX-RATE-CALC-ST        PIC S9V9(04) COMP-3 VALUE 0.        
COB305 01 WS-TAX-RATE-CNTY        PIC S9V9(04) COMP-3 VALUE 0.        
COB305 01 WS-GL-ACCT-NO-ST        PIC 9(3)V9(4) COMP-3 VALUE 0.        
COB305 01 WS-GL-ACCT-NO-CNTY        PIC 9(3)V9(4) COMP-3 VALUE 0.        
P00794 01  WS-PSNC-TAX-DATA-ARRAY.                                      
P00794     03 WS-PSNC-TAX-DATA  OCCURS 1000 TIMES                       
                  INDEXED BY WS-PSNC-TAX-DATA-INDX.                     
P00794        05  WS-TAX-CNTRL-NO             PIC S9(04)    COMP.       
P00794        05  WS-DETAIL-ID                PIC X(03).                
COB305        05 WS-TAX-RATE        PIC S9V9(04) COMP-3 VALUE 0.     
COB305        05 WS-GL-ACCT-NO        PIC 9(3)V9(4) COMP-3 VALUE 0.     
I01687 01  WS-LPC-ASSESSED                 PIC X(01) VALUE 'N'.         
                                                                        
                                                                        
       01  WS-REBILL-WORK-ARRAY.                                        
           03  WS-REBILL-ENTRY                                          
T16972            OCCURS 48 TIMES                                       
                  INDEXED BY WS-RE-INDX.                                
               05  WS-RE-DATE-BILLED       PIC X(10).                   
COB305         05 WS-RE-BACKOUT-AMT        PIC S9(9)V99 COMP-3 VALUE 0.         
COB305         05 WS-RE-REBILL-AMT        PIC S9(9)V99 COMP-3 VALUE 0.         
               05  WS-RE-CODE-UTIL-TYPE    PIC X(1).                    
ACT059 01  WS-ONE-TIME-CNT-TXT.                                         
ACT059     05  FILLER                      PIC  X(44) VALUE             
ACT059         'ONE-TIME CHARGE CONTRACT CLOSED BY BILLING: '.          
ACT059     05  WS-ONE-TIME-CNT-ID          PIC  9(11).                  
      /                                                                 14450000
PCR072** WORKING STORAGE FOR DB2 AND CICS ERROR PROCESSING              14460000
           COPY CWS00303.                                               14470000
      /                                                                 14480000
           EXEC SQL                                                     14490000
              INCLUDE SQLCA                                             14500000
           END-EXEC.                                                    14510000
                                                                        
      /***** WORKING STORAGE FOR PAYMENT JOURNAL                        14580000
=====> COPY CJF00101.                                                   14590000
=====> COPY CJF00105.                                                   14600000
      /                                                                 14610000
PCR072** DCLGEN FOR CSS_GUARANTOR                                       14620000
           EXEC SQL                                                     14630000
              INCLUDE TBGTNTR                                           14640000
           END-EXEC.                                                    14650000
                                                                        
T11910** DCLGEN FOR CSS_ACCOUNT                                         14670000
T11910     EXEC SQL                                                     14680000
T11910        INCLUDE TBACCT                                            14690000
T11910     END-EXEC.                                                    14700000
                                                                        
T16974*  DCLGEN FOR CSS_CUST_PLAN                                       14720000
T16974     EXEC SQL                                                     14730000
T16974        INCLUDE TBCSTPLN                                          14740000
T16974     END-EXEC.                                                    14750000
                                                                        
PCR072** DCLGEN FOR CSS_MT_TRN_HST_DET                                  14770000
           EXEC SQL                                                     14780000
              INCLUDE TBMNHDT                                           14790000
           END-EXEC.                                                    14800000
                                                                        
PCR072** DCLGEN FOR CSS_MNT_TRANS_HIST                                  14820000
           EXEC SQL                                                     14830000
              INCLUDE TBMNHIST                                          14840000
           END-EXEC.                                                    14850000
                                                                        
PCR072** DCLGEN FOR CSS_CONTRACT                                        14870000
           EXEC SQL                                                     14880000
              INCLUDE TBCNTRCT                                          14890000
           END-EXEC.                                                    14900000
                                                                        
PCR072** DCLGEN FOR CSS_CONTRACT_INFO                                   14920000
           EXEC SQL                                                     14930000
              INCLUDE TBCNTINF                                          14940000
           END-EXEC.                                                    14950000
                                                                        
C26130/****** CSS_UTIL_ENVRNMT                                          14970000
C26130     EXEC SQL                                                     14980000
C26130          INCLUDE TBUTLENV                                        14990000
C26130     END-EXEC.                                                    15000000
C26130/****** CSS_BANK_EFT                                              15010000
C26130     EXEC SQL                                                     15020000
C26130          INCLUDE TBBNKEFT                                        15030000
C26130     END-EXEC.                                                    15040000
C26130/****** CSS_CREDIT_PROFILE                                        15050000
C26130     EXEC SQL                                                     15060000
C26130          INCLUDE TBCRPROF                                        15070000
C26130     END-EXEC.                                                    15080000
PCR072** DCLGEN FOR CSS_LOCAL_OFFICE                                    15090000
PCR212     EXEC SQL                                                     15100000
PCR212        INCLUDE TBLOCOFC                                          15110000
PCR212     END-EXEC.                                                    15120000
                                                                        
PCR072** DCLGEN FOR CSS_AR_PMT_PRTY                                     15140000
PCR072     EXEC SQL                                                     15150000
PCR072        INCLUDE TBARPMT                                           15160000
PCR072     END-EXEC.                                                    15170000
                                                                        
PCR393** DCLGEN FOR CSS_DELINQUENCY                                     15190000
PCR393     EXEC SQL                                                     15200000
PCR393        INCLUDE TBDELQ                                            15210000
PCR393     END-EXEC.                                                    15220000
      *                                                                 15230000
T14478** DCLGEN FOR CSS_AR_TRN_HST_DET                                  15240000
T14478     EXEC SQL                                                     15250000
T14478         INCLUDE TBARHDT                                          15260000
T14478     END-EXEC.                                                    15270000
      *                                                                 15280000
T14478** DCLGEN FOR CSS_AR_TRANS_HIST                                   15290000
T14478     EXEC SQL                                                     15300000
T14478         INCLUDE TBARHIST                                         15310000
T14478     END-EXEC.                                                    15320000
      *                                                                 15330000
                                                                        
                                                                        
T20173** DCLGEN FOR CSS_LANDLORD                                        15360000
T20173     EXEC SQL                                                     15370000
T20173       INCLUDE TBLNDLRD                                           15380000
T20173     END-EXEC.                                                    15390000
C28085*                                                                 15450000
C28085* DCLGEN FOR CSS_REG_PROFILE                                      15460000
C28085     EXEC SQL                                                     15470000
C28085        INCLUDE TBREGPRF                                          15480000
C28085     END-EXEC.                                                    15490000
C28085*                                                                 15500000
C28085* DCLGEN FOR CSS_MKT_XREF_ACCT                                    15510000
C28085     EXEC SQL                                                     15520000
C28085        INCLUDE TBMRKXR                                           15530000
C28085     END-EXEC.                                                    15540000
C28085*                                                                 15550000
C28085* DCLGEN FOR CSS_AR_CNTL                                          15560000
C28085     EXEC SQL                                                     15570000
C28085        INCLUDE TBARCNTL                                          15580000
C28085     END-EXEC.                                                    15590000
T33192* DCLGEN FOR CSS_MNICPLTY_CNTY                                    15600000
T33192     EXEC SQL                                                     15610000
T33192        INCLUDE TBMNCCTY                                          15620000
T33192     END-EXEC.                                                    15630000
C34569* DCLGEN FOR CSS_ACCT_RTPK_AGR                                    15640000
C34569      EXEC SQL                                                    15650000
C34569        INCLUDE TBACCTRG                                          15660000
C34569      END-EXEC.                                                   15670000
C34569* DCLGEN FOR CRM_RT_PKG_OPTION                                    15680000
C34569      EXEC SQL                                                    15690000
C34569        INCLUDE TBRTPKGO                                          15700000
C34569      END-EXEC.                                                   15710000
C34569*                                                                 15720000
A35967* DCLGEN FOR CSS_RATE_TOU_DEF                                     15730000
A35967     EXEC SQL                                                     15740000
A35967        INCLUDE TBRTTOUD                                          15750000
A35967     END-EXEC.                                                    15760000
A35967*                                                                 15770000
A35967* DCLGEN FOR CSS_RATE_CREATOR                                     15780000
A35967     EXEC SQL                                                     15790000
A35967        INCLUDE TBRTCRTR                                          15800000
A35967     END-EXEC.                                                    15810000
A35967*                                                                 15820000
P00251*                                                                 15821000
P00251* DCLGEN FOR CSS_RATE_COMP_DEF                                    15822000
P00251     EXEC SQL                                                     15823000
P00251        INCLUDE TBRTCDEF                                          15824000
P00251     END-EXEC.                                                    15825000
P00251*                                                                 15826000
ACT109* DCLGEN FOR CSS_BUDGET_HIST                                      15822000
ACT109     EXEC SQL                                                     15823000
ACT109        INCLUDE TBBGTHST                                          15824000
ACT109     END-EXEC.                                                    15825000
ACT109                                                                  
P00794* DCLGEN FOR CSS_TAX_RATE  TR                                     15822000
P00794     EXEC SQL                                                     15823000
P00794        INCLUDE TBTXRATE                                          15824000
P00794     END-EXEC.                                                    15825000
P00794                                                                  
           EXEC SQL                                                     
              DECLARE GUARANTOR_CURSOR CURSOR FOR                       
              SELECT AMOUNT_GUARANTEED,                                 
                     CNT_ITEM_ID,                                       
                     GUARNTR_ACCT_NO,                                   
                     GUAR_STATUS_CD,                                    
T15481               GUAR_STATUS_REASON,                                
T15481               LAST_UPDATE_TS,                                    
                     ADDRESS_ID,                                        
                     SERVICE_TYPE_CD                                    
              FROM CSS_GUARANTOR                                        
              WHERE ACCOUNT_NO     = :GU-ACCOUNT-NO                     
                AND GUAR_STATUS_CD = 'A'                                
              FOR UPDATE OF GUAR_STATUS_CD,                             
T15481                      GUAR_STATUS_REASON,                         
T15481                      LAST_UPDATE_TS                              
           END-EXEC.                                                    
      *                                                                 16000000
C26130     EXEC SQL                                                     
C26130        DECLARE DELINQUENCY-CSR CURSOR FOR                        
C26130           SELECT DELINQ_CD,                                      
C26130                  DELINQ_VALUE,                                   
C26130                  COMPANY_NO                                      
C26130             FROM CSS_DELINQUENCY                                 
C26130             WHERE DELINQ_CD IN ('EPP-OFFER-REV-MTH',             
C26130                                 'EPP-OFFER-GAS-MTH1',            
C26130                                 'EPP-OFFER-GAS-MTH2',            
C26130                                 'EPP-OFFER-GAS-MTH3',            
C26130                                 'EPP-OFFER-GAS-MTH4',            
C26130                                 'EPP-OFFER-GAS-MTH5',            
C26130                                 'EPP-OFFER-GAS-MTH6',            
C26130                                 'EPP-OFFER-GAS-MTH7',            
C26130                                 'EPP-OFFER-GAS-MTH8',            
C26130                                 'EPP-OFFER-GAS-MTH9',            
C26130                                 'EPP-OFFER-GAS-MTH10',           
C26130                                 'EPP-OFFER-GAS-MTH11',           
C26130                                 'EPP-OFFER-GAS-MTH12',           
C26130                                 'AMT-ARREARS',                   
C26130                                 'AMT-LPC-MIN-CHG',               
ACT234                                 'AMT-LPC-MIN-BALANCE',           
ACT234                                 'LPC-RATE-UTIL',                 
ACT234                                 'LPC-RATE-NONUTIL')              
C26130           ORDER BY COMPANY_NO,                                   
C26130                    DELINQ_VALUE                                  
C26130     END-EXEC.                                                    
C26130*                                                                 16270000
T14478     EXEC SQL                                                     
T14478        DECLARE TRN_HST_DET_CURSOR CURSOR FOR                     
T14478         SELECT AMT_POSTED                                        
T14478           FROM CSS_AR_TRN_HST_DET                                
T14478          WHERE ACCOUNT_NO        = :AU-ACCOUNT-NO                
T14478            AND TRANS_HIST_SEQ_NO = CIS.CHAR2TIMESTAMP(
                                                  :AU-TRANS-HIST-SEQ-NO
              )         
T14478            AND GL_ACCT_CREDIT    = :AU-GL-ACCT-CREDIT            
T14478            AND GL_ACCT_DEBIT     = :AU-GL-ACCT-DEBIT             
T14478     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ054
MFA-TR*    EXEC SQL                                                     16280000
MFA-TR*       DECLARE TRN_HST_DET_CURSOR CURSOR FOR                     16290000
MFA-TR*        SELECT AMT_POSTED                                        16300000
MFA-TR*          FROM CSS_AR_TRN_HST_DET                                16310000
MFA-TR*         WHERE ACCOUNT_NO        = :AU-ACCOUNT-NO                16320000
MFA-TR*           AND TRANS_HIST_SEQ_NO = :AU-TRANS-HIST-SEQ-NO         16330000
MFA-TR*           AND GL_ACCT_CREDIT    = :AU-GL-ACCT-CREDIT            16340000
MFA-TR*           AND GL_ACCT_DEBIT     = :AU-GL-ACCT-DEBIT             16350000
MFA-TR*    END-EXEC.                                                    16360000
                                                                        
P00794**   STATE TAX (12) AND COUNT TAX(71)                             16280000
P00794     EXEC SQL                                                     
P00794        DECLARE PSNC-TAX-RATES CURSOR FOR                         
P00794         SELECT TR.TAX_CNTRL_NO                                   
P00794              , TR.DETAIL_ID                                      
P00794              , TR.TAX_RATE                                       
P00794           FROM CSS_TAX_RATE TR WITH(READUNCOMMITTED)                     
P00794          WHERE TR.TAX_CNTRL_NO IN (12,71)                        
P00794            AND TR.DATE_FROM  <= CAST(SYSDATETIMEOFFSET() AS DATE)        
P00794            AND TR.DATE_TO    >= CAST(SYSDATETIMEOFFSET() AS DATE)        
P00794            AND EXISTS (SELECT TOP(1) 1                                  
P00794                        FROM CSS_LOCOFF_REVDIST T4
                           WITH(READUNCOMMITTED)                
P00794                        WHERE T4.COMPANY_NO      = '26'           
P00794                        AND   T4.REV_DISTRICT_CD = TR.DETAIL_ID   
P00794                        )                     
P00794            FOR READ ONLY                                 
P00794     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ004
MFA-TR* MSQ020
MFA-TR* MSQ022
MFA-TR* MSQ028
MFA-TR*    EXEC SQL                                                     16280000
MFA-TR*       DECLARE PSNC-TAX-RATES CURSOR FOR                         16290000
MFA-TR*        SELECT TR.TAX_CNTRL_NO                                   16300000
MFA-TR*             , TR.DETAIL_ID                                      16300000
MFA-TR*             , TR.TAX_RATE                                       16300000
MFA-TR*          FROM CSS_TAX_RATE TR                                   16310000
MFA-TR*         WHERE TR.TAX_CNTRL_NO IN (12,71)                        16320000
MFA-TR*           AND TR.DATE_FROM  <= CURRENT DATE                     16330000
MFA-TR*           AND TR.DATE_TO    >= CURRENT DATE                     16340000
MFA-TR*           AND EXISTS (SELECT 1                                  16350000
MFA-TR*                       FROM CSS_LOCOFF_REVDIST T4                16350000
MFA-TR*                       WHERE T4.COMPANY_NO      = '26'           16350000
MFA-TR*                       AND   T4.REV_DISTRICT_CD = TR.DETAIL_ID   16350000
MFA-TR*                       FETCH FIRST ROW ONLY)                     16350000
MFA-TR*           FOR FETCH ONLY WITH UR                                16350000
MFA-TR*    END-EXEC.                                                    16360000
      /                                                                 16370000
       LINKAGE SECTION.                                                 
       COPY CWS0024B.                                                   16390000
PCR072/***** WORKING STORAGE LAYOUT FOR QSAM FILE FCSBE00               16400000
CWSCHG COPY CWS1000A.                                                   16410000
CWSCHG COPY CWS1000B.                                                   16420000
PCR072/***** WORKING STORAGE LAYOUT FOR QSAM FILE FCSBE01               16430000
CWSCHG COPY CWS1001A.                                                   16440000
CWSCHG COPY CWS1001B.                                                   16450000
      /*****   GL-NUMBERS TABLE                                         16460000
       COPY CWS00061.                                                   16470000
                                                                        
      /                                                                 16490000
TF1    01  WS-FIODB07.                                                  
COB305     05 WS-FDB07-ACCT-NO        PIC S9(13) COMP-3 VALUE 0.      
           05  WS-FDB07-PROCESS-CONTROL.                                
               10  WS-ON-OFF-CYCLE-IND          PIC X(1).               
                   88  WS-OFF-CYCLE-FINAL        VALUE 'B'.             
                   88  WS-OFF-CYCLE-REBILL       VALUE 'O'.             
                   88  WS-ON-CYCLE-BILL          VALUE 'A'.             
TP4569             88  WS-OFF-CYCLE-ACCT-TRANS   VALUE 'T'.             
TF1            10  WS-SINGLE-ITEM-BILL-IND      PIC X(1).               
TF1                88  WS-SINGLE-ITEM-BILL       VALUE 'S'.             
               10  WS-MASTER-ACCOUNT-IND        PIC X(1).               
                   88  WS-MASTER-ACCOUNT         VALUE 'M'.             
               10  WS-REFUND-CONTROL-IND        PIC X(1).               
                   88  WS-PROCESS-REFUND         VALUE 'R'.             
               10  WS-GUARANTEE-TRANSFER-IND    PIC X(1).               
                   88  WS-TRANSFER-GUARANTEE     VALUE 'E'.             
                   88  WS-TRANSFER-GUARANTOR     VALUE 'G'.             
           05  WS-FDB07-NO-BILL-CYCLES          PIC S9(4) COMP.         
TF1        05  WS-FDB07-PYMT-PRIORITY-LVL       PIC S9(4) COMP.         
TF1        05  WS-FDB07-ITEM-ID                 PIC S9(9) COMP.         
TP2341     05  WS-FDB07-CREDIT-LETTER-IND       PIC X(01).              
P00166     05  WS-FDB07-BARCODE-UNIQUE-ID       PIC X(09).              
P00166     05  WS-PROCESS-UNIQUE-ID-FL          PIC X(01) VALUE 'N'.    
P00166         88 WS-PROCESS-UNIQUE-ID                    VALUE 'Y'.    
P00166         88 WS-DO-NOT-PROCESS-UNIQUE-ID             VALUE 'N'.    
      /**                                                               16720000
       01  WS-HOLD-WK03.                                                
COB305     03 WS-WK03-TOTAL-AR-BAL        PIC S9(9)V99 COMP-3 VALUE 0.        
           03  WS-WK03-COUNT                PIC S9(4) COMP.             
           03  WS-HOLD-WK03-DATA            PIC X(220)                  
T13536            OCCURS 5000 TIMES                                     
                  INDEXED BY WK03-INDX.                                 
      /**                                                               16790000
                                                                        
       01  WS-LOCAL-OFFICE-REVENUE-TABLE.                               
           05  WS-LO-BILL-ISSUE-DATE       PIC X(10).                   
           05  WS-LOC-OFFICE-REVENUE-RECORD                             
                  OCCURS 100 TIMES                                      
                  INDEXED BY WS-LO-REV-INDX.                            
               10  WS-LO-COMPANY-NO        PIC X(2).                    
               10  WS-LO-OFFICE-NO         PIC 9(3).                    
COB305         10 WS-LO-TOT-NEW-REVENUE        PIC S9(09)V99 COMP-3 
COB305           VALUE 0.        
                                                                        
       01  WS-LOCAL-AND-TOTAL-ACCUM-TABLE.                              
           05  WS-LOCAL-ACCUMULATORS-DATA                               
                  OCCURS 100 TIMES                                      
                  INDEXED BY WS-LO-INDX.                                
               10  WS-LO-ACCUM-COMPANY-NO       PIC X(2).               
               10  WS-LO-ACCUM-LOCAL-OFFICE     PIC 9(3).               
               10  WS-LOCAL-OFFICE-CONTROL.                             
                   15  WS-MISC-ENTRY-TYPES            PIC X(9)          
                          OCCURS 20 TIMES                               
                          INDEXED BY WS-MT-INDX.                        
                   15  WS-REV-CLS-CODE                PIC X(3)          
                          OCCURS 50 TIMES                               
                          INDEXED BY WS-RC-INDX.                        
               10  WS-LOCAL-OFFICE-ACCUM.                               
                   15  WS-SUMMARY-REVENUE.                              
COB305                 20 WS-UTIL-ELEC-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTIL-GAS-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-TAX-ELEC-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-TAX-GAS-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-FAC-ELEC-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-FAC-GAS-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-INT-ELEC-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-INT-GAS-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-CNT-ELEC-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-CNT-GAS-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
                   15  WS-SUMMARY-BY-SOURCE.                            
COB305                 20 WS-ENERGY-ELEC-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-ENERGY-GAS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-DEMAND-ELEC-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-DEMAND-GAS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-BFC-ELEC-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-BFC-GAS-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-SFC-ELEC-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-SFC-GAS-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-FUEL-COST-ELEC-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-FUEL-COST-GAS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-WNA-DOLLARS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
                       20  WS-MISC-ENTRY-ACCUM                          
                              OCCURS 20 TIMES                           
                              INDEXED BY WS-MA-INDX.                    
COB305                     25 WS-MISC-ELEC-ACCUM        PIC S9(9)V99 
COB305                       COMP-3 VALUE 0. 
COB305                     25 WS-MISC-GAS-ACCUM        PIC S9(9)V99 
COB305                       COMP-3 VALUE 0. 
COB305                 20 WS-STATE-TAX-ELEC-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-STATE-TAX-GAS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-FRANCHISE-ELEC-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-FRANCHISE-GAS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-INTEREST-ELEC-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-INTEREST-GAS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-SRV-CNTR-ELEC-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
COB305                 20 WS-SRV-CNTR-GAS-ACCUM        PIC S9(9)V99 
COB305                   COMP-3 VALUE 0. 
                   15  WS-SUMMARY-BY-REV-CLS.                           
                       20  WS-REV-CLS-ACCUM                             
                              OCCURS 50 TIMES                           
                              INDEXED BY WS-RA-INDX.                    
COB305                     25 WS-MISC-ELEC-ACCUM        PIC S9(9)V99 
COB305                       COMP-3 VALUE 0. 
COB305                     25 WS-MISC-GAS-ACCUM        PIC S9(9)V99 
COB305                       COMP-3 VALUE 0. 
                   15  WS-SUMMARY-BY-AR-TYPE.                           
COB305                 20 WS-NSC-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSC-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSC-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSC-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSA-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSA-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSA-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSA-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSN-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSN-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSN-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-NSN-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPC-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPC-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPC-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPC-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPN-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPN-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPN-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-LPN-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTE-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTE-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTE-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTE-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTG-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTG-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTG-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-UTG-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-EPP-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-EPP-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-EPP-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-EPP-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-RCC-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-RCC-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-RCC-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-RCC-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
T8894                  20  FILLER                  PIC  X(12).          
COB305                 20 WS-DEP-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-DEP-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-DEP-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-DEP-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-DFA-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-DFA-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-DFA-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-DFA-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-CNT-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-CNT-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-CNT-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-CNT-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-PJS-NEW-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-PJS-CUR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-PJS-ARR-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305                 20 WS-PJS-BAL-ACCUM        PIC S9(9)V99 COMP-3 
COB305                   VALUE 0. 
COB305 01 WS-HOLD-AMT-POSTED        PIC S9(09)V99 COMP-3 VALUE 0.
T17883 01  WS-CALC-EPP-ANNIV-FLG                   PIC X(01).           
COB305 01 WS-DPP-AMOUNT-DELINQ        PIC S9(09)V99 COMP-3 VALUE 0.
      /                                                                 18030000
       PROCEDURE DIVISION USING LS-PCSCA100-COMM-AREA                   
TF1                             WS-FIODB07                              
                                WS-CUSTOMER-CU                          
                                WS-CUST-PREM-HIST-CH                    
                                WS-ACCOUNT-AT                           
                                WS-PREMISE-PR                           
                                WS-DEP-ON-HAND-DO                       
                                WS-BILLING-BI                           
                                WS-BILLING-BG                           
KMG                             WS-UNMTRD-CNSMPTN-UC                    
                                WS-AR-CNTRL-AC                          
                                WS-BUDGET-PLAN-BU                       
                                WS-CONNECT-CHRG-CC                      
                                WS-DFA-ACCT-DA                          
                                WS-DFA-RECV-DV                          
                                WS-DEP-REQ-DR                           
                                WS-CONTRACT-CT                          
                                WS-PROJECT-SHARE-PJ                     
                                WS-CREDIT-PROFILE-CZ                    
                                WS-BILLING-WQ-ITEMS-WF                  
                                WS-GL-NAME-INFO                         
                                WS-GL-ACCT-NO-TABLE                     
                                WS-GL-ACCT-MAJOR-FIELDS                 
                                WS-LOCAL-OFFICE-REVENUE-TABLE           
                                WS-LOCAL-AND-TOTAL-ACCUM-TABLE          
                                WS-CHRG-OFF-CO                          
                                WS-HOLD-WK03                            
      ** THE FOLLOWING WERE ADDED TO ALLOW CALL TO SCSCA112 FROM 108    18330000
                                WS-BILL-CALC-DETAIL                     
                                WS-BILL-ADJUST-DETAIL                   
                                WS-CNSMPTN-HIST-CX                      
                                WS-FIXED-FCTR-HIST-FH                   
                                WS-BILL-CONTRACT-BK                     
                                WS-CUST-PLAN-TABLE-CP                   
                                WS-FIXED-FCTR-TABLE-FF                  
                                WS-BILL-CNTR-HIST-BX                    
                                WS-PEAK-HIST-PH                         
                                WS-INTERRUPT-ACCT-IP                    
                                WS-INTERRUPT-IR                         
                                WS-UTILITY-TABLE-UT                     
                                WS-REGISTER-READ-TABLE-RG               
                                WS-MTRD-ENVRNMT-TABLE-MN                
                                WS-MTR-CAP-TABLE-MC                     
                                WS-12-MONTH-DATA-EPP                    
                                WS-STANDBY-GEN-SE                       
                                WS-REFUND-RN                            
PCR294                          WS-CONTRACT-DETAIL-TABLE-EA             
T17777                          WS-HOLD-AMT-POSTED                      
T17883                          WS-CALC-EPP-ANNIV-FLG                   
T19214                          WS-CRED-COLL-CL                         
C34569                          WS-DPP-AMOUNT-DELINQ                    
C34569                          WS-ACCT-RTPK-AGR-DF                     
C34569                          WS-BI-FIXED-FCTR-FF                     
C34569                          WS-BILL-DET-BT                          
C34569                          WS-BILL-ADJUSTMNT                       
I00177                          WS-CWS1000B-MAX-TBL-LIMITS              
I00177                          WS-CWS1001B-MAX-TBL-LIMITS              
P00453                          WS-PREPAY-HIST-PK                       
P00496                          WS-BILL-BSLN-CNTR-LN                    
P00496                          WS-BILL-BSLN-HIST-LO                    
P00496                          WS-UTL-BILL-REL-TABLE-UR                
VKSACT                          WS-INTERRUPT-NZ                         
P00496                          WS-CNSMPTN-HOURLY                       
I01687                          WS-ACCT-ATTRIBUTE-YP.                   
                                                                        
       1000-PRICE-OTHER-RECEIVABLES.                                    
P00097     INITIALIZE WS-SQL-ERROR-TXT-WQ.                              
           PERFORM 1001-INITIALIZE THRU 1001-EXIT                       
                                                                        
T23642     IF SEB-DATABASE                                              
T23642        IF WS-ON-OFF-CYCLE-IND = 'O'                              
T23642           DISPLAY 'SCSCA108 - ACCT # : ' WS-ACCOUNT-NO-AT        
T23642                   ' LS-TGD : '   LS-TOTAL-GAS-DOLLARS            
T23642                   ' LS-BBOGD : ' LS-BILL-BACK-OUT-GAS-DOLLARS    
T23642        END-IF                                                    
T23642     END-IF.                                                      
                                                                        
T14446     IF NOT WS-BILL-CORRECTION                                    
T12173          AND WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP             
              MOVE WS-DATE-BILL-DAY-60-AT TO WS-DATE-BILL-DAY-90-AT     
              MOVE WS-DATE-BILL-DAY-30-AT TO WS-DATE-BILL-DAY-60-AT     
              MOVE WS-DATE-BILL-DAY-00-AT TO WS-DATE-BILL-DAY-30-AT     
              MOVE WS-CANREB-CODE-60-DAY-AT TO WS-CANREB-CODE-90-DAY-AT 
              MOVE WS-CANREB-CODE-30-DAY-AT TO WS-CANREB-CODE-60-DAY-AT 
              MOVE WS-CANREB-CODE-00-DAY-AT TO WS-CANREB-CODE-30-DAY-AT 
              MOVE SPACE                    TO WS-CANREB-CODE-00-DAY-AT 
              PERFORM 2030-AGE-RECEIVABLES      THRU 2030-EXIT          
                  VARYING WS-AR-DATA-INDX FROM 1 BY 1                   
P00097              UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY             
                       OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO     
              MOVE LS-INPUT-DATE TO WS-DATE-BILL-DAY-00-AT              
                                                                        
T34776         IF LS-TOTAL-GAS-DOLLARS < 0                              
SATISH            AND (WS-CODE-BUDGET NOT = WS-CODE-USED)               
P00453            AND (WS-CODE-PRE-PAY-PLAN NOT = WS-CODE-USED)         
P00097            IF WS-UTG-AR-INDX < WS-AC-MAX-ENTRY                   
T34776                SET WS-AR-DATA-INDX TO WS-UTG-AR-INDX             
T34776            ELSE                                                  
T34776               PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1        
T34776                 UNTIL  WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO 
T34776               END-PERFORM                                        
T34776               MOVE WS-ACCOUNT-NO-AT   TO                         
T34776                          WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)      
T34776               MOVE +45 TO                                        
T34776                      WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)   
T34776               MOVE 0   TO WS-ITEM-ID-AC (WS-AR-DATA-INDX)        
T34776               MOVE 'I' TO                                        
T34776                     WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)    
T34776               MOVE WS-CODE-USED TO WS-CODE-UTL                   
T34776               SET WS-UTG-AR-INDX  TO WS-AR-DATA-INDX             
T34776            END-IF                                                
T34776         END-IF                                                   
ACT002         IF LS-TOTAL-UTILITY-DOLLARS < 0                          
ACT002            AND (WS-CODE-BUDGET NOT = WS-CODE-USED)               
ACT002            AND (WS-CODE-PRE-PAY-PLAN NOT = WS-CODE-USED)         
ACT002            IF WS-UTE-AR-INDX < WS-AC-MAX-ENTRY                   
ACT002                SET WS-AR-DATA-INDX TO WS-UTE-AR-INDX             
ACT002            ELSE                                                  
ACT002               PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1        
ACT002                 UNTIL  WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO 
ACT002               END-PERFORM                                        
ACT002               MOVE WS-ACCOUNT-NO-AT   TO                         
ACT002                          WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)      
ACT002               MOVE +40 TO                                        
ACT002                      WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)   
ACT002               MOVE 0   TO WS-ITEM-ID-AC (WS-AR-DATA-INDX)        
ACT002               MOVE 'I' TO                                        
ACT002                     WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)    
ACT002               MOVE WS-CODE-USED TO WS-CODE-UTL                   
ACT002               SET WS-UTE-AR-INDX  TO WS-AR-DATA-INDX             
ACT002            END-IF                                                
ACT002         END-IF                                                   
           ELSE                                                         
T15026        IF WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP                
T15026           MOVE WS-DATE-BILL-DAY-60-AT TO WS-DATE-BILL-DAY-90-AT  
T15026           MOVE WS-DATE-BILL-DAY-30-AT TO WS-DATE-BILL-DAY-60-AT  
T15026           MOVE WS-DATE-BILL-DAY-00-AT TO WS-DATE-BILL-DAY-30-AT  
T15026           MOVE WS-CANREB-CODE-60-DAY-AT                          
T15026                                      TO WS-CANREB-CODE-90-DAY-AT 
T15026           MOVE WS-CANREB-CODE-30-DAY-AT                          
T15026                                      TO WS-CANREB-CODE-60-DAY-AT 
T15026           MOVE WS-CANREB-CODE-00-DAY-AT                          
T15026                                      TO WS-CANREB-CODE-30-DAY-AT 
T15026           MOVE SPACE                 TO WS-CANREB-CODE-00-DAY-AT 
                 PERFORM 2030-AGE-RECEIVABLES       THRU 2030-EXIT      
                     VARYING WS-AR-DATA-INDX FROM 1 BY 1                
P00097                 UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY          
                          OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO  
              END-IF                                                    
              MOVE LS-INPUT-DATE TO WS-DATE-BILL-DAY-00-AT              
T20794        IF WS-CODE-BUDGET NOT = WS-CODE-USED                      
P00453           AND WS-CODE-PRE-PAY-PLAN NOT = WS-CODE-USED            
T14861          PERFORM 2010-LOAD-REBILL-ARRAY        THRU 2010-EXIT    
T14861          PERFORM 2015-BACK-OUT-CANCEL          THRU 2015-EXIT    
T20794        END-IF                                                    
           END-IF                                                       
                                                                        
P00097     IF WS-UTE-AR-INDX < WS-AC-MAX-ENTRY                          
              SET WS-AR-DATA-INDX TO WS-UTE-AR-INDX                     
              COMPUTE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)        
                  = LS-TOTAL-UTILITY-DOLLARS                            
                    + LS-BILL-BACK-OUT-UTL-DOLLARS                      
           END-IF.                                                      
                                                                        
P00097     IF WS-UTG-AR-INDX < WS-AC-MAX-ENTRY                          
              SET WS-AR-DATA-INDX TO WS-UTG-AR-INDX                     
              COMPUTE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)        
                  = LS-TOTAL-GAS-DOLLARS                                
                    + LS-BILL-BACK-OUT-GAS-DOLLARS                      
           END-IF.                                                      
                                                                        
           PERFORM 2000-PROCESS-AR-CNTRL THRU 2000-EXIT                 
              VARYING WS-AR-DATA-INDX FROM 1 BY 1                       
P00097           UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY                
                    OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO.       
                                                                        
P00453     IF NO-BUD-AC AND WS-CODE-PRE-PAY-PLAN NOT = WS-CODE-USED     
                 AND (LS-TOTAL-UTILITY-DOLLARS NOT = ZERO               
                       OR LS-BILL-BACK-OUT-UTL-DOLLARS NOT = ZERO       
                       OR LS-TOTAL-GAS-DOLLARS NOT = ZERO               
                       OR LS-BILL-BACK-OUT-GAS-DOLLARS NOT = ZERO       
T12602                 OR WS-ACCOUNT-TYPE-CODE-AT = WS-DEADHEAD)        
              PERFORM 1010-CREATE-UTILITY-AR-CNTRL THRU 1010-EXIT       
           END-IF.                                                      
                                                                        
T8568 *    MOVED THE FOLLOWING IF STMT FROM THE BEGINNING OF THIS       19710000
T8568 *    PARAGRAPH.                                                   19720000
TF1        IF NOT WS-SINGLE-ITEM-BILL                                   
              PERFORM 1040-APPLY-NEW-CREDITS THRU 1040-EXIT             
           END-IF                                                       
                                                                        
T9627 *    MOVE LPC LOGIC AFTER CREDIT LOGIC                            19770000
           PERFORM 2020-COMPUTE-LPC-BASE     THRU 2020-EXIT             
              VARYING WS-AR-DATA-INDX FROM 1 BY 1                       
P00097           UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY                
                    OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO.       
                                                                        
T19198     PERFORM 2025-BK-OUT-CIA-FROM-BASE THRU 2025-EXIT.            
T9627      PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1                  
P00097             UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY              
T9627                   OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO    
TF1            IF NOT WS-SINGLE-ITEM-BILL                               
TF1                    OR (WS-SINGLE-ITEM-BILL                          
                          AND WS-FDB07-PYMT-PRIORITY-LVL                
                             = WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)
                          AND WS-FDB07-ITEM-ID                          
                              = WS-ITEM-ID-AC (WS-AR-DATA-INDX))        
T9627             PERFORM 2101-COMPUTE-DELIQUENT-CHARGES THRU 2101-EXIT 
               END-IF                                                   
CG0318      END-PERFORM                                                 
      *                                                                         
      ****************************************************************  20150000
      *    COMPUTE THE PERCENTAGE OF ELECTRIC FOR THE ACCOUNT.       *  20160000
      ****************************************************************  20170000
T17189     IF WS-MST-SUB-ACCT-IND-AT NOT = WS-MASTER                    
T20006       IF NOT WS-BILL-CORRECTION                                  
T20006        AND WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP               
PCR212         IF HAS-ELE-AC AND HAS-GAS-AC                             
A35648            MOVE WS-COMPANY-NO-AT   TO B1-COMPANY-NO              
A35648            MOVE WS-LOCAL-OFFICE-AT TO B1-LOCAL-OFFICE            
A35648            PERFORM 7400-SELECT-LOCOFC-FIX-FACTOR                 
A35648               THRU 7400-EXIT                                     
A35648            IF B1-DISTRICT-NO = 'GAS'                             
A35648              MOVE 'G' TO WS-LOC-OFF-CHECK                        
A35648            ELSE                                                  
A35648              MOVE 'C' TO WS-LOC-OFF-CHECK                        
PCR212              MOVE ZERO TO WS-ELEC-REV-ALLOC-PCT-AT               
PCR212              COMPUTE WS-TOTAL-UTIL-ARREARS =                     
PCR212                       WS-UTE-ARREARS + WS-UTG-ARREARS            
T9463                      + WS-DPP-ELEC-ARREARS + WS-DPP-GAS-ARREARS   
T9463                 IF (WS-UTE-ARREARS > ZERO OR                      
                          WS-DPP-ELEC-ARREARS > 0) AND                  
T9463                    (WS-UTG-ARREARS > ZERO OR                      
                           WS-DPP-GAS-ARREARS > 0)                      
PCR212                  COMPUTE WS-ELEC-REV-ALLOC-PCT-AT ROUNDED        
T9463                    = ((WS-UTE-ARREARS + WS-DPP-ELEC-ARREARS) /    
PCR212                                  WS-TOTAL-UTIL-ARREARS) * 100    
PCR212                END-IF                                            
A35648            END-IF                                                
PCR212         END-IF                                                   
T20006       END-IF                                                     
PCR212     END-IF                                                       
           IF WS-SINGLE-ITEM-BILL                                       
                    OR WS-CODE-BILL-PEND-AT = WS-PEND-ASAP              
T5428             ADD WS-LPC-UTIL-ELIG-AFT-BILL-CALC TO                 
T5428                 WS-LPC-UTIL-XMT-AFT-BILL-CALC                     
T5428             ADD WS-LPC-NONUT-ELG-AFT-BILL-CALC TO                 
T5428                 WS-LPC-NONUT-XMT-AFT-BILL-CALC                    
                  MOVE ZERO TO WS-LPC-UTIL-ELIG-AFT-BILL-CALC           
                               WS-LPC-NONUT-ELG-AFT-BILL-CALC           
                               WS-LPC-UTIL-ELIG-BFR-BILL-CALC           
                               WS-LPC-NONUT-ELG-BFR-BILL-CALC           
           ELSE                                                         
I01687         IF WS-LPC-ASSESSED = 'Y' OR                              
I01687             (SEB-DATABASE AND                                    
I01687                (WS-CODE-CRED-ARNG = 'A' OR                       
I01687                 WS-CODE-STA-ACCT  = 'A')                         
I01687             )                                                    
I01687            CONTINUE                                              
I01687         ELSE                                                     
                  PERFORM 1050-APPLY-LPC THRU 1050-EXIT                 
I01687         END-IF                                                   
           END-IF                                                       
                                                                        
T11078*    IF THIS WAS THE ANNIVERSARY MONTH OF EPP, INCLUDE THE AR     20680000
T11078*    BUCKETS FOR ALL RECEIVABLES IN THE EPP OFFER AMOUNT FIELD    20690000
T11078     IF HAS-BUD-AC                                                
T11078        SET WS-AR-DATA-INDX TO 1                                  
T11078        SEARCH WS-AR-DATA                                         
T11078          AT END                                                  
T11078            CONTINUE                                              
T11078          WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = 0             
T11078            CONTINUE                                              
T11078          WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 50     
T11078             IF WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) > 0      
T11078                  PERFORM 1060-SET-EPP-OFFER-AMT THRU 1060-EXIT   
T11078             END-IF                                               
T11078        END-SEARCH                                                
T11078     END-IF                                                       
                                                                        
PCR072     IF WS-APPLYING-CIA                                           
PCR072        MOVE WS-NO              TO WS-APPLYING-CIA-IND            
PCR072        MOVE ZEROES             TO WS-TOTAL-AR-BALANCE-AT         
PCR072        SET WS-AR-DATA-INDX     TO 1                              
PCR072        PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1               
P00097                  UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY         
PCR072                  OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO    
PCR072          COMPUTE WS-TOTAL-AR-BALANCE-AT = WS-TOTAL-AR-BALANCE-AT 
PCR072                      + WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
PCR072                      + WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)     
PCR072                      + WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)     
PCR072                      + WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)     
PCR072                      + WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)     
PCR072        END-PERFORM                                               
PCR072     ELSE                                                         
TF1           IF WS-SINGLE-ITEM-BILL                                    
                 COMPUTE WS-TOTAL-AR-BALANCE-AT                         
                     = WS-TOTAL-AR-BALANCE-AT                           
                       + WS-LPC-UTIL-ELIG-AFT-BILL-CALC                 
                       + WS-LPC-NONUT-ELG-AFT-BILL-CALC                 
                       + WS-LPC-UTIL-XMT-AFT-BILL-CALC                  
                       + WS-LPC-NONUT-XMT-AFT-BILL-CALC                 
              ELSE                                                      
                 COMPUTE WS-TOTAL-AR-BALANCE-AT                         
                     = WS-LPC-UTIL-ELIG-AFT-BILL-CALC                   
                       + WS-LPC-NONUT-ELG-AFT-BILL-CALC                 
                       + WS-LPC-UTIL-XMT-AFT-BILL-CALC                  
                       + WS-LPC-NONUT-XMT-AFT-BILL-CALC                 
              END-IF                                                    
PCR072     END-IF                                                       
                                                                        
           PERFORM 4000-UPDATE-BILL-CALC-TOTALS THRU 4000-EXIT.         
                                                                        
C26130     COMPUTE WS-TOTAL-ARREARS                                     
C26130         = LS-NONUTIL-ARREARS                                     
C26130         + LS-CONTRACT-ARREARS                                    
C26130         + LS-UTILITY-ARREARS.                                    
P00453*                                                                         
P00453     IF WS-CODE-PRE-PAY-PLAN = WS-CODE-USED                       
P00453        COMPUTE WS-BILLED-AMT-PK (WS-PK-INDX) =                   
P00453                 LS-CURR-UTL-CHARGES                              
P00453               + LS-CURR-CNT-CHARGES                              
P00453               + LS-CURR-NONUTL-CHARGES                           
P00453               + LS-UTILITY-ARREARS                               
P00453               + LS-NONUTIL-ARREARS                               
P00453               + LS-CONTRACT-ARREARS                              
P00453        IF WS-FIRST-ESTD-BILL-PK (WS-PK-INDX)                     
P00453*          SCSCA113 Populates this field for PRP Initial Bills    45550000
P00453           MOVE +0 TO WS-PLAN-ACCT-BAL-AM-PK (WS-PK-INDX)         
P00453        ELSE                                                      
P00453           COMPUTE WS-PLAN-ACCT-BAL-AM-PK (WS-PK-INDX) =          
P00453                   WS-TOTAL-AR-BALANCE-AT                         
P00453                 - WS-EST-BILL-AM-PK (WS-PK-INDX)                 
P00453        END-IF                                                    
P00453     END-IF.                                                      
P00453*                                                                 45550000
C26130     IF WS-CODE-BUDGET NOT = WS-CODE-USED                         
P00453        AND WS-CODE-PRE-PAY-PLAN NOT = WS-CODE-USED               
C27553        PERFORM 1065-CHECK-TRANSFERS      THRU 1065-EXIT          
C28085        MOVE 0                            TO WS-CREDIT-BALANCE    
C28085        MOVE WS-ACCOUNT-NO-AT             TO AC-ACCOUNT-NO        
C27553        PERFORM 7026-CHECK-CREDIT-BAL     THRU 7026-EXIT          
C28085        IF SEB-DATABASE                                           
C28085           MOVE 'N'                       TO WS-SEBR-ACCT         
C28085           MOVE WS-ACCOUNT-NO-AT          TO UT-ACCOUNT-NO        
C28085                                             LR-ACCOUNT-NO        
C28085           PERFORM 7019-SELECT-REG-PROFILE                        
C28085                                          THRU 7019-EXIT          
C28085        END-IF                                                    
C34569        IF SEB-DATABASE AND WS-REV-MTH-LST-NRML-AT > 0            
C34569           MOVE 'N'                       TO WS-FIXED-RATE        
C34569           PERFORM 1075-GET-RATE-TYPE     THRU 1075-EXIT          
C34569           IF WS-FIXED-RATE = 'Y' OR  WS-SEBR-ACCT = 'Y'          
C28085              CONTINUE                                            
C28085           ELSE                                                   
C28085              PERFORM 1070-EPP-OFFER-RULES THRU 1070-EXIT         
C28085           END-IF                                                 
C28085        ELSE                                                      
C26130           PERFORM 1070-EPP-OFFER-RULES   THRU 1070-EXIT          
C28085        END-IF                                                    
C26130     END-IF.                                                      
                                                                        
T21893*    CREDIT HISTORY LOGIC MOVED TO SCSCA110.                      21470000
T21893*    CREDIT GROUP MOVEMENT LOGIC MOVED TO SCSCA110.               21480000
                                                                        
           MOVE WS-CODES-DATA-PRESENT TO WS-CODES-DATA-PRESENT-AT       
                                                                        
           EXIT PROGRAM.                                                
                                                                        
       1000-EXIT.                                                       
           EXIT.                                                        
                                                                        
       1001-INITIALIZE.                                                 
ACT284     SET WS-GL-SUB  TO 1                                          
           MOVE ZERO TO RETURN-CODE                                     
T21893                  WS-DPP-AMOUNT-DELINQ.                           
           INITIALIZE PROGRAM-WORK-VARIABLES                            
                      WS-REBILL-WORK-ARRAY                              
T8620                 CJF00101                                          
P00694                WS-UTE-ARREARS                                    
P00694                WS-UTG-ARREARS                                    
P00694                WS-DPP-ELEC-ARREARS                               
P00694                WS-DPP-GAS-ARREARS                                
P00694                WS-TOTAL-UTIL-ARREARS.                            
                                                                        
           MOVE WS-CODES-DATA-PRESENT-AT TO WS-CODES-DATA-PRESENT       
T16366     MOVE 'N' TO WS-CIA-FOR-REBILL-SW.                            
T16366     MOVE 'N' TO WS-AR-TRN-CSR-OPN-SW.                            
T18278     MOVE 'N' TO WS-JOURNAL-SUMM-UNBILLED.                        
T18387     MOVE 'N' TO WS-DEP-ALREADY-REFUNDED.                         
T18424     MOVE 'N' TO WS-EARLY-PAYOFF-PROC-FLG.                        
T32429     MOVE 'N' TO  WS-CREDIT-CNT-APPLIED.                          
I01687     MOVE 'N' TO  WS-LPC-ASSESSED.                                
T18579     SET WS-EPP-WASH-NOT-JRNLED  TO TRUE.                         
T18579     SET WS-CREDIT-NOT-APPLIED TO TRUE.                           
                                                                        
           PERFORM 1030-SET-FOR-ACCUM THRU 1030-EXIT                    
           SET WS-THERE-IS-NO-UTL-LPC-AC                                
               WS-THERE-IS-NO-NONUT-LPC-AC TO TRUE                      
T12651     SET WS-NOT-FINAL-INSTALL                                     
T12651         WS-NOT-FINAL-INSTALL-EARLY TO TRUE.                      
T14446     SET WS-NOT-BILL-CORR TO TRUE.                                
           MOVE WS-NO TO WS-HAVE-UTL-DOLLARS-BEEN-USED                  
                         WS-HAVE-GAS-DOLLARS-BEEN-USED                  
T9791                    WS-ELEC-90-DAY-REBILL-SW                       
T9791                    WS-ELEC-60-DAY-REBILL-SW                       
T9791                    WS-ELEC-30-DAY-REBILL-SW                       
T9791                    WS-GAS-90-DAY-REBILL-SW                        
T9791                    WS-GAS-60-DAY-REBILL-SW                        
T9791                    WS-GAS-30-DAY-REBILL-SW.                       
                                                                        
           SET NO-BUD-AC                                                
               NO-ELE-AC                                                
               NO-GAS-AC                                                
T9791          WS-NOT-APPLYING-CIA                                      
T9791          NO-BUD-ELEC-SERVICE                                      
T9791          NO-BUD-GAS-SERVICE  TO TRUE.                             
T18486     SET WS-LPC-AC-NOT-CREATED                                    
T18486         WS-NOT-SUMM-UNBILLED                                     
T18486         NOT-WASH-LPC-JRNL                                        
T18486         NO-DISCONNECT-OCCURRED                                   
T18486         NOT-CREATE-CIA                                           
T18486         NO-LPC-JOURNAL                                           
T18486         WS-CIA-NOT-FOR-REBILL  TO TRUE.                          
                                                                        
           MOVE ZERO TO WS-CCYYMM-DATE                                  
           MOVE LS-INPUT-DATE (1:2) TO WS-CC-CCYYMM-DATE                
           MOVE LS-INPUT-DATE (3:2) TO WS-YY-CCYYMM-DATE                
           MOVE LS-INPUT-DATE (6:2) TO WS-MM-CCYYMM-DATE                
C26130     IF LS-CURR-REVENUE-MONTH NOT NUMERIC                         
C26130        MOVE LS-INPUT-DATE          TO  WS-REV-CCYYMM-TEMP        
C26130     ELSE                                                         
C26130        MOVE LS-CURR-REVENUE-MONTH  TO  WS-REV-CCYYMM-TEMP        
C26130     END-IF.                                                      
C26130     MOVE WS-REV-CCYY-TEMP        TO  WS-BH-DATE-CCYYY.           
C26130     MOVE WS-REV-MM-TEMP          TO  WS-BH-DATE-MM.              
           SET WS-CCC-INDX                                              
               WS-DFA-INDX                                              
               WS-DEP-REQ-INDX                                          
P00453         WS-PK-INDX                                               
ACT305         WS-CNT-DET-INDX                                          
               WS-CNT-INDX       TO 1.                                  
                                                                        
T17123     MOVE +1               TO WS-AR-HOLD-INDX.                    
                                                                        
           SET WS-UTE-AR-INDX                                           
P00097         WS-UTG-AR-INDX TO WS-AC-MAX-ENTRY                        
           PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1                  
P00097               UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY            
                        OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO    
              EVALUATE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)        
                 WHEN 40                                                
                    SET WS-UTE-AR-INDX TO WS-AR-DATA-INDX               
                 WHEN 45                                                
                    SET WS-UTG-AR-INDX TO WS-AR-DATA-INDX               
              END-EVALUATE                                              
           END-PERFORM                                                  
                                                                        
T14446*    DETERMINE IF THERE HAS BEEN A C/R, CREDIT ADJUST OR CANCEL   22350000
T14446     PERFORM VARYING WS-BILLING-INDX FROM 1 BY 1                  
T14446               UNTIL WS-BILLING-INDX > 30                         
T14446                  OR WS-ACCOUNT-NO-BG (WS-BILLING-INDX) = ZERO    
T14446        IF WS-DATE-ORIG-BILL-BG (WS-BILLING-INDX) > 0             
T15472         OR WS-ADJ-REASON-CD-BG (WS-BILLING-INDX) > SPACES        
KDFKDF         OR WS-CODE-BILL-CALC-BG (WS-BILLING-INDX) NOT = 'A'      
T14446           SET WS-BILL-CORRECTION TO TRUE                         
T14446        END-IF                                                    
T14446     END-PERFORM                                                  
                                                                        
           MOVE WS-CODES-DATA-PRESENT-AT TO WS-CODES-DATA-PRESENT.      
                                                                        
C26130     IF DW-NOT-LOADED                                             
C26130        PERFORM 1111-LOAD-DELINQUENCY-TABLE   THRU 1111-EXIT      
C26130        SET DW-LOADED TO TRUE                                     
C26130     END-IF.                                                      
C26130     IF WS-COMPANY-NO-AT NOT EQUAL WS-CURRENT-COMPANY             
C26130         PERFORM 8301-LOAD-ACC-DELINQ-VALUES THRU 8301-EXIT       
C26130     END-IF.                                                      
                                                                        
P00794     IF TAX-RATES-NOT-LOADED                                      
P00794        PERFORM 1114-LOAD-PSNC-TAX-RATES  THRU 1114-EXIT          
P00794        SET TAX-RATES-LOADED TO TRUE                              
P00794     END-IF.                                                      
                                                                        
I01687     PERFORM VARYING WS-ATTR-INDX FROM 1 BY 1                     
I01687       UNTIL WS-ATTR-INDX > 25                                    
I01687          OR WS-ACCOUNT-NO-YP (WS-ATTR-INDX) = 0                  
I01687            IF WS-ATTRIBUTE-DESC-YP(WS-ATTR-INDX)  = 'LPCASSESSED'
I01687               MOVE 'Y' TO WS-LPC-ASSESSED                        
I01687            END-IF                                                
I01687     END-PERFORM.                                                 
                                                                        
       1001-EXIT.                                                       
           EXIT.                                                        
      /                                                                 22620000
       1010-CREATE-UTILITY-AR-CNTRL.                                    
           SET WS-AR-DATA-INDX TO 1                                     
           SEARCH WS-AR-DATA                                            
              AT END                                                    
                 MOVE 'AR CONTROL TABLE OVERFLOW'                       
                   TO WS-MISC-MSG-TEXT                                  
                 MOVE +27 TO WS-MISC-MSG-LEN                            
T18829           MOVE 12 TO RETURN-CODE                                 
                 PERFORM 9910-MISC-ERROR THRU 9910-EXIT                 
              WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO            
                 CONTINUE                                               
           END-SEARCH.                                                  
                                                                        
           PERFORM VARYING WS-BILLING-INDX FROM 1 BY 1                  
                   UNTIL WS-BILLING-INDX > 30                           
                      OR WS-ACCOUNT-NO-BG (WS-BILLING-INDX) = ZERO      
              IF WS-CODE-BILL-ITM-TYPE-BG (WS-BILLING-INDX)             
                          = WS-CURRENT-BILL-ITEM                        
                       AND WS-CODE-BILL-ITM-IND-BG (WS-BILLING-INDX)    
                          = (WS-ACTIVE OR WS-TRANSFER)                  
                 IF WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX) = WS-GAS     
                    ADD WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)           
                      TO WS-GAS-AMT                                     
                 ELSE                                                   
                   IF WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX) = WS-ELEC  
ACT400               IF WS-XFER-TO-ASSIGNEE-BG (WS-BILLING-INDX)        
ACT400                                                     NOT = 'Y'    
                       ADD WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)        
                        TO WS-ELEC-AMT                                  
ACT400               END-IF                                             
                   ELSE                                                 
                     PERFORM 1011-CHECK-UNMETERED THRU 1011-EXIT        
                   END-IF                                               
                 END-IF                                                 
              END-IF                                                    
           END-PERFORM                                                  
                                                                        
A35648     IF WS-COMPANY-NO-AT = '01' AND                               
A35648        CSR-DATABASE                                              
            IF (WS-ELEC-AMT > ZERO OR                                   
T12602               WS-ACCOUNT-TYPE-CODE-AT = WS-DEADHEAD)             
                  AND NO-ELE-AC                                         
              MOVE WS-ACCOUNT-NO-AT                                     
                TO WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)                   
              MOVE 40 TO WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)      
T5466         MOVE 'I' TO WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)     
              MOVE WS-ELEC-AMT                                          
                TO WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)           
                   WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
              ADD WS-ELEC-AMT TO WS-NEW-REVENUE-ACCUM                   
                                 WS-UTE-NEW-ACCUM (WS-LO-INDX)          
              SET WS-AR-DATA-INDX UP BY 1                               
              MOVE WS-CODE-USED TO WS-CODE-UTL                          
T19844        SET HAS-ELE-AC TO TRUE                                    
            END-IF                                                      
A35648     END-IF.                                                      
                                                                        
           IF (WS-GAS-AMT > ZERO OR                                     
T12602               WS-ACCOUNT-TYPE-CODE-AT = WS-DEADHEAD)             
                 AND NO-GAS-AC                                          
              MOVE WS-ACCOUNT-NO-AT                                     
                TO WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)                   
              MOVE 45 TO WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)      
T5466         MOVE 'I' TO WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)     
              MOVE WS-GAS-AMT                                           
                TO WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)           
                   WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
              ADD WS-GAS-AMT TO WS-NEW-REVENUE-ACCUM                    
                                WS-UTG-NEW-ACCUM (WS-LO-INDX)           
              SET WS-AR-DATA-INDX UP BY 1                               
              MOVE WS-CODE-USED TO WS-CODE-UTL                          
T19844        SET HAS-GAS-AC TO TRUE                                    
           END-IF.                                                      
T16648     MOVE WS-CODES-DATA-PRESENT TO WS-CODES-DATA-PRESENT-AT.      
                                                                        
       1010-EXIT.                                                       
           EXIT.                                                        
      /                                                                 23430000
KMG    1011-CHECK-UNMETERED.                                            
           SET WS-CUST-PLAN-INDX TO 1.                                  
           SEARCH  WS-CUST-PLAN-DATA                                    
T17541         WHEN WS-ACCOUNT-NO-CP (WS-CUST-PLAN-INDX) = ZEROES       
T16974           PERFORM 2016-FIND-SERVICE-TYPE THRU 2016-EXIT          
               WHEN WS-ACCOUNT-NO-BG (WS-BILLING-INDX)                  
                        =  WS-ACCOUNT-NO-CP (WS-CUST-PLAN-INDX)         
                       AND WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX)       
                        = WS-CODE-UTIL-TYPE-CP (WS-CUST-PLAN-INDX)      
                       AND WS-IC-NO-BG (WS-BILLING-INDX)                
                        = WS-IC-NO-CP (WS-CUST-PLAN-INDX)               
                    IF WS-CODE-SERVICE-TYPE-CP (WS-CUST-PLAN-INDX)      
                       = WS-GAS                                         
                       ADD WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)        
                           TO WS-GAS-AMT                                
                    ELSE                                                
                       ADD WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)        
                          TO WS-ELEC-AMT                                
                    END-IF                                              
           END-SEARCH.                                                  
KMG    1011-EXIT.                                                       
           EXIT.                                                        
      /                                                                 23660000
      /                                                                 23800000
       1030-SET-FOR-ACCUM.                                              
           SET WS-LO-INDX TO 1                                          
           SEARCH WS-LOCAL-ACCUMULATORS-DATA                            
              AT END                                                    
                 MOVE 'LOCAL OFFICE TABLE OVERFLOW'                     
                   TO WS-MISC-MSG-TEXT                                  
                 MOVE +27 TO WS-MISC-MSG-LEN                            
T18829           MOVE 12 TO RETURN-CODE                                 
                 PERFORM 9910-MISC-ERROR THRU 9910-EXIT                 
              WHEN WS-LO-ACCUM-COMPANY-NO (WS-LO-INDX)                  
                       = WS-COMPANY-NO-AT                               
                    AND WS-LO-ACCUM-LOCAL-OFFICE (WS-LO-INDX)           
                       = WS-LOCAL-OFFICE-AT                             
                 CONTINUE                                               
              WHEN WS-LO-ACCUM-COMPANY-NO (WS-LO-INDX) = SPACE          
                 MOVE WS-COMPANY-NO-AT                                  
                   TO WS-LO-ACCUM-COMPANY-NO (WS-LO-INDX)               
                 MOVE WS-LOCAL-OFFICE-AT                                
                   TO WS-LO-ACCUM-LOCAL-OFFICE (WS-LO-INDX)             
           END-SEARCH.                                                  
                                                                        
       1030-EXIT.                                                       
           EXIT.                                                        
      /                                                                 24040000
       1040-APPLY-NEW-CREDITS.                                          
T10667     PERFORM 1500-LOAD-SUMM-ROWS      THRU 1500-EXIT.             
                                                                        
T20007     IF WS-BILL-CORRECTION AND                                    
T20007        WS-CODE-BILL-PEND-AT = WS-PEND-ASAP                       
T20007          NEXT SENTENCE                                           
T20007     ELSE                                                         
TF1             SET WS-CNT-INDX TO 1                                    
TF1             SEARCH WS-CONTRACT-DATA                                 
TF1                WHEN WS-ACCOUNT-NO-CT (WS-CNT-INDX) = ZERO           
TF1                   CONTINUE                                          
TF1                WHEN WS-CODE-BILL-TYPE-CT (WS-CNT-INDX)              
TF1                                  = WS-MNTHLY-CREDIT                 
TF1                  AND WS-CNT-STATUS-CD-CT (WS-CNT-INDX) = WS-APPROVED
PCR294***************************************************************   24370000
PCR294*PCR 294 - DO NOT FINAL BILL MONTHLY CREDIT CONTRACTS         *   24380000
PCR294***************************************************************   24390000
PCR294                  IF WS-CODE-ACCT-STAT-AT = WS-FINAL-BILL         
PCR294                     CONTINUE                                     
PCR294                  ELSE                                            
T32429                     IF WS-CREDIT-CNT-APPLIED = 'N'               
TF1                          PERFORM 2060-PROCESS-CRED-CONTRACT         
TF1                                               THRU 2060-EXIT        
T32429                       MOVE 'Y' TO WS-CREDIT-CNT-APPLIED          
T32429                     END-IF                                       
      *                                                                 24480000
T20065                     IF RETURN-CODE > 0                           
T20065                        MOVE 'BAD RETURN FROM SCSCA117'           
T20065                            TO WS-MISC-MSG-TEXT                   
T20065                        MOVE +24 TO WS-MISC-MSG-LEN               
T20065                        PERFORM 9910-MISC-ERROR THRU 9910-EXIT    
T20065                     END-IF                                       
      *                                                                 24550000
PCR294                  END-IF                                          
TF1             END-SEARCH                                              
           END-IF.                                                      
                                                                        
PCR072***************************************************************   24610000
PCR072** WHILE GOING THROUGH THE AR_CNTL ROWS CHECK TO SEE IF THERE *   24620000
PCR072** IS CIA OR CIA-LIHEAP ON THE ACCOUNT AND SAVE THE AMOUNTS.  *   24630000
PCR072***************************************************************   24640000
T16786***************************************************************   24650000
T16786**  MODIFIED TO SEARCH FOR CIA-LIHEAP AND APPLY THE CREDIT    *   24660000
T16786**  FIRST, THEN SEARCH AND APPLY CIA-CASH AFTER.              *   24670000
T16786***************************************************************   24680000
PCR072     MOVE ZEROES                TO WS-CIA-CREDIT                  
PCR072                                   WS-CIA-LIHEAP-CREDIT.          
PCR072     SET WS-AR-DATA-INDX        TO 1.                             
PCR072     SEARCH WS-AR-DATA                                            
PCR072         AT END                                                   
PCR072              CONTINUE                                            
PCR072         WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = 0              
PCR072              CONTINUE                                            
PCR072         WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 70      
PCR072          AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) = 2                 
PCR072              MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)          
PCR072                                    TO WS-CIA-LIHEAP-CREDIT       
PCR072     END-SEARCH.                                                  
PCR072                                                                  
T16786     IF WS-CIA-LIHEAP-CREDIT < 0                                  
PCR072        MOVE WS-YES                TO WS-APPLYING-CIA-IND         
PCR072        MOVE WS-YES                TO WS-UNUSED-CR-FL             
CG0318        PERFORM 2055-PROCESS-CIA-CREDIT   THRU 2055-EXIT          
T18038        MOVE WS-CODES-DATA-PRESENT-AT  TO WS-CODES-DATA-PRESENT   
PCR072        MOVE WS-NO                 TO WS-UNUSED-CR-FL             
      *                                                                 24950000
T20064        IF RETURN-CODE > 0                                        
T24024           IF RETURN-CODE = 16                                    
T20064              MOVE 'BAD RETURN FROM SCSCA106'                     
T20064                                      TO WS-MISC-MSG-TEXT         
T20064              MOVE +24                TO WS-MISC-MSG-LEN          
T24024              PERFORM 9910-MISC-ERROR THRU 9910-EXIT              
T24024           ELSE                                                   
T24024              MOVE WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)  
T24024                                      TO  WS-MISCELLANEOUS-MESSAGE
T24024              PERFORM 9920-CIA-PROCESS-ERROR    THRU 9920-EXIT    
T24024           END-IF                                                 
T20064        END-IF                                                    
      *                                                                 25080000
PCR072     END-IF.                                                      
                                                                        
T16786     MOVE ZEROES                TO WS-CIA-CREDIT                  
T16786                                   WS-CIA-LIHEAP-CREDIT.          
T16786     SET WS-AR-DATA-INDX        TO 1.                             
T16786     SEARCH WS-AR-DATA                                            
T16786         AT END                                                   
T16786              CONTINUE                                            
T16786         WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = 0              
T16786              CONTINUE                                            
PCR072         WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 70      
PCR072          AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) = 1                 
PCR072              MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)          
PCR072                                    TO WS-CIA-CREDIT              
PCR072     END-SEARCH.                                                  
PCR072                                                                  
PCR072     IF WS-CIA-CREDIT < 0                                         
PCR072        MOVE WS-YES                TO WS-APPLYING-CIA-IND         
PCR072        MOVE WS-YES                TO WS-UNUSED-CR-FL             
CG0318        PERFORM 2055-PROCESS-CIA-CREDIT   THRU 2055-EXIT          
T18038        MOVE WS-CODES-DATA-PRESENT-AT  TO WS-CODES-DATA-PRESENT   
PCR072        MOVE WS-NO                 TO WS-UNUSED-CR-FL             
      *                                                                 25310000
T20064        IF RETURN-CODE > 0                                        
T24024           IF RETURN-CODE = 16                                    
T20064              MOVE 'BAD RETURN FROM SCSCA106'                     
T20064                                   TO WS-MISC-MSG-TEXT            
T20064              MOVE +24             TO WS-MISC-MSG-LEN             
T20064              PERFORM 9910-MISC-ERROR THRU 9910-EXIT              
T24024           ELSE                                                   
T24024              MOVE WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)  
T24024                                   TO  WS-MISCELLANEOUS-MESSAGE   
T24024              PERFORM 9920-CIA-PROCESS-ERROR THRU 9920-EXIT       
T24024           END-IF                                                 
T20064        END-IF                                                    
      *                                                                 25440000
PCR072     END-IF.                                                      
      *                                                                 25460000
T10667     PERFORM 1550-UNLOAD-SUMM-ROWS     THRU 1550-EXIT.            
      *                                                                 25480000
       1040-EXIT.                                                       
           EXIT.                                                        
      /                                                                 25510000
       1050-APPLY-LPC.                                                  
           IF WS-CODE-LPC-XMT-AT = 'L' OR 'Z'                           
                 OR WS-CODE-BUDGET = WS-CODE-USED                       
P00453           OR WS-CODE-PRE-PAY-PLAN = WS-CODE-USED                 
                 OR (WS-CODE-LPC-XMT-AT NUMERIC                         
                        AND WS-CODE-LPC-XMT-AT NOT = '1')               
T10672           OR WS-OFF-CYCLE-FINAL                                  
A01702           OR WS-MST-SUB-ACCT-IND-AT = 'M'                        
T12774*             LPC ON MASTERS IS ASSESSED IN CREDIT COLLECTIONS    25600000
              ADD WS-LPC-UTIL-ELIG-AFT-BILL-CALC                        
                TO WS-LPC-UTIL-XMT-AFT-BILL-CALC                        
              ADD WS-LPC-NONUT-ELG-AFT-BILL-CALC                        
                TO WS-LPC-NONUT-XMT-AFT-BILL-CALC                       
              MOVE ZERO TO WS-LPC-UTIL-ELIG-AFT-BILL-CALC               
                           WS-LPC-NONUT-ELG-AFT-BILL-CALC               
           END-IF.                                                      
                                                                        
           IF WS-CODE-LPC-XMT-AT = 'L' OR 'Z'                           
                 OR (WS-CODE-LPC-XMT-AT NUMERIC)                        
T10672           OR WS-OFF-CYCLE-FINAL                                  
A01702           OR WS-MST-SUB-ACCT-IND-AT = 'M'                        
T12774*             LPC ON MASTERS IS ASSESSED IN CREDIT COLLECTIONS    25750000
              ADD WS-LPC-UTIL-ELIG-BFR-BILL-CALC                        
                TO WS-LPC-UTIL-XMT-BFR-BILL-CALC                        
              ADD WS-LPC-NONUT-ELG-BFR-BILL-CALC                        
                TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                       
              MOVE ZERO TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC               
                           WS-LPC-NONUT-ELG-BFR-BILL-CALC               
           END-IF                                                       
                                                                        
           IF WS-CODE-LPC-XMT-AT = 'A'                                  
              ADD WS-LPC-UTIL-ELIG-BFR-BILL-CALC                        
                TO WS-LPC-UTIL-XMT-BFR-BILL-CALC                        
              MOVE ZERO TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC               
           END-IF                                                       
                                                                        
           IF WS-CODE-LPC-XMT-AT = 'B'                                  
              ADD WS-LPC-NONUT-ELG-BFR-BILL-CALC                        
                TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                       
T34188        MOVE ZERO TO WS-LPC-NONUT-ELG-BFR-BILL-CALC               
           END-IF                                                       
                                                                        
           IF WS-LPC-UTIL-ELIG-BFR-BILL-CALC > ZERO                     
                 OR WS-LPC-NONUT-ELG-BFR-BILL-CALC > ZERO               
                 OR WS-LPC-UTIL-ELIG-AFT-BILL-CALC > ZERO               
                 OR WS-LPC-NONUT-ELG-AFT-BILL-CALC > ZERO               
              PERFORM 3000-CALCULATE-LPC-CHARGE THRU 3000-EXIT          
           END-IF.                                                      
                                                                        
       1050-EXIT.                                                       
           EXIT.                                                        
      /                                                                 26430000
T11078 1060-SET-EPP-OFFER-AMT.                                          
T11078     MOVE WS-REVENUE-MONTH-CALC  TO WS-TEMP-REVENUE-MTH.          
T11078     MOVE WS-TEMP-REVENUE-MTH    TO WS-HOLD-REVENUE-MTH.          
T11078     ADD +1 TO WS-HOLD-REVENUE-MTH-CCYY.                          
T11078     MOVE WS-HOLD-REVENUE-MTH TO WS-HOLD-REVENUE-MTH-CHAR.        
T11078     IF WS-ANNIVERSARY-DATE-BU (1:4) =                            
T11078                             WS-HOLD-REVENUE-MTH-CHAR (1:4)       
T11078       AND WS-ANNIVERSARY-DATE-BU (6:2) =                         
T11078                             WS-HOLD-REVENUE-MTH-CHAR (5:2)       
T11078        PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1               
P00097                  UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY         
T11078                  OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO    
T11078          IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) NOT = 50   
T11078             COMPUTE WS-EPP-OFFER-AMOUNT-AT =                     
T11078                        WS-EPP-OFFER-AMOUNT-AT                    
T11078                      + WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
T11078                      + WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)     
T11078                      + WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)     
T11078                      + WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)     
T11078          ELSE                                                    
T11078             COMPUTE WS-EPP-OFFER-AMOUNT-AT =                     
T11078                        WS-EPP-OFFER-AMOUNT-AT                    
T11078                      + WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)  
T11078          END-IF                                                  
T11078        END-PERFORM                                               
T11078     END-IF                                                       
T11078     .                                                            
T11078 1060-EXIT.                                                       
T11078     EXIT.                                                        
C27553*                                                                 26730000
C27553* CHECK IF THE ACCOUNT IS RECIPIENT OF A TRANSFER AND THE FROM    26740000
C27553* ACCOUNT FINAL BILLED                                            26750000
C27553 1065-CHECK-TRANSFERS.                                            
C27553*                                                                 26770000
C27553     MOVE 'N'                         TO WS-ACCT-XFER-FINAL-BILLED
C27553     IF WS-ACCT-XFER-FROM-LST-AT NOT EQUAL 0                      
A02036        MOVE WS-ACCT-XFER-FROM-LST-AT TO AT-ACCT-XFER-FROM-LST    
C27553        PERFORM 7010-CHECK-FINAL-BILL THRU 7010-EXIT              
C27553     END-IF.                                                      
C27553*                                                                 26830000
C27553 1065-EXIT.                                                       
C27553     EXIT.                                                        
C27553*                                                                 26860000
C26130***************************************************************** 26870000
C26130*  1070-EPP-OFFER-RULES.                                        * 26880000
C26130* INITIALIZE WS-CODE-OFFER, CODE-AMOUNT AND CODE-DATE.          * 26890000
C26130* THE ACCOUNT MUST BE ACTIVE.                                   * 26900000
      * THE ACCOUNT MUST BE UTILITY                                   * 26910000
TP6163* THE ACCOUNT CANNOT BE ON EPP/BUDGET                           * 26920000
      * THE ACCOUNT MUST NOT BE A MAJOR ACCOUNT                       * 26930000
      * THE ACCOUNT MUST NOT BE A MASTER/SUB ACCOUNT                  * 26940000
      * THE ACCOUNT MUST NOT BE IN BANKRUPTCY                         * 26950000
      * THE ACCOUNT CANNOT HAVE A DPP                                 * 26960000
C26130* THE ACCOUNT CANNOT HAVE A DEFERRED ARRANGEMENT                * 26970000
      * THE ACCOUNT CANNOT HAVE A MEDICAL CERTIFICATE                 * 26980000
      * TOTAL ARREARS MUST = 0                                        * 26990000
C26130* THE CREDIT GROUP MUST BE ARREARS OR EXEMPT                    * 27000000
C26130* THE ACCOUNT IS NOT ON STA                                     * 27010000
C26130* THE ACCOUNT IS NOT ON BANK DRAFT                              * 27020000
C26130* THE ACCOUNT IS NOT ON FIXED INCOME                            * 27030000
C26130* THE ACCOUNT IS NOT CASH ONLY                                  * 27040000
C26130* THE ACCOUNT SHOULD BELONG TO A RESIDENTIAL CUSTOMER           * 27050000
C26130* THE ACCOUNT SHOULD NOT HAVE AN ACTIVE ONE TIME CONTRACT       * 27060000
C27553* ACCOUNTS THAT ARE RECEPIENT OF A TRANSFER WITH FROM ACCOUNT   * 27070000
C27553* FINAL BILLED                                                  * 27080000
C28085* SEB ACCOUNTS MUST NOT BE ON ONE-RATE                          * 27090000
C28085* SEBR ACCOUNTS MUST NOT BE GIVEN OFFER                         * 27100000
C28085* COBB EMC CUSTOMERS MUST NOT BE GIVEN AN OFFER                 * 27110000
C28085* DO NOT OFFER EPP TO ACCOUNTS THAT HAVE A CREDIT BALANCE       * 27120000
P00453* ACCOUNT MUST NOT BE A PRE-PAY-PLAN ACCOUNT                    * 18920000
C26130***************************************************************** 27140000
C26130 1070-EPP-OFFER-RULES.                                            
C26130     MOVE ' '                 TO WS-CODE-EPP-OFFER.               
      * CHECK VALUE FROM CSS_DELINQUENCY FOR EPP OFFER.                 27240000
C26130     IF WS-EPP-OFFER-REV-MTH  = WS-REV-YYMM-TEMP                  
                   AND WS-CODE-ACCT-STAT-AT = 'A'                       
                                                                        
                   AND WS-CODE-UTL = 'A'                                
                                                                        
                   AND WS-CODE-BUDGET = SPACE                           
                                                                        
P00453             AND WS-CODE-PRE-PAY-PLAN = SPACE                     
                                                                        
                   AND WS-CODE-MAJOR-ACCT-AT NOT = 'Y'                  
                                                                        
C27553             AND (WS-ACCT-XFER-FROM-LST-AT EQUAL ZERO OR          
C27553                 (WS-ACCT-XFER-FROM-LST-AT NOT EQUAL ZERO AND     
C27553                 WS-ACCT-XFER-FINAL-BILLED = 'Y'))                
                                                                        
                   AND (WS-MST-SUB-ACCT-IND-AT NOT = 'M' AND 'S')       
                                                                        
                   AND (WS-BANKRUPTCY-IND-AT NOT = 'B' AND 'J')         
                                                                        
                   AND WS-CODE-DPP-ACCT = SPACE                         
                                                                        
                   AND WS-CODE-DFA-ACCT = SPACE                         
                                                                        
                   AND WS-CODE-MEDICAL = SPACE                          
                                                                        
                   AND WS-TOTAL-ARREARS NOT > ZERO                      
                                                                        
C28085             AND WS-CREDIT-BALANCE >= ZERO                        
                                                                        
P00599             AND (WS-CREDIT-GROUP-AT = 'A' OR 'C' OR 'N')         
                                                                        
                   AND WS-CODE-STA-ACCT = SPACE                         
                                                                        
                   AND WS-CODE-BANK-EFT = SPACE                         
                                                                        
                   AND WS-BILL-CYCLE-CHG-CD-AT NOT = 'F'                
                                                                        
                   AND WS-CASH-ONLY-FL-CZ NOT = 'Y'                     
                                                                        
                       PERFORM 0120-CHECK-MORE-RULES  THRU 0120-EXIT    
           END-IF.                                                      
C26130 1070-EXIT.                                                       
C26130     EXIT.                                                        
      /                                                                 27680000
C34569*                                                                 27690000
C34569 1075-GET-RATE-TYPE.                                              
C34569*                                                                 27710000
C34569     MOVE WS-COMPANY-NO-AT              TO DF-COMPANY-NO.         
C34569     MOVE WS-ACCOUNT-NO-AT              TO DF-ACCOUNT-NO.         
C34569*                                                                 27740000
C34569     MOVE WS-REV-MTH-LST-NRML-AT        TO WS-REVENUE-MONTH-1.    
C34569     COMPUTE WS-REVMTH-MM  = WS-REVMTH-MM + 1.                    
C34569     IF WS-REVMTH-MM > 12                                         
C34569        ADD  1 TO WS-REVMTH-CCYY                                  
C34569        COMPUTE WS-REVMTH-MM  = WS-REVMTH-MM - 12                 
C34569     ELSE                                                         
C34569        CONTINUE                                                  
C34569     END-IF.                                                      
C34569     MOVE WS-REVENUE-MONTH-1            TO DF-STATUS-EFF-REV-MTH. 
C34569*                                                                 27840000
C34569     PERFORM 7016-GET-RATE-TYPE         THRU 7016-EXIT.           
C34569*                                                                 27860000
C34569 1075-EXIT.                                                       
C34569     EXIT.                                                        
C34569*                                                                 27890000
C26130 1111-LOAD-DELINQUENCY-TABLE.                                     
                                                                        
           PERFORM 7011-OPEN-DW  THRU 7011-EXIT.                        
           PERFORM 7012-FETCH-DW THRU 7012-EXIT.                        
           SET TB-CO-INDEX TO 1.                                        
           SET TB-VAL-INDEX TO 1.                                       
           PERFORM 1112-LOAD-DW-VARIABLE THRU 1112-EXIT                 
                   UNTIL SQLCODE = NOT-FOUND.                           
           PERFORM 7014-CLOSE-DW THRU 7014-EXIT.                        
                                                                        
C26130 1111-EXIT.                                                       
           EXIT.                                                        
                                                                        
C26130 1112-LOAD-DW-VARIABLE.                                           
                                                                        
           MOVE C8-DELINQ-CD TO WS-VARIABLE-ID.                         
           MOVE C8-DELINQ-VALUE TO WS-VARIABLE-VALUE.                   
           MOVE C8-COMPANY-NO TO WS-DELINQ-COMPANY.                     
                                                                        
           PERFORM 1113-LOAD-TABLE-ENTRY THRU 1113-EXIT.                
                                                                        
           PERFORM 7012-FETCH-DW THRU 7012-EXIT.                        
                                                                        
           IF C8-COMPANY-NO NOT EQUAL WS-DELINQ-COMPANY                 
               SET TB-CO-INDEX UP BY 1                                  
               SET TB-VAL-INDEX TO 1                                    
           END-IF.                                                      
                                                                        
C26130 1112-EXIT.                                                       
           EXIT.                                                        
                                                                        
C26130 1113-LOAD-TABLE-ENTRY.                                           
                                                                        
           MOVE WS-DELINQ-COMPANY TO                                    
               WS-DELINQ-COMPANY-TB (TB-CO-INDEX, TB-VAL-INDEX).        
           MOVE WS-VARIABLE-ID TO                                       
               WS-DELINQ-CODE-TB (TB-CO-INDEX, TB-VAL-INDEX).           
           MOVE WS-VARIABLE-VALUE TO                                    
               WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX).          
           SET TB-VAL-INDEX UP BY 1.                                    
                                                                        
C26130 1113-EXIT.                                                       
           EXIT.                                                        
                                                                        
P00794***************************************************************   28330000
P00794** LOAD PSNC TAX RATES INTO WORKING                               28330000
P00794** STATE  TAX GL = 241.0123 (12)                                  28330000
P00794** COUNTY TAX GL = 241.0207 (71)                                  28330000
P00794***************************************************************   28330000
P00794 1114-LOAD-PSNC-TAX-RATES.                                        
P00794                                                                  
P00794      SET WS-PSNC-TAX-DATA-INDX TO 1                              
P00794      PERFORM 7581-OPEN-PSNC-TAX-RATES  THRU 7581-EXIT            
P00794      PERFORM 7582-FETCH-PSNC-TAX-RATES THRU 7582-EXIT            
P00794      PERFORM UNTIL SQLCODE = NOT-FOUND                           
P00794         MOVE TR-TAX-CNTRL-NO                                     
P00794           TO WS-TAX-CNTRL-NO (WS-PSNC-TAX-DATA-INDX)             
P00794         MOVE TR-DETAIL-ID                                        
P00794           TO WS-DETAIL-ID    (WS-PSNC-TAX-DATA-INDX)             
P00794         MOVE TR-TAX-RATE                                         
P00794           TO WS-TAX-RATE     (WS-PSNC-TAX-DATA-INDX)             
P00794                                                                  
P00794         IF TR-TAX-CNTRL-NO = 12                                  
P00794            MOVE 241.0123                                         
P00794              TO WS-GL-ACCT-NO (WS-PSNC-TAX-DATA-INDX)            
P00794         ELSE                                                     
P00794            MOVE 241.0207                                         
P00794              TO WS-GL-ACCT-NO (WS-PSNC-TAX-DATA-INDX)            
P00794         END-IF                                                   
P00794         SET WS-PSNC-TAX-DATA-INDX UP BY 1                        
P00794         PERFORM 7582-FETCH-PSNC-TAX-RATES THRU 7582-EXIT         
P00794      END-PERFORM                                                 
P00794      PERFORM 7583-CLOSE-PSNC-TAX-RATES THRU 7583-EXIT            
P00794      .                                                           
P00794                                                                  
P00794 1114-EXIT.                                                       
            EXIT.                                                       
C26130***************************************************************   28330000
C26130*     0120-CHECK-MORE-RULES.                                      28340000
A35967* DO NOT OFFER EPP AUTO ENROLL TO TOU CUSTOMERS                 * 28341000
P00251* DO NOT OFFER BBP TO COGENERATION CUSTOMERS                      28342000
C26130* THE ACCOUNT CAN BE ON EPAY UNTIL WE ARE TOLD DIFFERENTLY.       28350000
C26130* THE ACCOUNT IS NOT CASH ONLY.                                   28360000
C26130* GET THE REVENUE CLASS FROM CSS_UTIL_ENVRNMT TO DETERMINE        28370000
C26130* ACCOUNT TYPE.  ACCOUNT MUST BE RESIDENTIAL.                     28380000
C26130* THE ACCOUNT DOES NOT HAVE A 1-TIME CHARGE CONTRACT.             28390000
C26130* IF LOC OFFICE IS GAS ONLY THEN REV MONTH MUST = A GAS OFFER     28400000
C26130* MONTH FROM DELINQUENCY TABLE.                                   28410000
C26130* PARA 2132- WILL CALL SCSCA112 TO CALCULATE EPP OFFER AMOUNT.    28420000
C26130***************************************************************   28430000
C26130 0120-CHECK-MORE-RULES.                                           
C26130*                                                                 28450000
C26130     MOVE WS-ACCOUNT-NO-AT TO BE-ACCOUNT-NO                       
                                    UT-ACCOUNT-NO                       
ACT109                              BH-ACCOUNT-NO                       
                                    CT-ACCOUNT-NO.                      
                                                                        
A35967     MOVE 'N'                 TO WS-TOU-EXISTS.                   
A35967     PERFORM 7021-CHECK-TOU-CUSTOMER   THRU 7021-EXIT.            
P00251     IF WS-TOU-EXISTS = 'Y'                                       
P00251         MOVE 'N' TO WS-ALLOW-OFFER                               
P00251         GO TO 0120-EXIT                                          
P00251     END-IF.                                                      
A35967*                                                                 28494000
P00251     MOVE 'N'                 TO WS-COGEN-EXISTS.                 
P00251     PERFORM 7022-CHECK-COGEN-CUSTOMER THRU 7022-EXIT.            
P00251     IF WS-COGEN-EXISTS = 'Y'                                     
P00251         MOVE 'N' TO WS-ALLOW-OFFER                               
P00251         GO TO 0120-EXIT                                          
P00251     END-IF.                                                      
                                                                        
ACT109     MOVE 'N'                 TO WS-BBP-DROP-EXISTS.              
ACT109     MOVE LS-INPUT-DATE       TO WS-BBP-DATE.                     
ACT109     PERFORM 7570-SET-BBP-CUTOFF       THRU 7570-EXIT.            
ACT109     PERFORM 7580-CHECK-BBP-DROP       THRU 7580-EXIT.            
ACT109     IF WS-BBP-DROP-EXISTS = 'Y'                                  
ACT109         MOVE 'N' TO WS-ALLOW-OFFER                               
ACT109         GO TO 0120-EXIT                                          
ACT109     END-IF.                                                      
ACT109*                                                                 28494000
C32490          SET NOT-EPP-COMMERICAL TO TRUE                          
A37061          IF WS-COMPANY-NO-AT = WS-PSNC AND                       
A37061             WS-ACCOUNT-TYPE-CODE-AT = 'C'                        
C32490             PERFORM VARYING WS-BILLING-INDX FROM 1 BY 1 UNTIL    
C32490               WS-BILLING-INDX > 30 OR EPP-COMMERCIAL OR          
C32490               WS-ACCOUNT-NO-BG (WS-BILLING-INDX) = ZERO          
C32490               IF (WS-RATE-PLAN-NO-BG (WS-BILLING-INDX) = '125'   
C32490                OR WS-RATE-PLAN-NO-BG (WS-BILLING-INDX) = '225')  
C32490                 AND  WS-CREDIT-GROUP-AT = 'C' AND                
C32490                 WS-CODE-REVENUE-CLASS-BG(WS-BILLING-INDX) = '720'
C32490                   SET EPP-COMMERCIAL TO TRUE                     
C32490               END-IF                                             
C32490             END-PERFORM                                          
C32490          END-IF                                                  
A37061          IF WS-ACCOUNT-TYPE-CODE-AT = 'R' OR EPP-COMMERCIAL      
C26130            PERFORM 7448-SELECT-CONTRACT THRU 7448-EXIT           
C26130            IF ROW-DOES-NOT-EXIST                                 
C26130              MOVE WS-COMPANY-NO-AT    TO  B1-COMPANY-NO          
C26130              MOVE WS-LOCAL-OFFICE-AT  TO  B1-LOCAL-OFFICE        
C26130              PERFORM 7450-SELECT-DISTRICT-NO   THRU 7450-EXIT    
C26130              IF B1-DISTRICT-NO = 'GAS'                           
C26130                MOVE 'N' TO WS-ALLOW-OFFER                        
C26130                SET WS-OFFER-INDX TO 1                            
C26130                PERFORM 0150-SEARCH-GAS-MTH     THRU 0150-EXIT    
C26130                   UNTIL WS-OFFER-INDX > 12                       
C26130                      OR WS-ALLOW-OFFER = 'Y'                     
C26130                IF WS-ALLOW-OFFER = 'Y'                           
C26130                  MOVE 'A' TO WS-CODE-EPP-OFFER                   
C26130                  MOVE WS-CODES-DATA-PRESENT TO                   
C26130                                   WS-CODES-DATA-PRESENT-AT       
C26130                  PERFORM 2132-MONITOR-EPP      THRU 2132-EXIT    
C26130                  MOVE WS-CODES-DATA-PRESENT-AT TO                
C26130                                 WS-CODES-DATA-PRESENT            
C26130                END-IF                                            
C26130              ELSE                                                
C26130                MOVE 'A' TO WS-CODE-EPP-OFFER                     
C26130                MOVE WS-CODES-DATA-PRESENT TO                     
C26130                                 WS-CODES-DATA-PRESENT-AT         
C26130                PERFORM 2132-MONITOR-EPP        THRU 2132-EXIT    
C26130                MOVE WS-CODES-DATA-PRESENT-AT TO                  
C26130                                 WS-CODES-DATA-PRESENT            
C26130              END-IF                                              
C26130            END-IF                                                
C26130          END-IF.                                                 
C26130 0120-EXIT.                                                       
C26130     EXIT.                                                        
C26130*                                                                 28970000
C26130 0150-SEARCH-GAS-MTH.                                             
C26130     EVALUATE TRUE                                                
C26130         WHEN WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)              
C26130             = WS-REV-MM-TEMP                                     
C26130             MOVE 'Y' TO WS-ALLOW-OFFER                           
C26130             SET WS-OFFER-INDX UP BY 1                            
C26130         WHEN OTHER                                               
C26130             SET WS-OFFER-INDX UP BY 1                            
C26130     END-EVALUATE.                                                
C26130 0150-EXIT.                                                       
C26130     EXIT.                                                        
                                                                        
T10667* THIS PARAGRAPH WILL LOAD THE AR CNTL SUMMARY ROWS.  THIS IS     29100000
T10667* SO CPD00010 CAN USE THEM WHEN IT APPLIES CIA.  THESE ADDED      29110000
T10667* ROWS IN CWS10000 WILL BE REMOVED IMMEDIATELY AFTER CIA          29120000
T10667* APPLICATION FOR THE REST OF BILLING.                            29130000
                                                                        
T10667 1500-LOAD-SUMM-ROWS.                                             
T10667*    FIND THE NEXT EMPTY AR CNTL POSITION                         29160000
T10667     SET WS-AR-DATA-INDX TO 1.                                    
T10667     SEARCH WS-AR-DATA                                            
T10667        AT END                                                    
T10667           MOVE 'AR CONTROL TABLE OVERFLOW'                       
T10667             TO WS-MISC-MSG-TEXT                                  
T10667           MOVE +25 TO WS-MISC-MSG-LEN                            
T10667           MOVE 12 TO RETURN-CODE                                 
T10667           PERFORM 9910-MISC-ERROR THRU 9910-EXIT                 
T10667        WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = 0               
T10667           CONTINUE                                               
T10667     END-SEARCH.                                                  
                                                                        
T10667     SET WS-HOLD-SUM-START TO WS-AR-DATA-INDX.                    
T10667     SET WS-SUM-STRT-INDX TO WS-AR-DATA-INDX.                     
T10667     PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1                  
T10667            UNTIL WS-AR-DATA-INDX = WS-HOLD-SUM-START             
T10667*       FOR EACH EXISTING AR CNTL ROW, IF IT SHOULD HAVE          29330000
T10667*       A SUMMARY ROW (ITEM ID > 0), LOAD IT                      29340000
T10667        IF WS-ITEM-ID-AC (WS-AR-DATA-INDX) > 0                    
T10667           IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) =         
T10667               WS-PYMT-PRIORITY-LVL-AC (WS-SUM-STRT-INDX)         
T10667*            IF MORE THAN ONE DETAIL ROW EXISTS, ADD THE DATA     29380000
T10667*            TOGETHER                                             29390000
T10667             ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) TO         
T10667                  WS-AMT-AR-DAY-00-AC (WS-SUM-STRT-INDX)          
T10667             ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) TO         
T10667                  WS-AMT-AR-DAY-30-AC (WS-SUM-STRT-INDX)          
T10667             ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) TO         
T10667                  WS-AMT-AR-DAY-60-AC (WS-SUM-STRT-INDX)          
T10667             ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) TO         
T10667                  WS-AMT-AR-DAY-90-AC (WS-SUM-STRT-INDX)          
T10667             ADD WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) TO         
T10667                  WS-AMT-UNUSED-CR-AC (WS-SUM-STRT-INDX)          
T10667             ADD WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX) TO     
T10667                  WS-TOT-SUMM-UNBILLED-AC (WS-SUM-STRT-INDX)      
T10667           ELSE                                                   
T10667              IF WS-PYMT-PRIORITY-LVL-AC (WS-SUM-STRT-INDX) > 0   
T10667*                CREATE A NEW ROW (EXCEPT ON THE FIRST TIME)      29540000
T10667                 SET WS-SUM-STRT-INDX UP BY 1                     
T10667              END-IF                                              
T10667              MOVE 0 TO WS-AMT-TRAN-BALANCE-AC (WS-SUM-STRT-INDX) 
T10667              MOVE 0 TO WS-ITEM-ID-AC (WS-SUM-STRT-INDX)          
T10667              MOVE WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) TO          
T10667                     WS-ACCOUNT-NO-AC (WS-SUM-STRT-INDX)          
T10667              MOVE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) TO   
T10667                     WS-PYMT-PRIORITY-LVL-AC (WS-SUM-STRT-INDX)   
T10667              MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) TO       
T10667                     WS-AMT-AR-DAY-00-AC (WS-SUM-STRT-INDX)       
T10667              MOVE WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) TO       
T10667                     WS-AMT-AR-DAY-30-AC (WS-SUM-STRT-INDX)       
T10667              MOVE WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) TO       
T10667                     WS-AMT-AR-DAY-60-AC (WS-SUM-STRT-INDX)       
T10667              MOVE WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) TO       
T10667                     WS-AMT-AR-DAY-90-AC (WS-SUM-STRT-INDX)       
T10667              MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) TO       
T10667                     WS-AMT-UNUSED-CR-AC (WS-SUM-STRT-INDX)       
T10667              MOVE WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX) TO   
T10667                     WS-TOT-SUMM-UNBILLED-AC (WS-SUM-STRT-INDX)   
T10667           END-IF                                                 
T10667        END-IF                                                    
T10667     END-PERFORM.                                                 
                                                                        
T10667 1500-EXIT.                                                       
T10667     EXIT.                                                        
      /                                                                 29810000
T10667* THIS PARAGRAPH WILL REMOVE THE SUMMARY CREATED IN 1500-.        29820000
                                                                        
T10667 1550-UNLOAD-SUMM-ROWS.                                           
T12728*    SET THE SUM-STRT INDEX TO THE LAST NON-SUMMARY AR CNTL ROW   29850000
T12728     SET WS-SUM-STRT-INDX TO WS-HOLD-SUM-START.                   
T12728     SET WS-SUM-STRT-INDX DOWN BY 1.                              
                                                                        
T10667     PERFORM VARYING WS-AR-DATA-INDX                              
T10667         FROM WS-HOLD-SUM-START BY 1                              
P00097       UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY                    
T12728        IF WS-ITEM-ID-AC (WS-AR-DATA-INDX) > 0                    
T12728*          THE AR-CNTL RECORD IS A NOT A SUMMARY ROW AND WAS      29930000
T12728*           ADDED DURING THE CREDIT PROCESS (CIA), SO KEEP THE    29940000
T12728*           DETAIL ROW                                            29950000
T12728           SET WS-SUM-STRT-INDX UP BY 1                           
T12728           MOVE WS-AR-DATA (WS-AR-DATA-INDX) TO                   
T12728                  WS-AR-DATA (WS-SUM-STRT-INDX)                   
T12728        END-IF                                                    
T10667        INITIALIZE WS-AR-DATA (WS-AR-DATA-INDX)                   
T10667     END-PERFORM.                                                 
                                                                        
T10667 1550-EXIT.                                                       
T10667     EXIT.                                                        
      /                                                                 30050000
       2000-PROCESS-AR-CNTRL.                                           
TF1        IF NOT WS-SINGLE-ITEM-BILL                                   
TF1              OR (WS-SINGLE-ITEM-BILL                                
                    AND WS-FDB07-PYMT-PRIORITY-LVL                      
                        = WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)     
                    AND WS-FDB07-ITEM-ID                                
                        = WS-ITEM-ID-AC (WS-AR-DATA-INDX))              
              PERFORM 2100-PROCESS-CURRENT-CHARGES THRU 2100-EXIT       
           END-IF                                                       
                                                                        
           IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)                 
PCR072         = 50 OR 60 OR 90 OR 100 OR 110                           
PCR072             PERFORM 5002-COMPUTE-UNBILLED   THRU 5002-EXIT       
           END-IF                                                       
           .                                                            
                                                                        
       2000-EXIT.                                                       
           EXIT.                                                        
      /                                                                 30240000
       2010-LOAD-REBILL-ARRAY.                                          
           PERFORM VARYING WS-BILLING-INDX FROM 1 BY 1                  
                   UNTIL WS-BILLING-INDX > 30                           
                      OR WS-ACCOUNT-NO-BG (WS-BILLING-INDX) = ZERO      
T14446        IF WS-DATE-ORIG-BILL-BG (WS-BILLING-INDX) > 0             
T15472         OR WS-ADJ-REASON-CD-BG (WS-BILLING-INDX) > SPACES        
KDFKDF         OR WS-CODE-BILL-CALC-BG (WS-BILLING-INDX) NOT = 'A'      
T16332           IF WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX) = 'U'        
T16332              PERFORM 2016-FIND-SERVICE-TYPE THRU 2016-EXIT       
T16332           END-IF                                                 
                 SET WS-RE-INDX TO 1                                    
T14446           SEARCH WS-REBILL-ENTRY                                 
T16332            WHEN WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX) =         
T16332                   'U' AND                                        
T16332                   WS-RE-DATE-BILLED (WS-RE-INDX) =               
T16332                   WS-DATE-ORIG-BILL-BG (WS-BILLING-INDX) AND     
T16332                   WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) =            
T17541                   CP-CODE-SERVICE-TYPE                           
T16332                PERFORM 2014-UPD-REBILL-ROW THRU 2014-EXIT        
T14446             WHEN WS-RE-DATE-BILLED (WS-RE-INDX) =                
T14446                   WS-DATE-ORIG-BILL-BG (WS-BILLING-INDX) AND     
T14446                   WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) =            
T14446                   WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX)         
T14446                    PERFORM 2014-UPD-REBILL-ROW THRU 2014-EXIT    
T18833             WHEN WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = SPACES      
T14446                   PERFORM 2012-ADD-REBILL-ROW THRU 2012-EXIT     
T14446           END-SEARCH                                             
T14446        END-IF                                                    
           END-PERFORM.                                                 
       2010-EXIT.                                                       
           EXIT.                                                        
      /                                                                 30570000
T14446 2012-ADD-REBILL-ROW.                                             
           MOVE WS-DATE-ORIG-BILL-BG (WS-BILLING-INDX)                  
                   TO WS-RE-DATE-BILLED (WS-RE-INDX)                    
           IF WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX) = 'E' OR 'G'       
              MOVE WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX)               
                       TO WS-RE-CODE-UTIL-TYPE (WS-RE-INDX)             
           ELSE                                                         
T17541        MOVE CP-CODE-SERVICE-TYPE                                 
T17541                       TO WS-RE-CODE-UTIL-TYPE (WS-RE-INDX)       
           END-IF.                                                      
T14446     PERFORM 2014-UPD-REBILL-ROW  THRU 2014-EXIT.                 
T14446 2012-EXIT.                                                       
           EXIT.                                                        
      /                                                                 30710000
T14446 2014-UPD-REBILL-ROW.                                             
           IF WS-CODE-DR-CR-CNSMPTN-BG (WS-BILLING-INDX) = 'D'          
              ADD WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)                 
T14446                TO WS-RE-REBILL-AMT (WS-RE-INDX)                  
           ELSE                                                         
              SUBTRACT WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)            
                      FROM WS-RE-BACKOUT-AMT (WS-RE-INDX)               
           END-IF.                                                      
T14446 2014-EXIT.                                                       
           EXIT.                                                        
      /                                                                 30820000
       2015-BACK-OUT-CANCEL.                                            
           PERFORM VARYING WS-RE-INDX FROM 1 BY 1                       
T16972             UNTIL WS-RE-INDX > 48                                
                      OR WS-RE-DATE-BILLED (WS-RE-INDX) = SPACES        
T15304        IF WS-CODE-BUDGET = WS-CODE-USED                          
T15304         SET WS-AR-DATA-INDX TO 1                                 
T15304         SEARCH WS-AR-DATA                                        
T15304          AT END                                                  
T15304           MOVE 'AR CONTROL TABLE OVERFLOW'                       
T15304             TO WS-MISC-MSG-TEXT                                  
T15304           MOVE +25 TO WS-MISC-MSG-LEN                            
T18829           MOVE 12 TO RETURN-CODE                                 
T15304           PERFORM 9910-MISC-ERROR THRU 9910-EXIT                 
T15304          WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = +50    
T15304             CONTINUE                                             
T15304         END-SEARCH                                               
T15304        ELSE                                                      
P00097         IF WS-UTE-AR-INDX < WS-AC-MAX-ENTRY OR                   
P00097            WS-UTG-AR-INDX < WS-AC-MAX-ENTRY                      
T18375            IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'            
T18375              SET WS-AR-DATA-INDX TO WS-UTE-AR-INDX               
T18375            ELSE                                                  
T18375              SET WS-AR-DATA-INDX TO WS-UTG-AR-INDX               
T18375            END-IF                                                
               ELSE                                                     
T18375            PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1           
T18375                 UNTIL  WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO 
T18375            END-PERFORM                                           
T18375            MOVE WS-ACCOUNT-NO-AT   TO                            
T18375                          WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)      
T18375            IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'            
T18375                MOVE +40 TO                                       
T18375                      WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)   
T18375                MOVE 0   TO WS-ITEM-ID-AC (WS-AR-DATA-INDX)       
T18375                MOVE 'I' TO                                       
T18375                      WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)   
T31155                MOVE WS-CODE-USED TO WS-CODE-UTL                  
T18375                SET WS-UTE-AR-INDX  TO WS-AR-DATA-INDX            
T18375            END-IF                                                
T18375            IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'G'            
T18375                MOVE +45 TO                                       
T18375                      WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)   
T18375                MOVE 0   TO WS-ITEM-ID-AC (WS-AR-DATA-INDX)       
T18375                MOVE 'I' TO                                       
T18375                      WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)   
T31155                MOVE WS-CODE-USED TO WS-CODE-UTL                  
T18375                SET WS-UTG-AR-INDX  TO WS-AR-DATA-INDX            
T18375            END-IF                                                
               END-IF                                                   
T18375                                                                  
T15304        END-IF                                                    
                                                                        
              COMPUTE WS-REBILL-NET =                                   
                   WS-RE-BACKOUT-AMT (WS-RE-INDX)                       
T14446                + WS-RE-REBILL-AMT (WS-RE-INDX)                   
T14446        IF WS-REBILL-NET < 0                                      
                 EVALUATE TRUE                                          
T15472*             CREATE BILLS DO NOT HAVE AN ORIG-DATE-BILLED        31470000
T15472              WHEN WS-RE-DATE-BILLED (WS-RE-INDX) < 0             
T15472                 MOVE 'C' TO WS-CANREB-CODE-00-DAY-AT             
T15472                 DISPLAY '  ' WS-REBILL-NET                       
T15472                         ' SUBTRACTED FROM CURRENT'               
T15472                IF WS-CODE-BUDGET NOT = WS-CODE-USED              
T15472                 ADD      WS-REBILL-NET                           
T15472                     TO   WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
T15472                END-IF                                            
                    WHEN WS-RE-DATE-BILLED (WS-RE-INDX)                 
                            <= WS-DATE-BILL-DAY-90-AT                   
T5679                  IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'       
T5679                     MOVE 'Y' TO WS-ELEC-90-DAY-REBILL-SW          
T5679                  ELSE                                             
T5679                     MOVE 'Y' TO WS-GAS-90-DAY-REBILL-SW           
T5679                  END-IF                                           
                       MOVE 'A' TO WS-CANREB-CODE-90-DAY-AT             
                       DISPLAY '  ' WS-REBILL-NET                       
                               ' SUBTRACTED FROM 90 DAY'                
T15304                IF WS-CODE-BUDGET NOT = WS-CODE-USED              
                       ADD      WS-REBILL-NET                           
                          TO   WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)    
                       IF WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) < ZERO  
                          ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)     
                            TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)    
                          MOVE ZERO                                     
                            TO WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)    
                       END-IF                                           
T15304                END-IF                                            
T16373                SET WS-AR-HOLD-CR-INDX TO WS-AR-DATA-INDX         
T14478                PERFORM 4500-COMPUTE-ORIG-LPC THRU 4500-EXIT      
T14478                IF WS-AMT-POSTED-TOTAL > 0                        
T14478                   PERFORM 4510-COMPUTE-ADJUST-90 THRU 4510-EXIT  
T14478                END-IF                                            
T16373                SET WS-AR-DATA-INDX TO WS-AR-HOLD-CR-INDX         
                    WHEN WS-RE-DATE-BILLED (WS-RE-INDX)                 
                            <= WS-DATE-BILL-DAY-60-AT                   
T5679                  IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'       
T5679                     MOVE 'Y' TO WS-ELEC-60-DAY-REBILL-SW          
T14478                    MOVE 'N' TO WS-GAS-60-DAY-REBILL-SW           
T5679                  ELSE                                             
T5679                     MOVE 'Y' TO WS-GAS-60-DAY-REBILL-SW           
T14478                    MOVE 'N' TO WS-ELEC-60-DAY-REBILL-SW          
T5679                  END-IF                                           
                       MOVE 'A' TO WS-CANREB-CODE-60-DAY-AT             
                       DISPLAY '  ' WS-REBILL-NET                       
                               ' SUBTRACTED FROM 60 DAY'                
T15304                IF WS-CODE-BUDGET NOT = WS-CODE-USED              
                       ADD      WS-REBILL-NET                           
                           TO   WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)   
                       IF WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) < ZERO  
                          ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)     
                            TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)    
                          MOVE ZERO                                     
                            TO WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)    
                       END-IF                                           
T15304                END-IF                                            
T16373                SET WS-AR-HOLD-CR-INDX TO WS-AR-DATA-INDX         
T14478                PERFORM 4500-COMPUTE-ORIG-LPC THRU 4500-EXIT      
T14478                IF WS-AMT-POSTED-TOTAL > 0                        
T14478                   PERFORM 4520-COMPUTE-ADJUST-60 THRU 4520-EXIT  
T14478                END-IF                                            
T16373                SET WS-AR-DATA-INDX TO WS-AR-HOLD-CR-INDX         
                    WHEN WS-RE-DATE-BILLED (WS-RE-INDX)                 
                            <= WS-DATE-BILL-DAY-30-AT                   
T5679                  IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'       
T5679                     MOVE 'Y' TO WS-ELEC-30-DAY-REBILL-SW          
T5679                  ELSE                                             
T5679                     MOVE 'Y' TO WS-GAS-30-DAY-REBILL-SW           
T5679                  END-IF                                           
                       MOVE 'A' TO WS-CANREB-CODE-30-DAY-AT             
                       DISPLAY '  ' WS-REBILL-NET                       
                               ' SUBTRACTED FROM 30 DAY'                
T15304                IF WS-CODE-BUDGET NOT = WS-CODE-USED              
                       ADD      WS-REBILL-NET                           
                           TO   WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)   
                       IF WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) < ZERO  
                          ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)     
                            TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)    
                          MOVE ZERO                                     
                            TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)    
                       END-IF                                           
T15304                END-IF                                            
T16373                SET WS-AR-HOLD-CR-INDX TO WS-AR-DATA-INDX         
T14478                PERFORM 4500-COMPUTE-ORIG-LPC THRU 4500-EXIT      
T14478                IF WS-AMT-POSTED-TOTAL > 0                        
T14478                   PERFORM 4530-COMPUTE-ADJUST-30 THRU 4530-EXIT  
T14478                END-IF                                            
T16373                SET WS-AR-DATA-INDX TO WS-AR-HOLD-CR-INDX         
                    WHEN OTHER                                          
                       MOVE 'C' TO WS-CANREB-CODE-00-DAY-AT             
                       DISPLAY '  ' WS-REBILL-NET                       
                               ' SUBTRACTED FROM CURRENT'               
T15304                IF WS-CODE-BUDGET NOT = WS-CODE-USED              
                       ADD      WS-REBILL-NET                           
                           TO   WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
T15304                END-IF                                            
                 END-EVALUATE                                           
T31966           IF WS-CODE-BILL-PEND-AT = WS-PEND-ASAP                 
                  IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) < ZERO       
                    ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)           
                      TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)          
                    MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)  
PCR614*             MOVE THE AMT-UNUSED-CREDIT TO THE CIA ROW           32590000
PCR614              PERFORM 5030-CREATE-CIA  THRU 5030-EXIT             
                  END-IF                                                
T31966           END-IF                                                 
              ELSE                                                      
                 EVALUATE TRUE                                          
T15472*             CREATE BILLS DO NOT HAVE AN ORIG-DATE-BILLED        32650000
T15472              WHEN WS-RE-DATE-BILLED (WS-RE-INDX) < 0             
T15472                 MOVE 'C' TO WS-CANREB-CODE-00-DAY-AT             
                    WHEN WS-RE-DATE-BILLED (WS-RE-INDX)                 
                            <= WS-DATE-BILL-DAY-90-AT                   
T5679                  IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'       
T5679                     MOVE 'Y' TO WS-ELEC-90-DAY-REBILL-SW          
T5679                  ELSE                                             
T5679                     MOVE 'Y' TO WS-GAS-90-DAY-REBILL-SW           
T5679                  END-IF                                           
                       MOVE '*' TO WS-CANREB-CODE-90-DAY-AT             
                    WHEN WS-RE-DATE-BILLED (WS-RE-INDX)                 
                            <= WS-DATE-BILL-DAY-60-AT                   
T5679                  IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'       
T5679                     MOVE 'Y' TO WS-ELEC-60-DAY-REBILL-SW          
T5679                  ELSE                                             
T5679                     MOVE 'Y' TO WS-GAS-60-DAY-REBILL-SW           
T5679                  END-IF                                           
                       MOVE '*' TO WS-CANREB-CODE-60-DAY-AT             
                    WHEN WS-RE-DATE-BILLED (WS-RE-INDX)                 
                            <= WS-DATE-BILL-DAY-30-AT                   
T5679                  IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'       
T5679                     MOVE 'Y' TO WS-ELEC-30-DAY-REBILL-SW          
T5679                  ELSE                                             
T5679                     MOVE 'Y' TO WS-GAS-30-DAY-REBILL-SW           
T5679                  END-IF                                           
                       MOVE '*' TO WS-CANREB-CODE-30-DAY-AT             
                    WHEN OTHER                                          
                       MOVE 'C' TO WS-CANREB-CODE-00-DAY-AT             
                 END-EVALUATE                                           
                                                                        
T15304          IF WS-CODE-BUDGET NOT = WS-CODE-USED                    
                 ADD WS-REBILL-NET                                      
                   TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
T15304          END-IF                                                  
                 DISPLAY '  ' WS-REBILL-NET                             
                         ' ADDED TO CURRENT'                            
              END-IF                                                    
           END-PERFORM.                                                 
                                                                        
       2015-EXIT.                                                       
           EXIT.                                                        
                                                                        
T16332 2016-FIND-SERVICE-TYPE.                                          
                                                                        
T16974     MOVE WS-ACCOUNT-NO-BG (WS-BILLING-INDX) TO WS-ACCOUNT-NO.    
T16974     MOVE WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX)                  
T16974                          TO WS-CODE-UTIL-TYPE.                   
T16974     MOVE WS-IC-NO-BG (WS-BILLING-INDX) TO WS-IC-NO.              
T16974                                                                  
T16974     EXEC SQL                                                     
T16974        SELECT DISTINCT (CODE_SERVICE_TYPE)                       
T16974          INTO :CP-CODE-SERVICE-TYPE                              
T16974          FROM CSS_CUST_PLAN                                      
T16974          WHERE ACCOUNT_NO     = :WS-ACCOUNT-NO                   
T16974            AND CODE_UTIL_TYPE = :WS-CODE-UTIL-TYPE               
T16974            AND IC_NO          = :WS-IC-NO                        
T16974     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T16974                                                                  
T16974     IF SQLCODE = SUCCESSFUL-CALL                                 
T16974        IF CP-CODE-SERVICE-TYPE                                   
T16974             = WS-GAS                                             
T16974           ADD WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)              
T16974               TO WS-GAS-AMT                                      
T16974        ELSE                                                      
T16974           ADD WS-AMT-BILL-ITEM-BG (WS-BILLING-INDX)              
T16974              TO WS-ELEC-AMT                                      
T16974        END-IF                                                    
T16974     ELSE                                                         
T16974        MOVE 'NO CP FOR UNMETERED BG'                             
T16974           TO WS-MISC-MSG-TEXT                                    
T16974        MOVE +22 TO WS-MISC-MSG-LEN                               
T16974        MOVE 12 TO RETURN-CODE                                    
T16974        PERFORM 9910-MISC-ERROR THRU 9910-EXIT                    
T16974     END-IF.                                                      
                                                                        
T16332 2016-EXIT.                                                       
T16332     EXIT.                                                        
      /                                                                 33450000
       2020-COMPUTE-LPC-BASE.                                           
      ***************************************************************   33470000
      **                                                           **   33480000
      **  COMPUTE LPC BASE (BEFORE BILL)                                33490000
      **                                                           **   33500000
      ***************************************************************   33510000
           EVALUATE TRUE                                                
              WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) =          
PCR072             40 OR 45 OR 50 OR 30                                 
                      OR 80 OR 60 OR 20                                 
                                                                        
                 IF WS-DATE-BILL-DAY-90-AT < LS-DATE-25-DAYS-AGO        
C26990              OR (WS-DATE-BILL-DAY-90-AT < LS-DATE-20-DAYS-AGO    
C26990              AND WS-REGULATED-CD-AT = '02')                      
T27700              OR  (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 20)
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC                 
                 ELSE                                                   
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-UTIL-XMT-BFR-BILL-CALC                  
                 END-IF                                                 
      *                                                                 33670000
                 IF WS-DATE-BILL-DAY-60-AT < LS-DATE-25-DAYS-AGO        
C26990              OR (WS-DATE-BILL-DAY-60-AT < LS-DATE-20-DAYS-AGO    
C26990              AND WS-REGULATED-CD-AT = '02')                      
T27700              OR  (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 20)
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC                 
                 ELSE                                                   
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-UTIL-XMT-BFR-BILL-CALC                  
                 END-IF                                                 
      *                                                                 33780000
                 IF WS-DATE-BILL-DAY-30-AT < LS-DATE-25-DAYS-AGO        
C26990              OR (WS-DATE-BILL-DAY-30-AT < LS-DATE-20-DAYS-AGO    
C26990              AND WS-REGULATED-CD-AT = '02')                      
T27700              OR  (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 20)
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC                 
                 ELSE                                                   
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-UTIL-XMT-BFR-BILL-CALC                  
                 END-IF                                                 
      *                                                                 33890000
C36303        WHEN CSR-DATABASE                                         
C36303         AND WS-COMPANY-NO-AT = WS-SCEG                           
C36303         AND WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 100      
C36303         AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) >= 9500000           
C36303         AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) <= 9500999           
C36303             ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) TO         
C36303                 WS-LPC-NONUT-XMT-BFR-BILL-CALC                   
C36303             ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) TO         
C36303                 WS-LPC-NONUT-XMT-BFR-BILL-CALC                   
C36303             ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) TO         
C36303                 WS-LPC-NONUT-XMT-BFR-BILL-CALC                   
      *                                                                 34010000
              WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) =          
                   39 OR 19 OR 29 OR 100                                
                 IF WS-DATE-BILL-DAY-90-AT < LS-DATE-25-DAYS-AGO        
C26990              OR (WS-DATE-BILL-DAY-90-AT < LS-DATE-20-DAYS-AGO    
C26990              AND WS-REGULATED-CD-AT = '02')                      
T27700              OR  (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 29)
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-NONUT-ELG-BFR-BILL-CALC                 
                 ELSE                                                   
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                 
                 END-IF                                                 
      *                                                                 34140000
                 IF WS-DATE-BILL-DAY-60-AT < LS-DATE-25-DAYS-AGO        
C26990              OR (WS-DATE-BILL-DAY-60-AT < LS-DATE-20-DAYS-AGO    
C26990              AND WS-REGULATED-CD-AT = '02')                      
T27700              OR  (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 29)
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-NONUT-ELG-BFR-BILL-CALC                 
                 ELSE                                                   
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                 
                 END-IF                                                 
      *                                                                 34250000
                 IF WS-DATE-BILL-DAY-30-AT < LS-DATE-25-DAYS-AGO        
C26990              OR (WS-DATE-BILL-DAY-30-AT < LS-DATE-20-DAYS-AGO    
C26990              AND WS-REGULATED-CD-AT = '02')                      
T27700              OR  (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 29)
CSG821*           FOR NSC CHARGES THAT AREN'T 25 DAYS OLD, DO NOT       34300000
CSG821*           INCLUDE IN THE LPN (THEY ARE AGED)                    34310000
CSG821            IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 19     
CSG821               AND WS-CURRENT-LT-25-DAYS-CALC-AC (WS-AR-DATA-INDX)
CSG821                           = WS-YES                               
CSG821              ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
CSG821                TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                 
CSG821            ELSE                                                  
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-NONUT-ELG-BFR-BILL-CALC                 
CSG821            END-IF                                                
                 ELSE                                                   
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                 
                 END-IF                                                 
      *                                                                 34450000
              WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 90       
                 SET WS-DFA-INDX TO 1                                   
                 SEARCH  WS-DFA-ACCT-DATA                               
                    AT END                                              
      ** AC'S THAT ARE SET UP FOR EARNEST MONEY WILL NOT HAVE A         34500000
      ** MATCHING DFA ENTRY; THERE IS NO PROCESSING REQUIRED HERE       34510000
      ** FOR THOSE                                                      34520000
                       CONTINUE                                         
                    WHEN WS-ACCOUNT-NO-DA (WS-DFA-INDX)                 
                          = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)          
                         AND WS-PYMT-PRIORITY-LVL-DA (WS-DFA-INDX)      
                          = WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)   
                         AND WS-DFA-ITEM-ID-DA (WS-DFA-INDX)            
                          = WS-ITEM-ID-AC   (WS-AR-DATA-INDX)           
                       IF WS-CODE-DFA-TYPE-DA (WS-DFA-INDX) = WS-DPP    
T32645                    IF SEB-DATABASE                               
T32645                       ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)  
T32645                           WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)  
T32645                           WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)  
T32645                                TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC 
T32645                    ELSE                                          
T15456                       ADD WS-AMT-TRAN-BALANCE-AC                 
T15456                                           (WS-AR-DATA-INDX)      
                                      TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC 
T32645                    END-IF                                        
T17969** LOOP AR-DATA TO FIND UNPAID EARNEST PAYMENTS                   34710000
T17969                    PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1   
P00097                             UNTIL WS-AR-DATA-INDX >              
P00097                                   WS-AC-MAX-ENTRY                
T17969                            OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) 
T17969                              = ZERO                              
T17969                      IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)
T17969                         = 90                                     
T17969                      AND WS-ITEM-ID-AC (WS-AR-DATA-INDX)         
T17969                         < 30000000                               
T17969                          IF WS-DATE-BILL-DAY-90-AT               
T17969                            < LS-DATE-25-DAYS-AGO                 
C26990                              OR (WS-DATE-BILL-DAY-90-AT <        
C26990                                  LS-DATE-20-DAYS-AGO             
C26990                              AND WS-REGULATED-CD-AT = '02')      
T17969                                ADD WS-AMT-AR-DAY-90-AC           
T17969                                   (WS-AR-DATA-INDX)  TO          
T17969                                WS-LPC-UTIL-ELIG-BFR-BILL-CALC    
T17969                          ELSE                                    
T17969                                ADD WS-AMT-AR-DAY-90-AC           
T17969                                   (WS-AR-DATA-INDX)  TO          
T17969                                WS-LPC-UTIL-XMT-BFR-BILL-CALC     
T17969                          END-IF                                  
      *                                                                 34940000
T17969                          IF WS-DATE-BILL-DAY-60-AT               
T17969                            < LS-DATE-25-DAYS-AGO                 
C26990                              OR (WS-DATE-BILL-DAY-60-AT <        
C26990                                  LS-DATE-20-DAYS-AGO             
C26990                              AND WS-REGULATED-CD-AT = '02')      
T17969                                ADD WS-AMT-AR-DAY-60-AC           
T17969                                   (WS-AR-DATA-INDX)  TO          
T17969                                WS-LPC-UTIL-ELIG-BFR-BILL-CALC    
T17969                          ELSE                                    
T17969                                ADD WS-AMT-AR-DAY-60-AC           
T17969                                   (WS-AR-DATA-INDX)  TO          
T17969                                WS-LPC-UTIL-XMT-BFR-BILL-CALC     
T17969                          END-IF                                  
      *                                                                 35080000
T17969                          IF WS-DATE-BILL-DAY-30-AT               
T17969                            < LS-DATE-25-DAYS-AGO                 
C26990                              OR (WS-DATE-BILL-DAY-30-AT <        
C26990                                  LS-DATE-20-DAYS-AGO             
C26990                              AND WS-REGULATED-CD-AT = '02')      
T17969                                ADD WS-AMT-AR-DAY-30-AC           
T17969                                   (WS-AR-DATA-INDX)  TO          
T17969                                WS-LPC-UTIL-ELIG-BFR-BILL-CALC    
T17969                          ELSE                                    
T17969                                ADD WS-AMT-AR-DAY-30-AC           
T17969                                   (WS-AR-DATA-INDX)  TO          
T17969                                WS-LPC-UTIL-XMT-BFR-BILL-CALC     
T17969                          END-IF                                  
T17969                      END-IF                                      
T17969                    END-PERFORM                                   
                       ELSE                                             
                         IF WS-DATE-BILL-DAY-90-AT < LS-DATE-25-DAYS-AGO
C26990                      OR (WS-DATE-BILL-DAY-90-AT <                
C26990                      LS-DATE-20-DAYS-AGO                         
C26990                      AND WS-REGULATED-CD-AT = '02')              
                            ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)   
                              TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC         
                         ELSE                                           
                            ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)   
                              TO WS-LPC-UTIL-XMT-BFR-BILL-CALC          
                         END-IF                                         
      *                                                                 35350000
                         IF WS-DATE-BILL-DAY-60-AT < LS-DATE-25-DAYS-AGO
C26990                      OR (WS-DATE-BILL-DAY-60-AT <                
C26990                      LS-DATE-20-DAYS-AGO                         
C26990                      AND WS-REGULATED-CD-AT = '02')              
                            ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)   
                              TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC         
                         ELSE                                           
                            ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)   
                              TO WS-LPC-UTIL-XMT-BFR-BILL-CALC          
                         END-IF                                         
      *                                                                 35460000
                         IF WS-DATE-BILL-DAY-30-AT < LS-DATE-25-DAYS-AGO
C26990                      OR (WS-DATE-BILL-DAY-30-AT <                
C26990                      LS-DATE-20-DAYS-AGO                         
C26990                      AND WS-REGULATED-CD-AT = '02')              
                            ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)   
                              TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC         
                         ELSE                                           
                            ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)   
                              TO WS-LPC-UTIL-XMT-BFR-BILL-CALC          
                         END-IF                                         
                       END-IF                                           
                 END-SEARCH                                             
      *                                                                 35590000
              WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 129      
T9627              ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)            
T9627                TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                  
T5832              ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)            
T5832                TO WS-LPC-NONUT-XMT-BFR-BILL-CALC                  
      *                                                                 35670000
           END-EVALUATE                                                 
           .                                                            
       2020-EXIT.                                                       
           EXIT.                                                        
                                                                        
T19198 2025-BK-OUT-CIA-FROM-BASE.                                       
T19198     INITIALIZE  WS-TOTAL-CIA                                     
T19198          WS-CIA-LEFT-FOR-NONUT                                   
T19198     PERFORM VARYING WS-AR-DATA-INDX FROM 1 BY 1                  
P00097           UNTIL WS-AR-DATA-INDX > WS-AC-MAX-ENTRY                
T19198              OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO        
T19198       IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 70          
T19198            AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) = (1 OR 2)        
T19198                ADD WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)      
T19198                   TO WS-TOTAL-CIA                                
T19198       END-IF                                                     
T19198     END-PERFORM                                                  
T19198     IF WS-TOTAL-CIA < 0                                          
T19198       IF (WS-TOTAL-CIA * -1) <= WS-LPC-UTIL-ELIG-BFR-BILL-CALC OR
T19198                   WS-LPC-NONUT-ELG-BFR-BILL-CALC = 0             
T19198          ADD WS-TOTAL-CIA TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC      
T19198       ELSE                                                       
T19198          IF WS-LPC-NONUT-ELG-BFR-BILL-CALC > 0                   
T19198            COMPUTE WS-CIA-LEFT-FOR-NONUT =                       
T19198               WS-LPC-UTIL-ELIG-BFR-BILL-CALC + WS-TOTAL-CIA      
T19198            MOVE 0 TO WS-LPC-UTIL-ELIG-BFR-BILL-CALC              
T19198            ADD WS-CIA-LEFT-FOR-NONUT TO                          
T19198                WS-LPC-NONUT-ELG-BFR-BILL-CALC                    
T19198          END-IF                                                  
T19198       END-IF                                                     
T19198     END-IF.                                                      
T19198                                                                  
T19198 2025-EXIT.                                                       
T19198     EXIT.                                                        
T19198                                                                  
                                                                        
                                                                        
       2030-AGE-RECEIVABLES.                                            
      ***************************************************************   36060000
      **                                                           **   36070000
      **  AGE RECEIVABLES                                               36080000
      **                                                           **   36090000
      ***************************************************************   36100000
           ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)                    
             TO WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)                   
           MOVE WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)                   
             TO WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)                   
                                                                        
      ***************************************************************   36160000
      **                                                           **   36170000
      **  FOR DEP, ---- AND NSC, A FLAG IS SET IN CA102 TO         **   36180000
      **  INDICATE THAT THE CHARGE IS WITHIN THE PAST 25 DAYS.     **   36190000
      **  THESE DO NOT AGE (THE CURRENT CHARGE STAYS IN 0 DAY AND  **   36200000
      **  30 DAY IS CLEARED SINCE IT HAS ALREADY BEEN MOVED TO 60) **   36210000
CSG821****THE NSC WILL GET AGED, BUT WE'LL CHECK THE FLAG IN THE   **   36220000
CSG821****ASSESSMENT OF LPN (IF THE FLAG IS SET, WE WON'T ASSESS)  **   36230000
      **                                                           **   36240000
C23181**  FOR PSNC ALLOW 00-DAY FOR DEPOSIT TO BE AGED IMMEDIATELY.**   36250000
      **                                                           **   36260000
      ***************************************************************   36270000
C23181     IF CSR-DATABASE AND WS-COMPANY-NO-AT = WS-PSNC               
C23181        IF WS-CURRENT-LT-25-DAYS-CALC-AC (WS-AR-DATA-INDX)        
C23181              = WS-YES                                            
C23301           AND WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) NOT = 19 
C23181           AND WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) NOT = 80 
C23181             MOVE ZERO TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)   
C23181        ELSE                                                      
T28021             IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 100   
T28021                MOVE WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)           
T28021                TO   CT-ACCOUNT-NO                                
T28021                MOVE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)    
T28021                TO   CT-PYMT-PRIORITY-LVL                         
T28021                MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX)              
T28021                TO   CT-CNT-ITEM-ID                               
T28021                MOVE SPACES TO WS-CNT-STATUS-CD                   
T28021                PERFORM 7449-SELECT-CONTRACT-PEND THRU 7449-EXIT  
T28021                IF WS-CNT-STATUS-CD NOT = 'A'                     
C23181                 MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)       
C23181                   TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)       
C23181                 MOVE ZERO                                        
C23181                   TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)       
T28021                END-IF                                            
                   ELSE                                                 
C23181                 MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)       
C23181                   TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)       
C23181                 MOVE ZERO                                        
C23181                   TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)       
                   END-IF                                               
C23181        END-IF                                                    
C23181     ELSE                                                         
             IF WS-CURRENT-LT-25-DAYS-CALC-AC (WS-AR-DATA-INDX)         
                    = WS-YES                                            
CSG821         AND WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) NOT = 19   
C24365         AND WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) NOT = 80   
               MOVE ZERO TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)       
             ELSE                                                       
                MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)              
                     TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)      
             END-IF                                                     
C23181     END-IF.                                                      
       2030-EXIT.                                                       
           EXIT.                                                        
                                                                        
T8556  2032-MOVE-SUMM-UNBILLED.                                         
      ***************************************************************   36730000
      ** TRANSFERRED AR REMAINS IN SUMM-UNBILLED UNTIL THE MASTER  **   36740000
      ** IS BILLED.                                                **   36750000
      **                                                           **   36760000
      ***************************************************************   36770000
TF1        IF NOT WS-SINGLE-ITEM-BILL                                   
T8556       IF WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX) > 0            
                                                                        
T10894*       IF THE LPC IS IN UNBILLED, THE JOURNAL SHOULD BE A        36810000
T10933*       WASH JOURNAL.  SET THE WASH-LPC FLAG.                     36820000
T10894        IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 30         
T10933           SET WASH-LPC-JRNL TO TRUE                              
T13990           ADD  WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)         
T13990                TO WS-TOT-SUMM-UNBILLED-LPC                       
T10894        END-IF                                                    
                                                                        
T13990        IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 39         
T16185           SET WASH-LPC-JRNL TO TRUE                              
T13990           ADD  WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)         
T13990                TO WS-TOT-SUMM-UNBILLED-LPN                       
T13990        END-IF                                                    
                                                                        
T12600*       IF THE EPP IS IN UNBILLED, THE JOURNAL SHOULD BE A        36950000
T12600*       WASH JOURNAL.  SET THE AR-AGE TO 'A' FOR BILL PRINT       36960000
T12600        IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 50         
T12600           MOVE 'A' TO WS-101-AR-AGE                              
T12600        ELSE                                                      
T12600           MOVE '0' TO WS-101-AR-AGE                              
T12600        END-IF                                                    
                                                                        
              ADD WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)             
                TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
T8556         SET WS-SUMM-UNBILLED TO TRUE                              
T8556         PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT       
T8556         SET WS-NOT-SUMM-UNBILLED TO TRUE                          
T10933        SET NOT-WASH-LPC-JRNL    TO TRUE                          
              MOVE ZERO TO WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)    
                                                                        
T8556       END-IF                                                      
           END-IF                                                       
           .                                                            
T8556  2032-EXIT.                                                       
T8556      EXIT.                                                        
                                                                        
      /   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *  ** 37550000
      *                                                              ** 37560000
CG0318*    2055-CALL-SCSCA106                                        ** 37570000
      *       APPLY CIA                                              ** 37580000
      *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *  ** 37590000
CG0318 2055-PROCESS-CIA-CREDIT.                                         
CG0318     CALL SCSCA106 USING LS-PCSCA100-COMM-AREA                    
CG0318                         WS-BILLING-WQ-ITEMS-WF                   
CG0318                         WS-GL-NAME-INFO                          
CG0318                         WS-GL-ACCT-NO-TABLE                      
CG0318                         WS-GL-ACCT-MAJOR-FIELDS                  
CG0318                         WS-PREMISE-PR                            
CG0318                         WS-CUSTOMER-CU                           
CG0318                         WS-ACCOUNT-AT                            
CG0318                         WS-DEP-ON-HAND-DO                        
CG0318                         WS-CREDIT-PROFILE-CZ                     
      *                                                                 37710000
CG0318                         WS-AR-CNTRL-AC                           
CG0318                         WS-CHRG-OFF-CO                           
CG0318                         WS-DFA-ACCT-DA                           
CG0318                         WS-DFA-RECV-DV                           
CG0318                         WS-CONTRACT-CT                           
CG0318                         WS-PROJECT-SHARE-PJ                      
CG0318                         WS-CONNECT-CHRG-CC                       
CG0318                         WS-HOLD-WK03                             
T16786                         WS-CIA-LIHEAP-CREDIT                     
P00097                         WS-CIA-CREDIT                            
P00097                         WS-CWS1000B-MAX-TBL-LIMITS.              
                                                                        
CG0318 2055-EXIT.                                                       
CG0318     EXIT.                                                        
                                                                        
      /   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *  ** 37880000
      *                                                              ** 37890000
      *    2060-CALL-SCSCA117                                        ** 37900000
      *       APPLY CREDIT CONTRACTS                                 ** 37910000
      *                                                              ** 37920000
      *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *  ** 37930000
       2060-PROCESS-CRED-CONTRACT.                                      
                                                                        
           CALL SCSCA117 USING LS-PCSCA100-COMM-AREA                    
                               WS-BILLING-WQ-ITEMS-WF                   
                               WS-GL-NAME-INFO                          
                               WS-GL-ACCT-NO-TABLE                      
                               WS-GL-ACCT-MAJOR-FIELDS                  
                               WS-PREMISE-PR                            
                               WS-CUSTOMER-CU                           
                               WS-ACCOUNT-AT                            
                               WS-CONTRACT-CT                           
                               WS-CHRG-OFF-CO                           
                               WS-AR-CNTRL-AC                           
                               WS-DFA-ACCT-DA                           
                               WS-DFA-RECV-DV                           
                               WS-DEP-ON-HAND-DO                        
T5499                          WS-PROJECT-SHARE-PJ                      
P00097                         WS-HOLD-WK03                             
P00097                         WS-CWS1000B-MAX-TBL-LIMITS.              
                                                                        
       2060-EXIT.                                                       
           EXIT.                                                        
                                                                        
      /                                                                 38180000
       2100-PROCESS-CURRENT-CHARGES.                                    
           INITIALIZE CJF00101.                                         
                                                                        
           EVALUATE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)           
              WHEN 19                                                   
              WHEN 20                                                   
              WHEN 29                                                   
T8556            PERFORM 2032-MOVE-SUMM-UNBILLED  THRU 2032-EXIT        
              WHEN 30                                                   
T8556            PERFORM 2032-MOVE-SUMM-UNBILLED  THRU 2032-EXIT        
                 SET WS-THERE-IS-A-UTL-LPC-AC TO TRUE                   
              WHEN 39                                                   
T8556            PERFORM 2032-MOVE-SUMM-UNBILLED  THRU 2032-EXIT        
                 SET WS-THERE-IS-A-NONUT-LPC-AC TO TRUE                 
              WHEN 40                                                   
PCR212           MOVE ZERO     TO WS-UTE-ARREARS                        
                 SET HAS-ELE-AC TO TRUE                                 
                 IF WS-HAVE-UTL-DOLLARS-BEEN-USED EQUAL WS-NO           
                       PERFORM 2120-PROCESS-UTL-RECV THRU 2120-EXIT     
                       ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)   
                        TO WS-UTE-NEW-ACCUM (WS-LO-INDX)                
T8556               PERFORM 2032-MOVE-SUMM-UNBILLED  THRU 2032-EXIT     
                       IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO  
                         PERFORM 5005-APPLY-UNUSED-CREDIT THRU 5005-EXIT
                       END-IF                                           
                 END-IF                                                 
              WHEN 45                                                   
PCR212           MOVE ZERO     TO WS-UTG-ARREARS                        
                 SET HAS-GAS-AC TO TRUE                                 
                 IF WS-HAVE-GAS-DOLLARS-BEEN-USED EQUAL WS-NO           
                       PERFORM 2121-PROCESS-GAS-RECV THRU 2121-EXIT     
                       ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)   
                        TO WS-UTG-NEW-ACCUM (WS-LO-INDX)                
T8556               PERFORM 2032-MOVE-SUMM-UNBILLED  THRU 2032-EXIT     
                       IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO  
                         PERFORM 5005-APPLY-UNUSED-CREDIT THRU 5005-EXIT
                       END-IF                                           
                 END-IF                                                 
              WHEN 50                                                   
                 SET HAS-BUD-AC TO TRUE                                 
PCR212           MOVE 'N' TO WS-BUD-ELEC-SERVICE-IND                    
PCR212           MOVE 'N' TO WS-BUD-GAS-SERVICE-IND                     
T17777           SET WS-HOLD-BUDGET-INDX  TO  WS-AR-DATA-INDX           
                 IF WS-HAVE-UTL-DOLLARS-BEEN-USED EQUAL WS-NO           
P00453                 IF WS-CODE-PRE-PAY-PLAN = WS-CODE-USED           
P00453                    PERFORM 2135-PROCESS-PRP-RECV THRU 2135-EXIT  
P00453                 ELSE                                             
P00453                    PERFORM 2130-PROCESS-BUD-RECV THRU 2130-EXIT  
P00453                    ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)
P00453                    TO WS-EPP-NEW-ACCUM (WS-LO-INDX)              
P00453                 END-IF                                           
T15304                 IF NOT WS-OFF-CYCLE-REBILL                       
T18579                   IF WS-EPP-WASH-NOT-JRNLED                      
                            IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) > 0
                              PERFORM 5200-CREATE-101-JRNL-FROM-AC      
                                  THRU 5200-EXIT                        
                            END-IF                                      
T18579                   END-IF                                         
T15304                 END-IF                                           
T8556               PERFORM 2032-MOVE-SUMM-UNBILLED  THRU 2032-EXIT     
                       IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO  
                         PERFORM 5005-APPLY-UNUSED-CREDIT THRU 5005-EXIT
                       END-IF                                           
                 END-IF                                                 
PCR212           PERFORM 2110-DETERMINE-BUD-SERV THRU 2110-EXIT         
              WHEN 60                                                   
                 SET WS-CCC-INDX TO  1                                  
                 SEARCH  WS-CONNECT-CHRG-DATA                           
                    AT END                                              
                       MOVE 'CCC ENTRY NOT FOUND '                      
                         TO WS-MISC-MSG-TEXT                            
                       MOVE +25 TO WS-MISC-MSG-LEN                      
T18829                 MOVE 12 TO RETURN-CODE                           
                       PERFORM 9910-MISC-ERROR THRU 9910-EXIT           
                    WHEN  WS-ACCOUNT-NO-CC (WS-CCC-INDX)                
                             = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)       
                          AND  WS-CCC-ITEM-ID-CC  (WS-CCC-INDX)         
                             = WS-ITEM-ID-AC (WS-AR-DATA-INDX)          
T12148               IF NOT WS-OFF-CYCLE-REBILL                         
                       PERFORM 2140-PROCESS-CCC-RECV THRU 2140-EXIT     
                       IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)         
                             > ZERO                                     
                        PERFORM 5200-CREATE-101-JRNL-FROM-AC            
                           THRU 5200-EXIT                               
                       END-IF                                           
T12148               END-IF                                             
T8556                PERFORM 2032-MOVE-SUMM-UNBILLED  THRU 2032-EXIT    
                     IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)           
                             < ZERO                                     
                          PERFORM 5005-APPLY-UNUSED-CREDIT              
                             THRU 5005-EXIT                             
                     END-IF                                             
                 END-SEARCH                                             
              WHEN 80                                                   
T14446           IF WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP             
                    SET WS-DEP-REQ-INDX TO  1                           
                    SEARCH  WS-DEP-REQ-DATA                             
                       AT END                                           
                          MOVE 'DREQ ENTRY NOT FOUND'                   
                            TO WS-MISC-MSG-TEXT                         
                          MOVE +20 TO WS-MISC-MSG-LEN                   
T18829                    MOVE 12 TO RETURN-CODE                        
                          PERFORM 9910-MISC-ERROR THRU 9910-EXIT        
                       WHEN  WS-ACCOUNT-NO-DR (WS-DEP-REQ-INDX)         
                             = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)       
                             AND  WS-DEP-ITEM-ID-DR (WS-DEP-REQ-INDX)   
                             = WS-ITEM-ID-AC (WS-AR-DATA-INDX)          
                         IF WS-DATE-PYMT-START-DR (WS-DEP-REQ-INDX)     
                                > LS-INPUT-DATE                         
                             MOVE ZERO                                  
                               TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) 
                         ELSE                                           
T10985*                   BILL IMMEDIATE DEPOSITS WON'T UPDATE 0-DAY    39390000
T10985                    IF WS-DEP-BILL-OPTION-CD (WS-DEP-REQ-INDX)    
T10985                           NOT = 'I'                              
                            PERFORM 2170-PROCESS-DEP-RECV THRU 2170-EXIT
                            IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)    
                                                       > ZERO           
                               PERFORM 5200-CREATE-101-JRNL-FROM-AC     
                                  THRU 5200-EXIT                        
                            END-IF                                      
T10985                    END-IF                                        
T8556                     PERFORM 2032-MOVE-SUMM-UNBILLED               
T8556                          THRU 2032-EXIT                           
                          IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)      
                                   < ZERO                               
                               PERFORM 5005-APPLY-UNUSED-CREDIT         
                                  THRU 5005-EXIT                        
                          END-IF                                        
T10985                    IF WS-DEP-BILL-OPTION-CD (WS-DEP-REQ-INDX)    
T10985                           NOT = 'I'                              
T10549                      ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
T10549                        TO WS-DEP-NEW-ACCUM (WS-LO-INDX)          
T10985                    END-IF                                        
                         END-IF                                         
                    END-SEARCH                                          
                 END-IF                                                 
              WHEN 90                                                   
                 SET WS-DFA-INDX TO 1                                   
                 SEARCH  WS-DFA-ACCT-DATA                               
                    AT END                                              
      ** AC'S THAT ARE SET UP FOR EARNEST MONEY WILL NOT HAVE A         39680000
      ** MATCHING DFA ENTRY; THERE IS NO PROCESSING REQUIRED HERE       39690000
      ** FOR THOSE                                                      39700000
                       CONTINUE                                         
A00908* MOVE EARNEST MONEY FROM SUM UNBILLED TO 00-DAY                  39710100
A00908              WHEN WS-ACCOUNT-NO-DA (WS-DFA-INDX)                 
A00908                    = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)          
A00908                   AND WS-PYMT-PRIORITY-LVL-DA (WS-DFA-INDX)      
A00908                    = WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)   
A00908                   AND WS-DFA-ITEM-ID-DA (WS-DFA-INDX)            
A00908                       NOT = WS-ITEM-ID-AC   (WS-AR-DATA-INDX)    
A00908                   AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) > 0        
A00908                   AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) < 30000000 
A00908                   PERFORM 2032-MOVE-SUMM-UNBILLED THRU 2032-EXIT 
A00908                   IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO
A00908                      PERFORM 5005-APPLY-UNUSED-CREDIT            
A00908                         THRU 5005-EXIT                           
A00908                   END-IF                                         
                    WHEN WS-ACCOUNT-NO-DA (WS-DFA-INDX)                 
                          = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)          
                         AND WS-PYMT-PRIORITY-LVL-DA (WS-DFA-INDX)      
                          = WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)   
                         AND WS-DFA-ITEM-ID-DA (WS-DFA-INDX)            
                          = WS-ITEM-ID-AC   (WS-AR-DATA-INDX)           
                     IF WS-CODE-DFA-TYPE-DA (WS-DFA-INDX) = WS-DPP      
                          SET WS-DV-INDX TO 1                           
                          SEARCH WS-DFA-RECV-DATA                       
                             AT END                                     
C32408                          CONTINUE                                
T9463                        WHEN WS-AGREEMENT-NO-DV (WS-DV-INDX)       
T9463                              = WS-DFA-ITEM-ID-DA (WS-DFA-INDX)    
T9463                          AND WS-DFA-PYMT-PRIORITY-DV (WS-DV-INDX) 
T9463                              = 40                                 
T9463                           ADD WS-AMT-DAY-30-DV (WS-DV-INDX)       
T9463                               WS-AMT-DAY-60-DV (WS-DV-INDX)       
T9463                               WS-AMT-DAY-90-DV (WS-DV-INDX) TO    
T9463                                 WS-DPP-ELEC-ARREARS               
T9463                        WHEN WS-AGREEMENT-NO-DV (WS-DV-INDX)       
T9463                              = WS-DFA-ITEM-ID-DA (WS-DFA-INDX)    
T9463                          AND WS-DFA-PYMT-PRIORITY-DV (WS-DV-INDX) 
T9463                              = 45                                 
T9463                           ADD WS-AMT-DAY-30-DV (WS-DV-INDX)       
T9463                               WS-AMT-DAY-60-DV (WS-DV-INDX)       
T9463                               WS-AMT-DAY-90-DV (WS-DV-INDX) TO    
T9463                                 WS-DPP-GAS-ARREARS                
                          END-SEARCH                                    
                     END-IF                                             
T12148               IF NOT WS-OFF-CYCLE-REBILL                         
                       PERFORM 2150-PROCESS-DFA-RECV THRU 2150-EXIT     
                       IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) > ZERO  
                          PERFORM 5200-CREATE-101-JRNL-FROM-AC          
                              THRU 5200-EXIT                            
                       END-IF                                           
T12148               END-IF                                             
T8556                PERFORM 2032-MOVE-SUMM-UNBILLED THRU 2032-EXIT     
                     IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO    
                         PERFORM 5005-APPLY-UNUSED-CREDIT THRU 5005-EXIT
                     END-IF                                             
                 END-SEARCH                                             
              WHEN 100                                                  
                 SET WS-CNT-INDX TO  1                                  
                 SEARCH  WS-CONTRACT-DATA                               
                    AT END                                              
                       MOVE 'CONTRACT ENTRY NOT FOUND'                  
                         TO WS-MISC-MSG-TEXT                            
                       MOVE +24 TO WS-MISC-MSG-LEN                      
T18829                 MOVE 12 TO RETURN-CODE                           
                       PERFORM 9910-MISC-ERROR THRU 9910-EXIT           
                    WHEN  WS-ACCOUNT-NO-CT (WS-CNT-INDX)                
                             = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)       
                          AND  WS-CNT-ITEM-ID-CT  (WS-CNT-INDX)         
                             = WS-ITEM-ID-AC (WS-AR-DATA-INDX)          
T12148                 IF NOT WS-OFF-CYCLE-REBILL                       
T28021                   IF WS-CNT-STATUS-CD-CT (WS-CNT-INDX) NOT = 'A' 
                          PERFORM 2180-PROCESS-CNT-RECV THRU 2180-EXIT  
                          ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)
                            TO WS-CNT-NEW-ACCUM (WS-LO-INDX)            
                          IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)      
                                  > ZERO                                
                            PERFORM 5200-CREATE-101-JRNL-FROM-AC        
                                THRU 5200-EXIT                          
C36303                      IF PACE-CNT-CANCEL                          
C36303                         MOVE ZERO TO                             
C36303                             WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)
C36303                          WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)
C36303                      END-IF                                      
ACT288                      IF  LS-CURR-REVENUE-MONTH                   
ACT288                          >= 201411                               
P00794                           PERFORM 2185-PROCESS-SRVCARE THRU      
P00794                                   2185-EXIT                      
P00794                      END-IF                                      
                          END-IF                                        
T28021                   END-IF                                         
C36304                 ELSE                                             
C36304                   PERFORM 2300-CALC-INSTAL-NUM-REBILLS THRU      
C36304                           2300-EXIT                              
T12148                 END-IF                                           
T8556                  PERFORM 2032-MOVE-SUMM-UNBILLED THRU 2032-EXIT   
                       IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)         
                                  < ZERO                                
                             PERFORM 5005-APPLY-UNUSED-CREDIT           
                                THRU 5005-EXIT                          
                       END-IF                                           
                 END-SEARCH                                             
              WHEN 129                                                  
                 IF WS-SHARE-STATUS-CD-PJ                               
T13274                 = WS-ACTIVE OR WS-PLEDGE OR WS-PJS-INACTIVE      
T12148               IF NOT WS-OFF-CYCLE-REBILL                         
                       PERFORM 2200-PROCESS-PJS-RECV THRU 2200-EXIT     
                       ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)   
                         TO WS-PJS-NEW-ACCUM (WS-LO-INDX)               
                       IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) > ZERO  
                           PERFORM 5200-CREATE-101-JRNL-FROM-AC         
                              THRU 5200-EXIT                            
                       END-IF                                           
A35920               PERFORM 2032-MOVE-SUMM-UNBILLED THRU 2032-EXIT     
                     IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO    
                         PERFORM 5005-APPLY-UNUSED-CREDIT THRU 5005-EXIT
                     END-IF                                             
                    END-IF                                              
A03044           ELSE                                                   
A03044              IF WS-SHARE-STATUS-CD-PJ = WS-ONETIME               
A03044                 PERFORM 2032-MOVE-SUMM-UNBILLED THRU 2032-EXIT   
A03044                 IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO  
A03044                    PERFORM 5005-APPLY-UNUSED-CREDIT              
A03044                                                THRU 5005-EXIT    
A03044                 END-IF                                           
A03044              END-IF                                              
T5846            END-IF                                                 
              WHEN OTHER                                                
                 CONTINUE                                               
           END-EVALUATE.                                                
       2100-EXIT.                                                       
           EXIT.                                                        
                                                                        
      /                                                                 41040000
T9627 * LOGIC PULLED OUT OF 2100- BECAUSE THE LPC LOGIC WAS MOVED       41050000
T9627 * TO AFTER PROCESSING EACH RECEIVABLE.                            41060000
T9627  2101-COMPUTE-DELIQUENT-CHARGES.                                  
           EVALUATE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)           
              WHEN 19                                                   
                 PERFORM 5004-COMPUTE-NON-UTL-DELINQ THRU 5004-EXIT     
                 ADD WS-CUR-ACCUM  TO WS-NSC-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-NSC-ARR-ACCUM (WS-LO-INDX)     
              WHEN 20                                                   
                 PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5003-EXIT         
                 ADD WS-CUR-ACCUM  TO WS-NSA-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-NSA-ARR-ACCUM (WS-LO-INDX)     
              WHEN 29                                                   
                 PERFORM 5004-COMPUTE-NON-UTL-DELINQ THRU 5004-EXIT     
                 ADD WS-CUR-ACCUM  TO WS-NSN-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-NSN-ARR-ACCUM (WS-LO-INDX)     
              WHEN 30                                                   
                 PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5003-EXIT         
                 ADD WS-CUR-ACCUM  TO WS-LPC-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-LPC-ARR-ACCUM (WS-LO-INDX)     
              WHEN 39                                                   
                 PERFORM 5004-COMPUTE-NON-UTL-DELINQ THRU 5004-EXIT     
                 ADD WS-CUR-ACCUM  TO WS-LPN-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-LPN-ARR-ACCUM (WS-LO-INDX)     
              WHEN 40                                                   
                 PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5003-EXIT         
                 ADD WS-CUR-ACCUM  TO WS-UTE-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-UTE-ARR-ACCUM (WS-LO-INDX)     
PCR212                                WS-UTE-ARREARS                    
              WHEN 45                                                   
                 PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5003-EXIT         
                 ADD WS-CUR-ACCUM  TO WS-UTG-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-UTG-ARR-ACCUM (WS-LO-INDX)     
PCR212                                WS-UTG-ARREARS                    
              WHEN 50                                                   
                 PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5003-EXIT         
                 ADD WS-CUR-ACCUM  TO WS-EPP-CUR-ACCUM (WS-LO-INDX)     
                 ADD WS-ARR-ACCUM  TO WS-EPP-ARR-ACCUM (WS-LO-INDX)     
                 ADD WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)           
                     TO WS-EPP-BAL-ACCUM (WS-LO-INDX)                   
T12245           SUBTRACT WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)         
T12245                    WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)         
T12245                    WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)         
T12245                    WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)         
T12245               FROM WS-EPP-BAL-ACCUM (WS-LO-INDX)                 
              WHEN 60                                                   
                 PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5003-EXIT         
                 ADD WS-CUR-ACCUM TO WS-RCC-CUR-ACCUM (WS-LO-INDX)      
                 ADD WS-ARR-ACCUM TO WS-RCC-ARR-ACCUM (WS-LO-INDX)      
                 ADD WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)           
                         TO WS-RCC-BAL-ACCUM (WS-LO-INDX)               
T12245           SUBTRACT WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)         
T12245                    WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)         
T12245                    WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)         
T12245                    WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)         
T12245                   FROM WS-RCC-BAL-ACCUM (WS-LO-INDX)             
              WHEN 80                                                   
                    SET WS-DEP-REQ-INDX TO  1                           
                    SEARCH  WS-DEP-REQ-DATA                             
                       AT END                                           
                          MOVE 'DREQ ENTRY NOT FOUND'                   
                            TO WS-MISC-MSG-TEXT                         
                          MOVE +20 TO WS-MISC-MSG-LEN                   
T18829                    MOVE 12 TO RETURN-CODE                        
                          PERFORM 9910-MISC-ERROR THRU 9910-EXIT        
                       WHEN  WS-ACCOUNT-NO-DR (WS-DEP-REQ-INDX)         
                             = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)       
                             AND  WS-DEP-ITEM-ID-DR (WS-DEP-REQ-INDX)   
                             = WS-ITEM-ID-AC (WS-AR-DATA-INDX)          
                         IF WS-DATE-PYMT-START-DR (WS-DEP-REQ-INDX)     
                                > LS-INPUT-DATE                         
                             CONTINUE                                   
                         ELSE                                           
                           PERFORM 5003-COMPUTE-UTL-DELINQ              
                               THRU 5003-EXIT                           
                           ADD WS-CUR-ACCUM                             
                              TO WS-DEP-CUR-ACCUM (WS-LO-INDX)          
                           ADD WS-ARR-ACCUM                             
                              TO WS-DEP-ARR-ACCUM (WS-LO-INDX)          
                           ADD WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) 
                              TO WS-DEP-BAL-ACCUM (WS-LO-INDX)          
T10549                     SUBTRACT WS-AMT-AR-DAY-00-AC                 
T10549                                         (WS-AR-DATA-INDX)        
T10549                              WS-AMT-AR-DAY-30-AC                 
T10549                                         (WS-AR-DATA-INDX)        
T10549                              WS-AMT-AR-DAY-60-AC                 
T10549                                         (WS-AR-DATA-INDX)        
T10549                              WS-AMT-AR-DAY-90-AC                 
T10549                                         (WS-AR-DATA-INDX)        
T10549                         FROM WS-DEP-BAL-ACCUM (WS-LO-INDX)       
                         END-IF                                         
                    END-SEARCH                                          
T10602*          END-IF                                                 41980000
              WHEN 90                                                   
                       PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5003-EXIT   
                       ADD WS-CUR-ACCUM TO WS-DFA-CUR-ACCUM (WS-LO-INDX)
                       ADD WS-ARR-ACCUM TO WS-DFA-ARR-ACCUM (WS-LO-INDX)
                       ADD WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)     
                         TO WS-DFA-BAL-ACCUM (WS-LO-INDX)               
T12245                 SUBTRACT WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
T12245                          WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)   
T12245                          WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)   
T12245                          WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)   
T12245                   FROM WS-DFA-BAL-ACCUM (WS-LO-INDX)             
              WHEN 100                                                  
                 SET WS-CNT-INDX TO  1                                  
                 SEARCH  WS-CONTRACT-DATA                               
                    AT END                                              
                       MOVE 'CONTRACT ENTRY NOT FOUND'                  
                         TO WS-MISC-MSG-TEXT                            
                       MOVE +24 TO WS-MISC-MSG-LEN                      
T18829                 MOVE 12 TO RETURN-CODE                           
                       PERFORM 9910-MISC-ERROR THRU 9910-EXIT           
                    WHEN  WS-ACCOUNT-NO-CT (WS-CNT-INDX)                
                             = WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)       
                          AND  WS-CNT-ITEM-ID-CT  (WS-CNT-INDX)         
                             = WS-ITEM-ID-AC (WS-AR-DATA-INDX)          
                       PERFORM 5004-COMPUTE-NON-UTL-DELINQ              
                          THRU 5004-EXIT                                
                       ADD WS-CUR-ACCUM TO WS-CNT-CUR-ACCUM (WS-LO-INDX)
                       ADD WS-ARR-ACCUM TO WS-CNT-ARR-ACCUM (WS-LO-INDX)
                       ADD WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)     
                         TO WS-CNT-BAL-ACCUM (WS-LO-INDX)               
T12245                 SUBTRACT WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
T12245                          WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)   
T12245                          WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)   
T12245                          WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)   
T12245                   FROM WS-CNT-BAL-ACCUM (WS-LO-INDX)             
                 END-SEARCH                                             
              WHEN 110                                                  
                 PERFORM 5003-COMPUTE-UTL-DELINQ THRU 5004-EXIT         
              WHEN 129                                                  
                    PERFORM 5004-COMPUTE-NON-UTL-DELINQ                 
                       THRU 5004-EXIT                                   
T12245              ADD WS-CUR-ACCUM TO WS-PJS-CUR-ACCUM (WS-LO-INDX)   
                                                                        
T12245              ADD WS-ARR-ACCUM TO WS-PJS-ARR-ACCUM (WS-LO-INDX)   
                    ADD WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)        
                       TO WS-PJS-BAL-ACCUM (WS-LO-INDX)                 
T12245              SUBTRACT WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)      
T12245                       WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)      
T12245                       WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)      
T12245                       WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)      
T12245                FROM WS-PJS-BAL-ACCUM (WS-LO-INDX)                
                    SUBTRACT WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)      
                             WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)      
                             WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)      
                             WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)      
                      FROM WS-LPC-NONUT-ELG-AFT-BILL-CALC               
                    ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)           
                        WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                        WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                        WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO WS-LPC-NONUT-XMT-AFT-BILL-CALC                 
              WHEN OTHER                                                
                 CONTINUE                                               
           END-EVALUATE.                                                
T9627  2101-EXIT.                                                       
           EXIT.                                                        
                                                                        
      /                                                                 42860000
      ****************************************************************  42870000
      *  FOR EPP ACCOUNTS, DETERMINE WHAT METERED SERVICES EXIST.    *  42880000
      ****************************************************************  42890000
PCR212 2110-DETERMINE-BUD-SERV.                                         
      *                                                                 42910000
PCR212     MOVE 'N' TO WS-FOUND-BOTH-SW.                                
PCR212     PERFORM VARYING WS-BILLING-INDX FROM 1 BY 1                  
SCA006        UNTIL WS-FOUND-BOTH OR 
SCA006              WS-BILLING-INDX > 30 OR 
                    WS-ACCOUNT-NO-BG(WS-BILLING-INDX) = 0                       
                                                                        
PCR212          EVALUATE WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX)         
PCR212            WHEN 'G'                                              
PCR212              SET HAS-BUD-GAS-SERVICE    TO TRUE                  
PCR212            WHEN 'E'                                              
PCR212              SET HAS-BUD-ELEC-SERVICE   TO TRUE                  
PCR212            WHEN 'U'                                              
PCR212              PERFORM VARYING WS-CUST-PLAN-INDX FROM 1 BY 1       
I00177                 UNTIL WS-CUST-PLAN-INDX > WS-CP-MAX-ENTRY OR     
PCR212                       WS-ACCOUNT-NO-CP(WS-CUST-PLAN-INDX) = ZEROS
PCR212               IF WS-CODE-SERVICE-TYPE-CP(WS-CUST-PLAN-INDX) = 'E'
PCR212                 SET HAS-BUD-ELEC-SERVICE            TO TRUE      
PCR212               ELSE                                               
PCR212                 SET HAS-BUD-GAS-SERVICE             TO TRUE      
PCR212               END-IF                                             
PCR212              END-PERFORM                                         
PCR212          END-EVALUATE                                            
                                                                        
PCR212          IF HAS-BUD-ELEC-SERVICE AND HAS-BUD-GAS-SERVICE         
PCR212            MOVE 'Y' TO WS-FOUND-BOTH-SW                          
PCR212          END-IF                                                  
PCR212     END-PERFORM.                                                 
PCR212 2110-EXIT.                                                       
PCR212     EXIT.                                                        
      /                                                                 43210000
       2120-PROCESS-UTL-RECV.                                           
           MOVE '2120' TO ACTIVE-PARAGRAPH.                             
           MOVE WS-YES TO WS-HAVE-UTL-DOLLARS-BEEN-USED.                
           ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)               
               TO WS-NEW-REVENUE-ACCUM.                                 
                                                                        
T14446     IF WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP                   
T14446      IF WS-BILL-CORRECTION                                       
T14446        MOVE 0 TO WS-REBILL-NET                                   
T14446        PERFORM 2122-COMPUTE-REBILL-TOTAL THRU 2122-EXIT          
T14446        COMPUTE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) =           
T14446                WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) +           
T14446               (WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) -      
T14446                 WS-REBILL-NET)                                   
T14446        IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) < 0              
T14446           ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)              
T14446             TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
T14446           MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
T14446        END-IF                                                    
T14446      ELSE                                                        
             IF WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) > ZERO       
T12173        ADD  WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)           
                TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
             ELSE                                                       
              IF WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) < ZERO      
                 ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)         
                   TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                 MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
              END-IF                                                    
             END-IF                                                     
T14446      END-IF                                                      
           END-IF                                                       
T31966     IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < 0                 
T31966        PERFORM 5030-CREATE-CIA   THRU 5030-EXIT                  
T31966     END-IF                                                       
           .                                                            
       2120-EXIT.                                                       
           EXIT.                                                        
      /                                                                 43600000
       2121-PROCESS-GAS-RECV.                                           
           MOVE WS-YES TO WS-HAVE-GAS-DOLLARS-BEEN-USED.                
           ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)               
               TO WS-NEW-REVENUE-ACCUM.                                 
                                                                        
T14446     IF WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP                   
T14446      IF WS-BILL-CORRECTION                                       
T14446        MOVE 0 TO WS-REBILL-NET                                   
T14446        PERFORM 2122-COMPUTE-REBILL-TOTAL THRU 2122-EXIT          
T14446        COMPUTE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) =           
T14446                WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) +           
T14446               (WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) -      
T14446                 WS-REBILL-NET)                                   
T14446        IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) < 0              
T14446           ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)              
T14446             TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
T14446           MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
T14446        END-IF                                                    
T14446      ELSE                                                        
             IF WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) > ZERO       
T12173        ADD  WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)           
                TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
             ELSE                                                       
              IF WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) < ZERO      
                 ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)         
                   TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                 MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
              END-IF                                                    
             END-IF                                                     
T14446      END-IF                                                      
           END-IF                                                       
T31966     IF WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < 0                 
T31966        PERFORM 5030-CREATE-CIA  THRU 5030-EXIT                   
T31966     END-IF                                                       
           .                                                            
       2121-EXIT.                                                       
           EXIT.                                                        
      /                                                                 43980000
T14446 2122-COMPUTE-REBILL-TOTAL.                                       
T14446     PERFORM VARYING WS-RE-INDX FROM 1 BY 1                       
T16972         UNTIL WS-RE-INDX > 48                                    
T31155         OR WS-RE-DATE-BILLED (WS-RE-INDX) = SPACES               
T14446       IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 40          
T14446          IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'E'              
T14446             COMPUTE WS-REBILL-NET = WS-REBILL-NET +              
T14446                    WS-RE-BACKOUT-AMT (WS-RE-INDX) +              
T14446                    WS-RE-REBILL-AMT (WS-RE-INDX)                 
T14446          END-IF                                                  
T14446       ELSE                                                       
T14446          IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = 'G'              
T14446             COMPUTE WS-REBILL-NET = WS-REBILL-NET +              
T14446                    WS-RE-BACKOUT-AMT (WS-RE-INDX) +              
T14446                    WS-RE-REBILL-AMT (WS-RE-INDX)                 
T14446          END-IF                                                  
T14446       END-IF                                                     
T14446     END-PERFORM                                                  
           .                                                            
T14446 2122-EXIT.                                                       
           EXIT.                                                        
      /                                                                 44200000
       2130-PROCESS-BUD-RECV.                                           
           MOVE '2130' TO ACTIVE-PARAGRAPH.                             
           COMPUTE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)           
              = LS-TOTAL-UTILITY-DOLLARS                                
                + LS-BILL-BACK-OUT-UTL-DOLLARS                          
                + LS-TOTAL-GAS-DOLLARS                                  
                + LS-BILL-BACK-OUT-GAS-DOLLARS                          
           ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)               
             TO WS-NEW-REVENUE-ACCUM.                                   
           ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)               
             TO WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX).               
                                                                        
T18111     MOVE WS-REVENUE-MONTH-CALC TO                                
T18111                           WS-HOLD-REVENUE-MTH-CHAR               
T17883**** IF IT IS A CANCEL/REBILL AND ON ANNIVERSARY MONTH, THEN      44360000
T17883**** GENERATE A WQ FOR USER TO REVIEW THE EPP AMOUNT.             44370000
T17883                                                                  
T17883     MOVE WS-ANNIVERSARY-DATE-BU (1:4) TO WS-INT-BU-ANNIV-YR      
T17883      MOVE WS-HOLD-REVENUE-MTH-CHAR (1:4) TO WS-INT-CURR-REV-YR   
T17883      COMPUTE WS-INT-NEXT-REV-YR = WS-INT-CURR-REV-YR + 1         
      *                                                                 44420000
T17883      IF  WS-INT-BU-ANNIV-YR = WS-INT-NEXT-REV-YR                 
T17883        AND WS-ANNIVERSARY-DATE-BU (6:2)                          
T17883             = WS-HOLD-REVENUE-MTH-CHAR (5:2)                     
T17883        AND WS-BILL-CORRECTION                                    
T17883           MOVE 'Y' TO WS-CALC-EPP-ANNIV-FLG                      
                 IF LS-CURR-WQ-ITEM = 50                                
                    DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'           
                    DISPLAY 'PROCESSING TERMINATED'                     
                    MOVE 16 TO RETURN-CODE                              
                    PERFORM 9999-BAIL-OUT THRU 9999-EXIT                
                 ELSE                                                   
                    ADD 1 TO LS-CURR-WQ-ITEM                            
                    SET WS-BILL-WQ-INDX TO LS-CURR-WQ-ITEM              
T17883              MOVE WS-CANCEL-REBILL-EPP-ANNIV                     
T17883              TO WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)    
                    PERFORM 5100-PROCESS-EXCEPTION THRU 5100-EXIT       
                 END-IF                                                 
T17883      END-IF                                                      
T19463      MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) TO               
T19463                                 WS-HOLD-DAY-00-AC                
            MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)          
            IF WS-UT-TABLE-COUNT-CALC = ZERO                            
               IF LS-CURR-WQ-ITEM = 50                                  
                  DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'             
                  DISPLAY 'PROCESSING TERMINATED'                       
                  MOVE 16 TO RETURN-CODE                                
                  PERFORM 9999-BAIL-OUT THRU 9999-EXIT                  
               ELSE                                                     
                  ADD 1 TO LS-CURR-WQ-ITEM                              
                  SET WS-BILL-WQ-INDX TO LS-CURR-WQ-ITEM                
                  MOVE WS-PRIOR-TENANT-ON-BUDGET                        
                    TO WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)    
T21753*                                                                 44820000
T21753            IF WS-SECURED-RATE-FL = 'Y'                           
T21753               MOVE WS-CATEGORY-ID-138 TO                         
T21753                      WS-CATEGORY-ID-WF(WS-BILL-WQ-INDX)          
T21753            END-IF                                                
T21753*                                                                 44870000
                  PERFORM 5100-PROCESS-EXCEPTION THRU 5100-EXIT         
               END-IF                                                   
            ELSE                                                        
PALPAL* ONLY IN ANNIVERSARY APPLY THE CREDIT                            44910000
PALPAL        IF WS-ANNIVERSARY-DATE-BU (1:4)                           
PALPAL                = WS-HOLD-REVENUE-MTH-CHAR (1:4)                  
PALPAL                AND WS-ANNIVERSARY-DATE-BU (6:2)                  
PALPAL                = WS-HOLD-REVENUE-MTH-CHAR (5:2)                  
T17883           MOVE 'Y' TO WS-CALC-EPP-ANNIV-FLG                      
T18230           IF WS-CODE-DEP-ON-HAND = WS-CODE-APPLIES               
T18579              MOVE WS-TOTAL-AR-BALANCE-AT TO                      
T18579                 WS-TOTAL-AR-BALANCE-HOLD                         
T18230              PERFORM 1040-APPLY-NEW-CREDITS    THRU 1040-EXIT    
T18230              MOVE 'Y' TO WS-DEP-ALREADY-REFUNDED                 
T18579              MOVE WS-TOTAL-AR-BALANCE-HOLD TO                    
T18579                 WS-TOTAL-AR-BALANCE-AT                           
T18230           END-IF                                                 
T17777           SET WS-AR-DATA-INDX  TO  WS-HOLD-BUDGET-INDX           
T17777****  CHECK IF THERE IS ANY CIA TO BE APPLIED AND IF THE CIA      45100000
T17777****  IS ENOUGH TO PAY OFF THE MONTHLY PAYMENT FOR THE MONTH.     45110000
T17777           MOVE ZEROES                TO WS-CIA-CREDIT            
T17777                                         WS-CIA-LIHEAP-CREDIT     
T17777           SET WS-AR-DATA-INDX        TO 1                        
T17777           SEARCH WS-AR-DATA                                      
T17777               AT END                                             
T17777                   CONTINUE                                       
T17777           WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = 0            
T17777              CONTINUE                                            
T17777           WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 70    
T17777              AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) = 2             
T17777                  MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)      
T17777                                    TO WS-CIA-LIHEAP-CREDIT       
T17777                  COMPUTE WS-CIA-LIHEAP-CREDIT =                  
T17777                            WS-CIA-LIHEAP-CREDIT * -1             
T17777           END-SEARCH                                             
T17777                                                                  
T17777           SET WS-AR-DATA-INDX        TO 1                        
T17777           SEARCH WS-AR-DATA                                      
T17777              AT END                                              
T17777                 CONTINUE                                         
T17777           WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = 0            
T17777               CONTINUE                                           
T17777           WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 70    
T17777             AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) = 1              
T17777              MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)          
T17777                                    TO WS-CIA-CREDIT              
T17777              COMPUTE WS-CIA-CREDIT = WS-CIA-CREDIT * -1          
T17777           END-SEARCH                                             
TODAY                                                                   
T18579***** THE FOLLOWING LOGIC WRITES A WASH ENTRY FOR EPP.  WRITE     45430000
T18579***** A WASH JOURNAL FOR THE LESSER OF THE EPP-TRAN-BAL OR THE    45440000
T18579***** EPP-MO-AMT.  IF THE EPP-TRAN-BAL IS NEGATIVE, DO NOT        45450000
T18579***** CREATE WASH ENTRY.                                          45460000
C34216        MOVE WS-ACCOUNT-NO-AT            TO AC-ACCOUNT-NO         
C34216        PERFORM 7565-SELECT-EPP-ARREARS  THRU 7565-EXIT           
C34216        COMPUTE WS-ARREARS-AMOUNT =                               
C34216                AC-AMT-AR-DAY-00 +                                
C34216                AC-AMT-AR-DAY-30 +                                
C34216                AC-AMT-AR-DAY-60 +                                
C34216                AC-AMT-AR-DAY-90 +                                
C34216                AC-AMT-UNUSED-CR                                  
T18579                                                                  
T18579             SET WS-AR-DATA-INDX  TO  WS-HOLD-BUDGET-INDX         
T18579             IF WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) > 0      
C34216               IF WS-CALC-EPP-ANNIV-FLG = 'Y' AND                 
WLR                     WS-ARREARS-AMOUNT > 0       AND                 
C34216                  (WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) <     
C34216                     WS-AMT-MO-PYMT-BU + WS-ARREARS-AMOUNT)       
WLR                     IF WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) >   
WLR                        WS-AMT-MO-PYMT-BU                            
WLR                           MOVE WS-AMT-MO-PYMT-BU TO                 
WLR                           WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
C34216                         WS-EPP-BILLED-AMOUNT                     
C34216                        SET WS-EPP-WASH-JRNLED TO TRUE            
C34216                        PERFORM 5200-CREATE-101-JRNL-FROM-AC      
C34216                                         THRU 5200-EXIT           
WLR                     ELSE                                            
C34216                     MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)
C34216                      TO  WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
C34216                         WS-EPP-BILLED-AMOUNT                     
C34216                     SET WS-EPP-WASH-JRNLED TO TRUE               
C34216                     PERFORM 5200-CREATE-101-JRNL-FROM-AC         
C34216                                         THRU 5200-EXIT           
WLR                     END-IF                                          
C34216               ELSE                                               
T18579               IF WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) <      
T18579                 WS-AMT-MO-PYMT-BU                                
T18579                   MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)  
T18579                     TO  WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)    
T18579                         WS-EPP-BILLED-AMOUNT                     
T18579                   SET WS-EPP-WASH-JRNLED TO TRUE                 
T18579                   PERFORM 5200-CREATE-101-JRNL-FROM-AC           
T18579                                         THRU 5200-EXIT           
T18579               ELSE                                               
T18579                 MOVE WS-AMT-MO-PYMT-BU                           
T18579                    TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)      
T18579                       WS-EPP-BILLED-AMOUNT                       
T18579                 SET WS-EPP-WASH-JRNLED TO TRUE                   
T18579                 PERFORM 5200-CREATE-101-JRNL-FROM-AC             
T18579                                           THRU 5200-EXIT         
C34216                  END-IF                                          
T18579               END-IF                                             
T17777             END-IF                                               
T17777                                                                  
T18579             IF WS-EPP-BILLED-AMOUNT = 0                          
T18579                MOVE WS-AMT-MO-PYMT-BU TO WS-EPP-BILLED-AMOUNT    
T18130             END-IF                                               
                                                                        
T18579             IF WS-CIA-CREDIT  > 0 OR WS-CIA-LIHEAP-CREDIT > 0    
T17777                IF WS-CIA-CREDIT > WS-EPP-BILLED-AMOUNT           
T18579                  OR WS-CIA-CREDIT = WS-EPP-BILLED-AMOUNT         
T17777                  OR WS-CIA-LIHEAP-CREDIT > WS-EPP-BILLED-AMOUNT  
T18579                  OR WS-CIA-LIHEAP-CREDIT = WS-EPP-BILLED-AMOUNT  
T17777                  SET WS-AR-DATA-INDX  TO WS-HOLD-BUDGET-INDX     
TODAY7                  MOVE 'Y' TO WS-EPP-CREDIT-FLAG                  
T17777                  PERFORM 1040-APPLY-NEW-CREDITS THRU 1040-EXIT   
T18579                  SET WS-AR-DATA-INDX TO WS-HOLD-BUDGET-INDX      
T18579                  SET WS-CREDIT-APPLIED TO TRUE                   
T17777                ELSE                                              
T17777                  IF WS-CIA-CREDIT < WS-EPP-BILLED-AMOUNT         
T17777                    OR WS-CIA-LIHEAP-CREDIT < WS-EPP-BILLED-AMOUNT
T17777                    SET WS-AR-DATA-INDX  TO WS-HOLD-BUDGET-INDX   
T17777                    MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) 
T17777                           TO WS-HOLD-TRAN-BALANCE                
T18230                     MOVE 'Y' TO WS-EPP-CREDIT-FLAG               
T17777                   PERFORM 1040-APPLY-NEW-CREDITS   THRU 1040-EXIT
T18579                     SET WS-CREDIT-APPLIED TO TRUE                
T17777                                                                  
T18130                     MOVE WS-TOTAL-AR-BALANCE-AT                  
T18130                       TO WS-101-ACCT-END-AR-BAL                  
                                                                        
T17777                     MOVE WS-101-ACCT-END-AR-BAL                  
T17777                                TO WS-WK03-TOTAL-AR-BAL           
T18579                   END-IF                                         
T17777                END-IF                                            
T18579              END-IF                                              
T18230           MOVE 'N' TO WS-EPP-CREDIT-FLAG                         
T17777           SET WS-AR-DATA-INDX  TO  WS-HOLD-BUDGET-INDX           
PALPAL         END-IF                                                   
               PERFORM 2131-CALC-BUDGET-PAYMENT THRU 2131-EXIT          
           END-IF                                                       
                                                                        
           MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                   
               TO WS-THIS-BUD-ORIG-PMT-CALC.                            
                                                                        
       2130-EXIT.                                                       
           EXIT.                                                        
      /                                                                 46440000
       2131-CALC-BUDGET-PAYMENT.                                        
           MOVE '2131' TO ACTIVE-PARAGRAPH.                             
T18111     MOVE WS-REVENUE-MONTH-CALC TO                                
PALPAL                            WS-HOLD-REVENUE-MTH-CHAR              
PALPAL* ONLY IN ANNIVERSARY APPLY THE CREDIT                            46490000
PALPAL     IF WS-ANNIVERSARY-DATE-BU (1:4)                              
PALPAL            = WS-HOLD-REVENUE-MTH-CHAR (1:4)                      
PALPAL            AND WS-ANNIVERSARY-DATE-BU (6:2)                      
PALPAL            = WS-HOLD-REVENUE-MTH-CHAR (5:2)                      
PALPAL        NEXT SENTENCE                                             
PALPAL     ELSE                                                         
T17777        SET WS-AR-DATA-INDX  TO  WS-HOLD-BUDGET-INDX              
T19463        IF WS-BILL-CORRECTION                                     
T19463              AND WS-CODE-BILL-PEND-AT = WS-PEND-ASAP             
T19463          MOVE WS-HOLD-DAY-00-AC                                  
T17777            TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)              
T19463        ELSE                                                      
T17777          MOVE WS-AMT-MO-PYMT-BU                                  
T17777            TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)              
T19463        END-IF                                                    
                                                                        
T17777        MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) TO          
T17777                 WS-AMT-TRAN-BAL-HOLD                             
PALPAL     END-IF.                                                      
                                                                        
           PERFORM 2132-MONITOR-EPP THRU 2132-EXIT.                     
       2131-EXIT.                                                       
           EXIT.                                                        
      /                                                                 47110000
       2132-MONITOR-EPP.                                                
           CALL SCSCA112 USING LS-PCSCA100-COMM-AREA                    
                               WS-PREMISE-PR                            
                               WS-CUSTOMER-CU                           
                               WS-ACCOUNT-AT                            
                               WS-BILLING-BI                            
                               WS-BILLING-BG                            
                               WS-BILL-CALC-DETAIL                      
                               WS-BILL-ADJUST-DETAIL                    
                               WS-CNSMPTN-HIST-CX                       
                               WS-UNMTRD-CNSMPTN-UC                     
                               WS-FIXED-FCTR-HIST-FH                    
                               WS-BILL-CONTRACT-BK                      
                               WS-CUST-PLAN-TABLE-CP                    
                               WS-FIXED-FCTR-TABLE-FF                   
                               WS-BILL-CNTR-HIST-BX                     
                               WS-AR-CNTRL-AC                           
                               WS-BUDGET-PLAN-BU                        
                               WS-PEAK-HIST-PH                          
                               WS-INTERRUPT-ACCT-IP                     
                               WS-INTERRUPT-IR                          
                               WS-UTILITY-TABLE-UT                      
                               WS-REGISTER-READ-TABLE-RG                
                               WS-MTRD-ENVRNMT-TABLE-MN                 
                               WS-MTR-CAP-TABLE-MC                      
                               WS-BILLING-WQ-ITEMS-WF                   
                               WS-12-MONTH-DATA-EPP                     
                               WS-STANDBY-GEN-SE                        
                               WS-REFUND-RN                             
T10082                         WS-GL-NAME-INFO                          
T10082                         WS-GL-ACCT-NO-TABLE                      
T10082                         WS-HOLD-WK03                             
T17777                         WS-HOLD-AMT-POSTED                       
C34569                         WS-CALC-EPP-ANNIV-FLG                    
C34569                         WS-ACCT-RTPK-AGR-DF                      
C34569                         WS-BI-FIXED-FCTR-FF                      
C34569                         WS-BILL-DET-BT                           
C34569                         WS-BILL-ADJUSTMNT                        
I00177                         WS-CWS1000B-MAX-TBL-LIMITS               
I00177                         WS-CWS1001B-MAX-TBL-LIMITS               
P00496                         WS-BILL-BSLN-CNTR-LN                     
P00496                         WS-BILL-BSLN-HIST-LO                     
P00496                         WS-UTL-BILL-REL-TABLE-UR                 
VKSACT                         WS-INTERRUPT-NZ                          
P00496                         WS-CNSMPTN-HOURLY.                       
                                                                        
PCR470     IF RETURN-CODE > 0                                           
T20491        MOVE 'BAD RETURN CODE FROM 112 '                          
PCR470          TO WS-MISC-MSG-TEXT                                     
PCR470        MOVE +27 TO WS-MISC-MSG-LEN                               
PCR470        PERFORM 9910-MISC-ERROR THRU 9910-EXIT                    
PCR470     END-IF.                                                      
       2132-EXIT.                                                       
           EXIT.                                                        
P00453*                                                                         
P00453******************************************************************82640000
P00453* 2135-PROCESS-PRP-RECV                                          *44210000
P00453******************************************************************82640000
P00453*                                                                         
P00453 2135-PROCESS-PRP-RECV.                                           
P00453*                                                                         
P00453     MOVE '2135'               TO ACTIVE-PARAGRAPH.               
P00453*                                                                         
P00453     IF (LS-BILL-BACK-OUT-UTL-DOLLARS +                           
P00453         LS-BILL-BACK-OUT-GAS-DOLLARS) < 0                        
P00453        ADD LS-BILL-BACK-OUT-UTL-DOLLARS                          
P00453            LS-BILL-BACK-OUT-GAS-DOLLARS TO                       
P00453            WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)                 
P00453        PERFORM 5030-CREATE-CIA  THRU 5030-EXIT                   
P00453        COMPUTE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)        
P00453              = LS-TOTAL-UTILITY-DOLLARS                          
P00453              + LS-TOTAL-GAS-DOLLARS                              
P00453     ELSE                                                         
P00453        COMPUTE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)        
P00453              = LS-TOTAL-UTILITY-DOLLARS                          
P00453              + LS-BILL-BACK-OUT-UTL-DOLLARS                      
P00453              + LS-TOTAL-GAS-DOLLARS                              
P00453              + LS-BILL-BACK-OUT-GAS-DOLLARS                      
P00453     END-IF.                                                      
P00453*                                                                         
P00453     ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)   TO          
P00453         WS-NEW-REVENUE-ACCUM.                                    
P00453     ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)   TO          
P00453         WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX).                
P00453     MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)    TO          
P00453          WS-PRP-TRAN-BAL-AMT.                                    
P00453     MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)       TO          
P00453          WS-HOLD-DAY-00-AC.                                      
P00453     MOVE ZERO                                        TO          
P00453          WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX).                  
P00453* Compute PRP Arrears                                             45520000
P00453     MOVE WS-ACCOUNT-NO-AT     TO AC-ACCOUNT-NO.                  
P00453     PERFORM 7565-SELECT-EPP-ARREARS      THRU 7565-EXIT.         
P00453     COMPUTE WS-PRP-ARREARS-AMT  =   AC-AMT-AR-DAY-00             
P00453                                   + AC-AMT-AR-DAY-30             
P00453                                   + AC-AMT-AR-DAY-60             
P00453                                   + AC-AMT-AR-DAY-90             
P00453                                   + AC-AMT-UNUSED-CR.            
P00453* Adjust PRP billed Balance                                       45430000
P00453     IF WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) > 0                 
P00453        IF WS-PRP-TRAN-BAL-AMT <= 0                               
P00453           SET PRP-ADJ-BILL TO TRUE                               
P00453           COMPUTE WS-PRP-ADJ-AMT =                               
P00453                   WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)          
P00453           MOVE 0 TO  WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)       
P00453        ELSE                                                      
P00453           IF WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) >             
P00453              WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) OR       
P00453              WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) >             
P00453              WS-PRP-TRAN-BAL-AMT                                 
P00453              COMPUTE WS-PRP-ADJ-AMT =                            
P00453                      WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) -     
P00453                     (WS-PRP-TRAN-BAL-AMT -                       
P00453                      (WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) +    
P00453                       WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)))    
P00453              COMPUTE WS-PRP-30-DAY-AMT =                         
P00453                      WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) -     
P00453                      WS-PRP-ADJ-AMT                              
P00453              IF WS-PRP-ADJ-AMT > 0 AND WS-PRP-30-DAY-AMT > 0     
P00453                 SET PRP-ADJ-BILL TO TRUE                         
P00453                 COMPUTE WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) =  
P00453                         WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) -  
P00453                         WS-PRP-ADJ-AMT                           
P00453              ELSE                                                
P00453                 SET PRP-ADJ-NONE TO TRUE                         
P00453                 MOVE 0           TO WS-PRP-ADJ-AMT               
P00453              END-IF                                              
P00453           ELSE                                                   
P00453              SET PRP-ADJ-NONE TO TRUE                            
P00453              MOVE 0           TO WS-PRP-ADJ-AMT                  
P00453           END-IF                                                 
P00453        END-IF                                                    
P00453     END-IF.                                                      
P00453     COMPUTE WS-TOTAL-AR-BALANCE-AT  =                            
P00453             WS-TOTAL-AR-BALANCE-AT  - WS-PRP-ADJ-AMT.            
P00453     COMPUTE WS-PRP-ARREARS-AMT      =                            
P00453             WS-PRP-ARREARS-AMT      - WS-PRP-ADJ-AMT.            
P00453     COMPUTE WS-NET-BILL-ADJ-AM-PK (WS-PK-INDX) =                 
P00453                         WS-EST-BILL-AM-PK (WS-PK-INDX)           
P00453                       + WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) 
P00453                       - WS-PRP-ARREARS-AMT.                      
P00453* Write PRP Wash JRNL - ADJ                                       45430000
P00453     IF PRP-ADJ-BILL                                              
P00453        PERFORM 2136-BILL-ADJ-JRNL  THRU 2136-EXIT                
P00453     END-IF.                                                      
P00453*                                                                 45550000
P00453     EVALUATE WS-ON-OFF-CYCLE-IND                                 
P00453         WHEN 'A'                                                 
P00453              COMPUTE WS-BILL-VARIANCE-AM-PK (WS-PK-INDX) =       
P00453                      WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) +
P00453                      LS-BILL-BACK-OUT-UTL-DOLLARS               +
P00453                      LS-BILL-BACK-OUT-GAS-DOLLARS               -
P00453                      WS-EST-BILL-AM-PREV-PK (WS-PK-INDX)         
P00453         WHEN 'P'                                                 
P00453              MOVE 0 TO WS-BILL-VARIANCE-AM-PK (WS-PK-INDX)       
P00453         WHEN 'O'                                                 
P00453              COMPUTE WS-BILL-VARIANCE-AM-PK (WS-PK-INDX) =       
P00453                      WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) -
P00453                      WS-EST-BILL-AM-PREV-PK (WS-PK-INDX)         
P00453     END-EVALUATE.                                                
P00453* Move 'Tran Bal' to CIA when PRP Net charges are < 0             45430000
P00453     IF WS-NET-BILL-ADJ-AM-PK (WS-PK-INDX) > 0                    
P00453        MOVE WS-NET-BILL-ADJ-AM-PK (WS-PK-INDX)       TO          
P00453             WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
P00453     ELSE                                                         
P00453        IF WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) < 0           
P00453           MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) TO       
P00453                WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
P00453           PERFORM 5030-CREATE-CIA THRU 5030-EXIT                 
P00453           MOVE 0 TO WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)     
P00453                     WS-NET-BILL-ADJ-AM-PK (WS-PK-INDX)           
P00453        END-IF                                                    
P00453        MOVE WS-EST-BILL-AM-PK (WS-PK-INDX) TO                    
P00453             WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
P00453     END-IF.                                                      
P00453* Write PRP Wash JRNL - New Charges                               45430000
P00453     SET WS-EPP-WASH-JRNLED     TO TRUE.                          
P00453     PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT.         
P00453*                                                                 45550000
P00453     ADD WS-HOLD-DAY-00-AC TO                                     
P00453         WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX).                   
P00453*                                                                 45550000
P00453     MOVE 'N'             TO WS-EPP-CREDIT-FLAG.                  
P00453     SET WS-AR-DATA-INDX  TO WS-HOLD-BUDGET-INDX.                 
P00453     MOVE 'U'             TO WS-UPDATE-ACTION-IND-PK (WS-PK-INDX).
 00453     SET PRP-ADJ-NONE     TO TRUE.                                
P00453*                                                                 45550000
P00453 2135-EXIT.                                                       
P00453     EXIT.                                                        
P00453*                                                                         
P00453******************************************************************82640000
P00453* 2136-BILL-ADJ-JRNL                                             *44210000
P00453******************************************************************82640000
P00453*                                                                         
P00453 2136-BILL-ADJ-JRNL.                                              
P00453*                                                                         
P00453     MOVE '2136'               TO ACTIVE-PARAGRAPH.               
P00453*                                                                         
P00453     MOVE WS-PRP-ADJ-AMT         TO WS-JRNL-AMT-POSTED.           
P00453     MOVE WS-TOTAL-AR-BALANCE-AT TO WS-JRNL-ACCT-END-AR-BAL.      
P00453     PERFORM 5440-CREATE-ADJ-JOURNAL THRU 5440-EXIT.              
P00453*                                                                         
P00453 2136-EXIT.                                                       
P00453     EXIT.                                                        
P00453*                                                                         
      /                                                                 47620000
       2140-PROCESS-CCC-RECV.                                           
           MOVE '2140' TO ACTIVE-PARAGRAPH.                             
           MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX).          
           COMPUTE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
               = WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)               
                 - (WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)               
                    + WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)             
                    + WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)             
T13989              + WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)).       
           MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                   
             TO WS-CCC-MO-PYMT-AMT-CALC (WS-CCC-INDX).                  
           IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) LESS THAN ZERO      
              MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)        
                            WS-CCC-MO-PYMT-AMT-CALC (WS-CCC-INDX)
           END-IF.      
           IF WS-CCYYMM-PMTS-STRT-CALC (WS-CCC-INDX) = ZERO             
              MOVE WS-CCYYMM-DATE                                       
                TO WS-CCYYMM-PMTS-STRT-CALC (WS-CCC-INDX)
           END-IF.              
       2140-EXIT.                                                       
           EXIT.                                                        
      /                                                                 47820000
       2150-PROCESS-DFA-RECV.                                           
           MOVE '2150' TO ACTIVE-PARAGRAPH.                             
           MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX).          
                                                                        
T14446     IF (WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP)                 
                OR (WS-CODE-BILL-TYPE-BI EQUAL WS-FINAL-BILL            
                    AND WS-AMT-MO-PYMT-DA (WS-DFA-INDX) EQUAL 99999.99) 
              IF WS-DATE-PYMT-START-DA (WS-DFA-INDX) <= LS-INPUT-DATE   
                  PERFORM 2152-CALCULATE-DFA-PMT THRU 2152-EXIT         
              END-IF                                                    
           END-IF.                                                      
                                                                        
       2150-EXIT.                                                       
           EXIT.                                                        
      /                                                                 47970000
       2152-CALCULATE-DFA-PMT.                                          
           MOVE '2152' TO ACTIVE-PARAGRAPH.                             
                                                                        
           COMPUTE WS-MAXIMUM-AMOUNT-TO-BILL =                          
               WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) -               
              (WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) +                  
               WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) +                  
               WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) +                  
T15701         WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)).              
                                                                        
           IF WS-AMT-MO-PYMT-DA (WS-DFA-INDX) EQUAL ZERO                
              MOVE 5.00 TO WS-AMT-MO-PYMT-DA (WS-DFA-INDX)              
              IF LS-CURR-WQ-ITEM = 50                                   
                 DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'              
                 DISPLAY 'PROCESSING TERMINATED'                        
                 MOVE 16 TO RETURN-CODE                                 
                 PERFORM 9999-BAIL-OUT THRU 9999-EXIT                   
              ELSE                                                      
                 ADD 1 TO LS-CURR-WQ-ITEM                               
                 SET WS-BILL-WQ-INDX TO LS-CURR-WQ-ITEM                 
                 MOVE WS-INSUFF-DFA-MO-PYMT                             
                   TO WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)     
T21753*                                                                 48200000
T21753           IF WS-SECURED-RATE-FL = 'Y'                            
T21753              MOVE WS-CATEGORY-ID-138 TO                          
T21753                      WS-CATEGORY-ID-WF(WS-BILL-WQ-INDX)          
T21753           END-IF                                                 
T21753*                                                                 48250000
                 PERFORM 5100-PROCESS-EXCEPTION THRU 5100-EXIT          
              END-IF                                                    
           END-IF                                                       
                                                                        
           EVALUATE TRUE                                                
              WHEN WS-MAXIMUM-AMOUNT-TO-BILL < ZERO                     
              WHEN WS-AMT-MO-PYMT-DA (WS-DFA-INDX) = ZERO               
                 MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
              WHEN WS-AMT-MO-PYMT-DA (WS-DFA-INDX) = 99999.99           
                  MOVE WS-MAXIMUM-AMOUNT-TO-BILL                        
                    TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)            
              WHEN OTHER                                                
                 IF WS-DATE-PYMT-START-DA(WS-DFA-INDX) = LOW-VALUES     
                      OR WS-NO-SCHED-PYMTS-DA (WS-DFA-INDX) = ZERO      
T11966              MOVE WS-MAXIMUM-AMOUNT-TO-BILL                      
T11966                TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)          
                 ELSE                                                   
                    PERFORM 2154-CHECK-LAST-MONTHLY-PYMT THRU 2154-EXIT 
                                                                        
T11966              IF (WS-MONTHS-BILLED-COUNTER                        
T11966                    = WS-NO-SCHED-PYMTS-DA (WS-DFA-INDX)          
T11966                   AND WS-PYMTS-START-END <= LS-INPUT-DATE)       
                      OR WS-MAXIMUM-AMOUNT-TO-BILL                      
                               < WS-AMT-MO-PYMT-DA (WS-DFA-INDX)        
                        MOVE WS-MAXIMUM-AMOUNT-TO-BILL                  
                           TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
                    ELSE                                                
                        MOVE WS-AMT-MO-PYMT-DA (WS-DFA-INDX)            
                           TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
                    END-IF                                              
                 END-IF                                                 
           END-EVALUATE.                                                
                                                                        
       2152-EXIT.                                                       
           EXIT.                                                        
      /                                                                 48780000
       2154-CHECK-LAST-MONTHLY-PYMT.                                    
           MOVE '2154' TO ACTIVE-PARAGRAPH.                             
           MOVE WS-AMT-MO-PYMT-DA (WS-DFA-INDX) TO WS-MO-PYMT           
           MOVE WS-NO-SCHED-PYMTS-DA (WS-DFA-INDX) TO WS-SCHED-PYMTS    
T10840     COMPUTE WS-ORIG-BAL = WS-AMT-ORIG-ENTERED-DA (WS-DFA-INDX)   
T10840               - WS-FRST-ERNST-PAY-AMT-DA (WS-DFA-INDX)           
T10840               - WS-SCND-ERNST-PAY-AMT-DA (WS-DFA-INDX)           
           PERFORM 5010-DETERMINE-MONTHS-BILLED THRU 5010-EXIT          
                                                                        
T19857     IF WS-MONTHS-REMAINING-COUNTER NOT = 0                       
              MOVE WS-MONTHS-BILLED-COUNTER                             
T9648           TO WS-MONTHS-BILLED-NUMERIC                             
T9648         MOVE WS-MONTHS-BILLED-NUMERIC                             
                TO WS-RCNTLY-BLLD-MTH-DA (WS-DFA-INDX)                  
T30467        MOVE LS-CURR-REVENUE-MONTH                                
T30467          TO WS-REVENUE-MONTH-DA (WS-DFA-INDX)                    
P00599        MOVE 'U'                                                  
P00599          TO WS-UPDATE-ACTION-IND-DA (WS-DFA-INDX)                
           END-IF.                                                      
                                                                        
       2154-EXIT.                                                       
           EXIT.                                                        
      /                                                                 49000000
       2170-PROCESS-DEP-RECV.                                           
           MOVE '2170' TO ACTIVE-PARAGRAPH.                             
           COMPUTE WS-MAXIMUM-AMOUNT-TO-BILL                            
             = WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)                 
              - (WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)                  
                 + WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)                
                 + WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)                
T15701           + WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)).          
                                                                        
           IF WS-MAXIMUM-AMOUNT-TO-BILL < ZERO                          
                OR WS-AMT-MO-PYMT-DR (WS-DEP-REQ-INDX) = ZERO           
              MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)        
           ELSE                                                         
              IF WS-DATE-PYMT-START-DR (WS-DEP-REQ-INDX) = LOW-VALUES   
                    OR WS-NO-SCHED-PYMTS-DR (WS-DEP-REQ-INDX) EQUAL ZERO
                 MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)          
                   TO WS-AMT-MO-PYMT-DR (WS-DEP-REQ-INDX)               
              ELSE                                                      
                 PERFORM 2171-CHECK-LAST-MONTHLY-PYMT                   
                    THRU 2171-EXIT                                      
              END-IF                                                    
              IF WS-MAXIMUM-AMOUNT-TO-BILL                              
                      < WS-AMT-MO-PYMT-DR(WS-DEP-REQ-INDX)              
                 MOVE WS-MAXIMUM-AMOUNT-TO-BILL                         
                   TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
              ELSE                                                      
                 MOVE WS-AMT-MO-PYMT-DR (WS-DEP-REQ-INDX)               
                   TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
              END-IF                                                    
           END-IF.                                                      
      /                                                                 49310000
       2170-EXIT.                                                       
           EXIT.                                                        
      /                                                                 49340000
       2171-CHECK-LAST-MONTHLY-PYMT.                                    
           MOVE '2171' TO ACTIVE-PARAGRAPH.                             
           MOVE WS-AMT-MO-PYMT-DR (WS-DEP-REQ-INDX) TO WS-MO-PYMT       
           MOVE WS-NO-SCHED-PYMTS-DR (WS-DEP-REQ-INDX) TO WS-SCHED-PYMTS
           MOVE WS-AMT-ORIG-ENTERED-DR (WS-DEP-REQ-INDX) TO WS-ORIG-BAL 
           PERFORM 5010-DETERMINE-MONTHS-BILLED THRU 5010-EXIT          
                                                                        
T31692     MOVE WS-MONTHS-BILLED-COUNTER                                
T31692          TO WS-RCNTLY-BLLD-MTH-DR (WS-DEP-REQ-INDX)              
                                                                        
           IF WS-MONTHS-BILLED-COUNTER                                  
                    = WS-NO-SCHED-PYMTS-DR (WS-DEP-REQ-INDX)            
                  AND WS-PYMTS-START-END <= LS-INPUT-DATE               
              MOVE WS-MAXIMUM-AMOUNT-TO-BILL                            
                   TO WS-AMT-MO-PYMT-DR (WS-DEP-REQ-INDX)               
           END-IF.                                                      
       2171-EXIT.                                                       
           EXIT.                                                        
       2180-PROCESS-CNT-RECV.                                           
           MOVE '2180' TO ACTIVE-PARAGRAPH.                             
C36303     MOVE SPACES TO WS-PACE-CNT-STATUS.                           
C36303     IF CSR-DATABASE AND WS-COMPANY-NO-AT = WS-SCEG     AND       
C36303        WS-ITEM-ID-AC (WS-AR-DATA-INDX) >=  9500000     AND       
C36303        WS-ITEM-ID-AC (WS-AR-DATA-INDX) <=  9500999               
C36303        IF (WS-DATE-BILL-DAY-60-AT < LS-DATE-55-DAYS-AGO AND      
C36303            WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) > ZERO) OR      
C36303           (WS-CODE-ACCT-STAT-AT = WS-FINAL-BILL         AND      
C36303            (WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)  +             
C36303             WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)  +             
C36303             WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)  +             
C36303             WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)) > ZERO)       
C36303           SET PACE-CNT-CANCEL TO TRUE                            
C36303           MOVE 'D'  TO WS-CNT-STATUS-CD-CT (WS-CNT-INDX)         
C36956           MOVE LS-INPUT-DATE TO                                  
C36956                           WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX)   
C36303           MOVE 'D'  TO WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX) 
C36303           ADD   WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)            
C36303                 WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)            
C36303                 WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)            
C36303            TO   WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)            
C36303           MOVE ZERO TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)     
C36303                        WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)     
C36303                        WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)     
C36303                        WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)
C36303           GO TO 2180-EXIT                                        
C36303        ELSE                                                      
C36303           SET PACE-CNT-OTHER TO TRUE                             
C36303        END-IF                                                    
C36303     ELSE                                                         
C36303        SET PACE-CNT-OTHER TO TRUE                                
C36303     END-IF.                                                      
T14446     IF (WS-CODE-BILL-PEND-AT NOT = WS-PEND-ASAP)                 
                OR (WS-CODE-BILL-TYPE-BI EQUAL WS-FINAL-BILL            
                     AND WS-AMT-MO-PYMT-CT (WS-CNT-INDX) = 99999.99)    
              MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)        
              IF WS-DATE-PYMT-START-CT (WS-CNT-INDX) <= LS-INPUT-DATE   
TP3882          OR (WS-CODE-BILL-TYPE-BI EQUAL WS-FINAL-BILL            
TP3882              AND WS-AMT-MO-PYMT-CT (WS-CNT-INDX) = 99999.99)     
                 COMPUTE WS-MAXIMUM-AMOUNT-TO-BILL                      
                    = WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)          
                     - (WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) +         
                        WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) +         
                        WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) +         
T15701                  WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX))      
                 EVALUATE WS-CODE-BILL-TYPE-CT (WS-CNT-INDX)            
                    WHEN WS-INSTALLMENT-CNTRACT                         
                    WHEN WS-90-SAME-AS-CASH-CNTRACT                     
                       PERFORM 2181-CALCULATE-CNT-PMT THRU 2181-EXIT    
                    WHEN WS-ONE-TIME-CHARGE-CNTRACT                     
                      IF WS-MAXIMUM-AMOUNT-TO-BILL > ZERO               
T19747                     COMPUTE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)
T19747                     = WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) - 
T19747                       WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) -    
T19747                       WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) -    
T19747                       WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) -    
T19747                       WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)      
                      END-IF                                            
ACT106                IF WS-CODE-CONTRACT-TYPE-CT (WS-CNT-INDX) =       
ACT106                      WS-SERVICE-CARE-CNT                         
ACT059                  PERFORM 5006-SET-MNT-HISTORY    THRU 5006-EXIT  
ACT059                  MOVE ZEROES    TO WS-ONE-TIME-CNT-ID            
ACT059                  MOVE WS-CNT-ITEM-ID-CT(WS-CNT-INDX)             
ACT059                               TO WS-ONE-TIME-CNT-ID              
ACT059                  MOVE WS-ONE-TIME-CNT-TXT TO MH-TRAN-COMMENT-TEXT
ACT059                  MOVE +55       TO MH-TRAN-COMMENT-LEN           
ACT059                  PERFORM 8020-INS-MNT-TRANS-HIST THRU 8020-EXIT  
ACT059                  MOVE 1         TO MI-TRAN-APPL-NO               
ACT059                  MOVE '15'      TO MI-TABLE-ID                   
ACT059                  MOVE +1        TO MI-PRV-COLUMN-VALUE-LEN       
ACT059                  MOVE 'CONTRACT STATUS'   TO MI-COLUMN-DESC      
ACT059                  MOVE LS-INPUT-DATE       TO                     
ACT059                     WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX)         
ACT059                  MOVE WS-CNT-STATUS-CD-CT (WS-CNT-INDX)          
ACT059                               TO MI-PRV-COLUMN-VALUE-TEXT        
ACT059                  MOVE +1        TO MI-CHG-COLUMN-VALUE-LEN       
ACT059                  MOVE 'E'       TO MI-CHG-COLUMN-VALUE-TEXT      
ACT059                                 WS-CNT-STATUS-CD-CT (WS-CNT-INDX)
ACT059                  PERFORM 8021-INS-MT-TRN-HST-DET THRU 8021-EXIT  
ACT059                  ADD 1          TO MI-TRAN-APPL-NO               
ACT106                END-IF                                            
                    WHEN WS-MONTHLY-AMOUNT-CNTRACT                      
PCR294***************************************************************   50190000
PCR294*PCR 294 - DO NOT FINAL BILL MONTHLY CHARGE CONTRACTS         *   50200000
PCR294***************************************************************   50210000
PCR294                IF WS-CODE-ACCT-STAT-AT = WS-FINAL-BILL           
PCR294                   IF  WS-AMT-AR-DAY-00-AC(WS-AR-DATA-INDX) = ZERO
PCR294                   AND WS-AMT-AR-DAY-30-AC(WS-AR-DATA-INDX) = ZERO
PCR294                   AND WS-AMT-AR-DAY-60-AC(WS-AR-DATA-INDX) = ZERO
PCR294                   AND WS-AMT-AR-DAY-90-AC(WS-AR-DATA-INDX) = ZERO
T21169                   AND WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)  
T21169                                                            = ZERO
PCR294                       MOVE ZERO                                  
PCR294                       TO WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)
PCR294                   END-IF                                         
PCR294                   IF WS-CODE-CONTRACT-TYPE-CT (WS-CNT-INDX) =    
PCR294                          WS-SERVICE-CARE-CNT                     
A04880*                     IF LS-CURR-WQ-ITEM = 50                     50340000
A04880*                       DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50' 50350000
A04880*                       DISPLAY 'PROCESSING TERMINATED'           50360000
A04880*                       MOVE 16 TO RETURN-CODE                    50370000
A04880*                       PERFORM 9999-BAIL-OUT THRU 9999-EXIT      50380000
A04880*                     ELSE                                        50390000
A04880*                       ADD 1 TO LS-CURR-WQ-ITEM                  50400000
A04880*                       SET WS-BILL-WQ-INDX TO LS-CURR-WQ-ITEM    50410000
      *                                                                 50420000
A04880*                       MOVE WS-CUSTOMER-NO-AT                    50430000
A04880*                           TO WS-SERV-CARE-CUSTOMER              50440000
A04880*                       MOVE 'CUSTOMER NBR = '                    50450000
A04880*                           TO WS-SC-CUSTOMER-LIT                 50460000
A04880*                       MOVE WS-ACCT-XFER-TO-AT                   50470000
A04880*                              TO WS-SERV-CARE-XFER-TO            50480000
A04880*                       MOVE ' XFER TO ACCT NBR = '               50490000
A04880*                              TO WS-SC-XFER-LIT                  50500000
A04880*                       MOVE WS-SC-HONK-LIT TO WS-SC-FINAL-LIT    50510000
      *                                                                 50520000
A04880*                       MOVE WS-SERVICE-CARE-FIN-BILL             50530000
A04880*                           TO WS-BILLING-WQ-ITEMS-DATA-WF        50540000
A04880*                                   (WS-BILL-WQ-INDX)             50550000
      *                                                                 50560000
A04880*                       PERFORM 5100-PROCESS-EXCEPTION            50570000
A04880*                                             THRU 5100-EXIT      50580000
      *                                                                 50560000
T20531                        MOVE SPACES TO WS-SC-CUSTOMER-LIT         
T20531                        MOVE SPACES TO WS-SC-XFER-LIT             
T20531                        MOVE SPACES TO WS-SC-FINAL-LIT            
      *                                                                 50620000
      *  DO NOT HAVE BILL SENT TO CUSTOMER ACCOUNTING                   50630000
      *                                                                 50640000
T20554                        MOVE SPACES TO WS-WARNING-BILL-IND-BI     
      *                                                                 50660000
T12820***************************************************************   50670000
T12820* SINCE CWS0070B WILL COMMONLY USED BY VARIOUS WQ             *   50680000
T12820* GENERATION PURPOSE THROUGH  5100-PROCESS-EXCEPTION,         *   50690000
T12820* WE WILL MOVE SPACES TO THE UNWANTED PART FOR FINAL BILL     *   50700000
T12820* (FROM : UTILITY TUYPE = X IC NO = XXXX...)                  *   50710000
T12820* ESSENTIALLY WE ARE KEEPING FIRST 64 CHARACTERS -            *   50720000
T12820* THAT IS UPTO BILL NO = XXXX                                 *   50730000
T12820***************************************************************   50740000
      *                                                                 50750000
ACT020*                       MOVE WS-COMMENTS-TEXT-WF(WS-BILL-WQ-INDX) 50760000
ACT020*                         TO WS-RESET-SUPPLEMENTAL-TXT            50770000
T12820                        MOVE SPACES TO WS-UNWANTED-SUP-TXT-PART   
ACT020*                       MOVE WS-RESET-SUPPLEMENTAL-TXT            50790000
ACT020*                         TO WS-COMMENTS-TEXT-WF(WS-BILL-WQ-INDX) 50800000
      *                                                                 50810000
A04880*                     END-IF                                      50830000
PCR294                   END-IF                                         
PCR294                ELSE                                              
      *   ELSE THE ACCOUNT ISN'T FINAL BILLING                          50860000
T13597                 IF WS-CNT-STATUS-CD-CT (WS-CNT-INDX) =           
T13597                           WS-APPROVED                            
                        MOVE WS-AMT-MO-PYMT-CT (WS-CNT-INDX)            
                         TO  WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)      
                             WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) 
                        ADD  WS-AMT-MO-PYMT-CT (WS-CNT-INDX)            
                         TO  WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)   
T13597                 END-IF                                           
PCR294                END-IF                                            
                 END-EVALUATE                                           
                 EVALUATE WS-CODE-INTRST-METH-CT (WS-CNT-INDX)          
                    WHEN WS-NO-INTEREST                                 
                    WHEN WS-NO-INT-SELECTED                             
                        MOVE ZERO TO                                    
                             WS-SMPL-INT-FIN-CHRG-CT-CALC (WS-CNT-INDX) 
T12334                  MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) TO   
T12334                        WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)
                    WHEN WS-ADD-ON-INTEREST                             
                        PERFORM 2184-ADD-ON-INTEREST THRU 2184-EXIT     
PCR530                  MOVE WS-BILL-AMOUNT TO                          
PCR530                        WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)
PCR530                        WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
                    WHEN WS-SIMPLE-INTEREST                             
                        PERFORM 2182-CALCULATE-SIMPLE-INTRST THRU       
                                2182-EXIT                               
                 END-EVALUATE                                           
                 ADD WS-SMPL-INT-FIN-CHRG-CT-CALC (WS-CNT-INDX)         
                   TO WS-NEW-REVENUE-ACCUM                              
              END-IF                                                    
           END-IF.                                                      
                                                                        
       2180-EXIT.                                                       
           EXIT.                                                        
      /                                                                 51200000
       2181-CALCULATE-CNT-PMT.                                          
           MOVE '2181' TO ACTIVE-PARAGRAPH.                             
                                                                        
           IF WS-AMT-MO-PYMT-CT (WS-CNT-INDX) EQUAL ZERO                
              MOVE 5 TO WS-AMT-MO-PYMT-CT (WS-CNT-INDX)                 
              IF LS-CURR-WQ-ITEM = 50                                   
                 DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'              
                 DISPLAY 'PROCESSING TERMINATED'                        
                 MOVE 16 TO RETURN-CODE                                 
                 PERFORM 9999-BAIL-OUT THRU 9999-EXIT                   
              ELSE                                                      
                 ADD 1 TO LS-CURR-WQ-ITEM                               
                 SET WS-BILL-WQ-INDX TO LS-CURR-WQ-ITEM                 
                 MOVE WS-INSUFF-CNT-MO-PYMT                             
                   TO WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)     
T21753*                                                                 51360000
T21753           IF WS-SECURED-RATE-FL = 'Y'                            
T21753              MOVE WS-CATEGORY-ID-138 TO                          
T21753                      WS-CATEGORY-ID-WF(WS-BILL-WQ-INDX)          
T21753           END-IF                                                 
T21753*                                                                 51410000
                 PERFORM 5100-PROCESS-EXCEPTION THRU 5100-EXIT          
              END-IF                                                    
           END-IF                                                       
                                                                        
           EVALUATE TRUE                                                
T13738        WHEN WS-MAXIMUM-AMOUNT-TO-BILL <= ZERO                    
              WHEN WS-AMT-MO-PYMT-CT (WS-CNT-INDX) = ZERO               
                 MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
              WHEN WS-AMT-MO-PYMT-CT (WS-CNT-INDX) = 99999.99           
PCR548          AND WS-CODE-BILL-TYPE-BI EQUAL WS-FINAL-BILL            
                 MOVE WS-MAXIMUM-AMOUNT-TO-BILL                         
                   TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
T31692*** 04/10/06 CHANGES                                              51540000
T31692           MOVE WS-NO-SCHED-PYMTS-CT (WS-CNT-INDX) TO             
T31692                      WS-INSTALLMENT-NUMBER-CALC (WS-CNT-INDX)    
T15554           IF WS-CODE-BILL-TYPE-CT (WS-CNT-INDX) NOT =            
T15554                 WS-INSTALLMENT-CNTRACT                           
T12651              SET WS-FINAL-INSTALLMENT TO TRUE                    
T15554           END-IF                                                 
              WHEN OTHER                                                
                 IF WS-DATE-PYMT-START-CT (WS-CNT-INDX) = LOW-VALUES    
                      OR WS-NO-SCHED-PYMTS-CT (WS-CNT-INDX) = ZERO      
                    MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)       
                      TO WS-AMT-MO-PYMT-CT (WS-CNT-INDX)                
                 ELSE                                                   
                    PERFORM 2183-CHECK-LAST-MONTHLY-PYMT THRU 2183-EXIT 
                 END-IF                                                 
                                                                        
                 IF WS-MAXIMUM-AMOUNT-TO-BILL                           
                           < WS-AMT-MO-PYMT-CT (WS-CNT-INDX)            
PCR548               OR WS-AMT-MO-PYMT-CT (WS-CNT-INDX) = 99999.99      
                    MOVE WS-MAXIMUM-AMOUNT-TO-BILL                      
                      TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)          
                 ELSE                                                   
                    MOVE WS-AMT-MO-PYMT-CT (WS-CNT-INDX)                
                      TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)          
                 END-IF                                                 
           END-EVALUATE.                                                
                                                                        
       2181-EXIT.                                                       
           EXIT.                                                        
      /                                                                 51830000
       2182-CALCULATE-SIMPLE-INTRST.                                    
           MOVE '2182' TO ACTIVE-PARAGRAPH.                             
           COMPUTE WS-SMPL-INT-FIN-CHRG-CT-CALC (WS-CNT-INDX) ROUNDED = 
T9919          ((WS-INTRST-RATE-CT (WS-CNT-INDX) / 100) *               
                WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)) / 12.         
           IF WS-CODE-EMPL-ACCT-CU EQUAL WS-EMPLOYEE-ACCT               
               DIVIDE WS-SMPL-INT-FIN-CHRG-CT-CALC (WS-CNT-INDX)        
                   BY 2 GIVING                                          
                      WS-SMPL-INT-FIN-CHRG-CT-CALC(WS-CNT-INDX) ROUNDED
           END-IF.
           ADD WS-SMPL-INT-FIN-CHRG-CT-CALC (WS-CNT-INDX)               
               TO WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX).             
       2182-EXIT.                                                       
           EXIT.                                                        
      /                                                                 51970000
       2183-CHECK-LAST-MONTHLY-PYMT.                                    
           MOVE '2183' TO ACTIVE-PARAGRAPH.                             
           MOVE WS-AMT-MO-PYMT-CT (WS-CNT-INDX) TO WS-MO-PYMT           
           MOVE WS-NO-SCHED-PYMTS-CT (WS-CNT-INDX) TO WS-SCHED-PYMTS    
           MOVE WS-AMT-ORIG-ENTERED-CT (WS-CNT-INDX) TO WS-ORIG-BAL     
T30199     MOVE WS-REBATE-AMOUNT-CT (WS-CNT-INDX)    TO WS-REBATE-AMT   
           PERFORM 5010-DETERMINE-MONTHS-BILLED THRU 5010-EXIT          
                                                                        
T31692     MOVE WS-MONTHS-BILLED-COUNTER  TO                            
T31692                      WS-INSTALLMENT-NUMBER-CALC (WS-CNT-INDX).   
                                                                        
           SET WS-NOT-FINAL-INSTALL TO TRUE.                            
PCR530     SET WS-NOT-FINAL-INSTALL-EARLY TO TRUE.                      
                                                                        
PCR530*    IF THE UNBILLED PRINCIPAL IS LESS THAN THE MO PYMT, THIS     52120000
PCR530*    IS THE FINAL INSTALLMENT (DETERMINE IF THE CONTRACT WAS      52130000
PCR530*    PAID OFF EARLY OR ON TIME).                                  52140000
PCR548     IF WS-AMT-MO-PYMT-CT (WS-CNT-INDX) = 99999.99                
PCR548         SET WS-FINAL-INSTALL-EARLY TO TRUE                       
T30199         GO TO 2183-EXIT                                          
T30199     END-IF                                                       
T28838     COMPUTE WS-UNBILLED-PRINCIPAL =                              
T28838         (WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) -              
T28838          WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) -                  
T28838          WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) -                 
T28838          WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) -                 
T28838          WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX))                  
T28838     END-COMPUTE                                                  
T30199     IF WS-MAXIMUM-AMOUNT-TO-BILL  >                              
T30199                    WS-AMT-MO-PYMT-CT (WS-CNT-INDX)               
T30199          AND WS-MONTHS-BILLED-COUNTER = WS-SCHED-PYMTS           
T30199             SET WS-FINAL-INSTALLMENT   TO TRUE                   
T30199             COMPUTE WS-AMT-MO-PYMT-CT (WS-CNT-INDX) =            
T30199                             WS-MAXIMUM-AMOUNT-TO-BILL            
T30199     ELSE                                                         
T28839       IF WS-UNBILLED-PRINCIPAL <=                                
PCR530                    WS-AMT-MO-PYMT-CT (WS-CNT-INDX)               
T28838          IF ((WS-MONTHS-BILLED-COUNTER < WS-SCHED-PYMTS) OR      
T28838              (WS-MONTHS-BILLED-COUNTER = WS-SCHED-PYMTS AND      
T28838               WS-UNBILLED-PRINCIPAL <                            
T28838                                WS-AMT-MO-PYMT-CT (WS-CNT-INDX))) 
T28838             SET WS-FINAL-INSTALL-EARLY TO TRUE                   
T28838          ELSE                                                    
T28838             SET WS-FINAL-INSTALLMENT   TO TRUE                   
T28838          END-IF                                                  
T20793          COMPUTE WS-AMT-MO-PYMT-CT (WS-CNT-INDX) =               
T20793               WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) -         
T20793               WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX)               
T21274          IF WS-AMT-MO-PYMT-CT (WS-CNT-INDX) < 0                  
T21274            MOVE WS-MO-PYMT                                       
T21274               TO WS-AMT-MO-PYMT-CT (WS-CNT-INDX)                 
T21274          END-IF                                                  
T28839       END-IF                                                     
           END-IF.                                                      
                                                                        
       2183-EXIT.                                                       
           EXIT.                                                        
      /                                                                 52550000
       2184-ADD-ON-INTEREST.                                            
           MOVE WS-INTRST-YTD-CT (WS-CNT-INDX) TO WS-INTEREST-TO-DATE.  
PCR530     COMPUTE WS-UNBILLED-PRINCIPAL =                              
PCR530         (WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) -              
PCR530          WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) -                  
PCR530          WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) -                 
PCR530          WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) -                 
PCR530          WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)).                 
           IF WS-FINAL-INSTALLMENT                                      
               MOVE WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) TO             
                      WS-INTEREST-ACCRUED                               
               COMPUTE WS-TOTAL-INTEREST =                              
                          WS-INTEREST-TO-DATE +                         
                          WS-INTEREST-ACCRUED                           
PCR530         COMPUTE WS-BILL-AMOUNT = WS-UNBILLED-PRINCIPAL +         
PCR530                      WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX)        
               MOVE 0.00 TO WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX)        
           ELSE                                                         
PCR530     IF WS-FINAL-INSTALL-EARLY                                    
T18600        IF WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) >                 
T18600           WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)               
T18600          INITIALIZE CJF00105                                     
T18600          MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)           
T18600                         TO WS-105-AMT-POSTED                     
T18600          MOVE WS-GL-ACCT-NO-DEF-INT-CT (WS-CNT-INDX)             
T18600                         TO WS-105-ACCT-GEN-LED-DR                
T18600          MOVE WS-AR-CNT-GL-NO (WS-GL-SUB)                        
T18600                         TO WS-105-ACCT-GEN-LED-CR                
T18600          IF WS-105-AMT-POSTED > 0                                
T18600            PERFORM 5250-CREATE-105-JRNL-FROM-AC                  
T18600                              THRU 5250-EXIT                      
T18600          END-IF                                                  
T18600                                                                  
T18600          INITIALIZE CJF00105                                     
T18600          COMPUTE WS-105-AMT-POSTED =                             
T18600                  WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) -          
T18600                  WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)        
T18600          MOVE WS-GL-ACCT-NO-DEF-INT-CT (WS-CNT-INDX)             
T18600                         TO WS-105-ACCT-GEN-LED-DR                
T18600          MOVE WS-GL-ACCT-NO-ERN-INT-CT (WS-CNT-INDX)             
T18600                         TO WS-105-ACCT-GEN-LED-CR                
T18600          IF WS-105-AMT-POSTED > 0                                
T18600             PERFORM 5250-CREATE-105-JRNL-FROM-AC                 
T18600                              THRU 5250-EXIT                      
T18600          END-IF                                                  
T18600       MOVE 'Y'  TO  WS-EARLY-PAYOFF-PROC-FLG                     
T18600****  THE CONTRACT HAS ALREADY BEEN PAID OFF,THEREFORE MOVE       53040000
T18600****  ZEROES INTO THE AR-CNTL ROW.                                53050000
T18600          MOVE ZERO  TO WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)  
T18600                        WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
T18600                        WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)     
T18600                        WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)     
T18600                        WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)     
T18600        END-IF                                                    
T18600                                                                  
CSG818        IF WS-CNT-STATUS-CD-CT (WS-CNT-INDX) = WS-CNT-CANCELLED OR
CSG818                                               WS-CNT-CLOSED      
CSG818          MOVE WS-DATE-BILL-DAY-30-AT TO WS-START-DATE            
CSG818          IF WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) = LOW-VALUES    
CSG818             MOVE WS-DATE-BILL-DAY-00-AT TO WS-END-DATE           
CSG818          ELSE                                                    
CSG818             MOVE WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) TO         
CSG818                     WS-END-DATE                                  
CSG818          END-IF                                                  
CSG818        ELSE                                                      
PCR530            IF WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) >             
PCR530               WS-DATE-BILL-DAY-30-AT                             
PCR530                   MOVE WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) TO   
PCR530                        WS-START-DATE                             
PCR530            ELSE                                                  
PCR530              IF WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) = LOW-VALUES
PCR530                AND WS-DATE-CONTRACT-CT (WS-CNT-INDX) >           
PCR530                     WS-DATE-BILL-DAY-30-AT                       
PCR530                MOVE WS-DATE-CONTRACT-CT (WS-CNT-INDX) TO         
PCR530                       WS-START-DATE                              
PCR530              ELSE                                                
PCR530                MOVE WS-DATE-BILL-DAY-30-AT TO WS-START-DATE      
PCR530              END-IF                                              
PCR530            END-IF                                                
PCR530          MOVE LS-INPUT-DATE TO WS-END-DATE                       
CSG818        END-IF                                                    
                                                                        
PCR530         PERFORM 7015-GET-NUMBER-OF-DAYS THRU 7015-EXIT           
PCR530         COMPUTE WS-INTEREST-ACCRUED ROUNDED =                    
PCR530            ((WS-UNBILLED-PRINCIPAL *                             
T12440                 WS-INTRST-RATE-CT (WS-CNT-INDX) *                
T12440                    WS-NUMBER-DAYS) / (360 * 100))                
PCR530         IF WS-INTEREST-ACCRUED >=                                
PCR530              WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX)                
PCR530            MOVE WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) TO          
PCR530                   WS-DEF-TO-EARNED                               
T18699                   WS-INTEREST-ACCRUED                            
PCR530            MOVE 0 TO WS-AMT-DEF-INTEREST-LOST                    
PCR530         ELSE                                                     
PCR530               COMPUTE WS-AMT-DEF-INTEREST-LOST =                 
PCR530                     WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) -       
PCR530                     WS-INTEREST-ACCRUED                          
PCR530               MOVE WS-INTEREST-ACCRUED TO WS-DEF-TO-EARNED       
PCR530         END-IF                                                   
PCR530         COMPUTE WS-TOTAL-INTEREST =                              
PCR530                 WS-INTEREST-TO-DATE +                            
PCR530                 WS-INTEREST-ACCRUED                              
PCR530         MOVE 0.00 TO WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX)        
PCR530         COMPUTE WS-INT-NOT-CALCULATED =                          
PCR530                   WS-INTEREST-ACCRUED - WS-DEF-TO-EARNED         
PCR530         COMPUTE WS-BILL-AMOUNT = WS-UNBILLED-PRINCIPAL +         
PCR530                  WS-INTEREST-ACCRUED                             
T17939         IF WS-BILL-AMOUNT < 0                                    
T17939            MOVE ZERO  TO  WS-BILL-AMOUNT                         
T17939         END-IF                                                   
PCR530     ELSE                                                         
CSG818        IF WS-CNT-STATUS-CD-CT (WS-CNT-INDX) = WS-CNT-CANCELLED OR
CSG818                                               WS-CNT-CLOSED      
CSG818          MOVE WS-DATE-BILL-DAY-30-AT TO WS-START-DATE            
CSG818          IF WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) = LOW-VALUES    
CSG818             MOVE WS-DATE-BILL-DAY-00-AT TO WS-END-DATE           
CSG818          ELSE                                                    
CSG818             MOVE WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) TO         
CSG818                     WS-END-DATE                                  
CSG818          END-IF                                                  
CSG818        ELSE                                                      
               IF WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) >                
                  WS-DATE-BILL-DAY-30-AT                                
                      MOVE WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) TO      
                           WS-START-DATE                                
               ELSE                                                     
T8121            IF WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX) = LOW-VALUES   
PCR530              AND WS-DATE-CONTRACT-CT (WS-CNT-INDX) >             
PCR530                    WS-DATE-BILL-DAY-30-AT                        
T8121              MOVE WS-DATE-CONTRACT-CT (WS-CNT-INDX) TO            
T8121                      WS-START-DATE                                
T8121            ELSE                                                   
                   MOVE WS-DATE-BILL-DAY-30-AT TO WS-START-DATE         
T8121            END-IF                                                 
               END-IF                                                   
               MOVE LS-INPUT-DATE TO WS-END-DATE                        
CSG818        END-IF                                                    
                                                                        
PCR305         PERFORM 7015-GET-NUMBER-OF-DAYS THRU 7015-EXIT           
T12224         COMPUTE WS-NUMBER-MTHS = WS-NUMBER-DAYS / 30             
T12224         IF WS-NUMBER-MTHS <= ZERO                                
T12224            MOVE +1   TO WS-NUMBER-MTHS                           
T12224         END-IF                                                   
               COMPUTE WS-INTEREST-ACCRUED ROUNDED =                    
PCR530               ((WS-UNBILLED-PRINCIPAL *                          
T12440                 WS-INTRST-RATE-CT (WS-CNT-INDX) *                
PCR530                 WS-NUMBER-MTHS) /                                
T12440                 (12 * 100))                                      
               COMPUTE WS-TOTAL-INTEREST =                              
                       WS-INTEREST-TO-DATE +                            
                       WS-INTEREST-ACCRUED                              
                   COMPUTE WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) =       
                           WS-AMT-DEF-INTEREST-CT (WS-CNT-INDX) -       
                           WS-INTEREST-ACCRUED                          
T12593         COMPUTE WS-BILL-AMOUNT =                                 
T12593                           WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)  
           END-IF                                                       
           MOVE WS-TOTAL-INTEREST TO WS-INTRST-YTD-CT (WS-CNT-INDX)
           END-IF.    
      *                                                                 54590000
T18424     IF WS-EARLY-PAYOFF-PROC-FLG = 'N'                            
T9560          INITIALIZE CJF00105                                      
PCR530         IF WS-FINAL-INSTALL-EARLY                                
PCR530            MOVE WS-DEF-TO-EARNED           TO WS-105-AMT-POSTED  
PCR530         ELSE                                                     
PCR305            MOVE WS-INTEREST-ACCRUED        TO WS-105-AMT-POSTED  
PCR530         END-IF                                                   
PCR305         MOVE WS-GL-ACCT-NO-DEF-INT-CT(WS-CNT-INDX)               
PCR305                                      TO WS-105-ACCT-GEN-LED-DR   
PCR305         MOVE WS-GL-ACCT-NO-ERN-INT-CT(WS-CNT-INDX)               
PCR305                                      TO WS-105-ACCT-GEN-LED-CR   
               IF WS-105-AMT-POSTED > 0                                 
PCR305           PERFORM 5250-CREATE-105-JRNL-FROM-AC     THRU 5250-EXIT
               END-IF                                                   
      *                                                                 54740000
PCR530        INITIALIZE CJF00105                                       
PCR530         IF WS-FINAL-INSTALL-EARLY                                
PCR530            MOVE WS-AMT-DEF-INTEREST-LOST  TO WS-105-AMT-POSTED   
T12835            SUBTRACT WS-AMT-DEF-INTEREST-LOST FROM                
T12835                      WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)    
T17939            IF WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) < 0       
T17939            MOVE  ZERO TO WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)
T17939            END-IF                                                
T12835            MOVE WS-BILL-AMOUNT TO                                
T12835                      WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)       
PCR530            MOVE WS-GL-ACCT-NO-DEF-INT-CT(WS-CNT-INDX)            
PCR530                                      TO WS-105-ACCT-GEN-LED-DR   
PCR530             MOVE WS-AR-CNT-GL-NO (WS-GL-SUB)                     
PCR530                                      TO WS-105-ACCT-GEN-LED-CR   
T18699            IF WS-105-AMT-POSTED > 0                              
PCR530                PERFORM 5250-CREATE-105-JRNL-FROM-AC              
T18699                                        THRU 5250-EXIT            
T18699            END-IF                                                
PCR530            INITIALIZE CJF00105                                   
PCR530         END-IF                                                   
PCR530     END-IF.                                                      
      *                                                                 55020000
T17939     IF WS-FINAL-INSTALL-EARLY                                    
T17939        IF WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX) = 0           
T17939           AND WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) = 0          
T17939           AND WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) = 0          
T17939           AND WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) = 0          
T17939           AND WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) = 0          
T17939                                                                  
T17939           MOVE 'D' TO WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)  
T17939           MOVE WS-CNT-PAID TO                                    
T17939                     WS-CNT-STATUS-CD-CT (WS-CNT-INDX)            
T21265           MOVE WS-LIEN-CD-CT(WS-CNT-INDX) TO                     
T21265                     CT-LIEN-CD                                   
T21265           IF CT-LIEN-CD  = 'Y'                                   
T21265                PERFORM 6797F-WRITE-LIEN-WQ                       
T21265                   THRU 6797F-EXIT                                
T21265           END-IF                                                 
T17939           MOVE LS-INPUT-DATE TO                                  
T17939                         WS-STATUS-CHANGE-DT-CT (WS-CNT-INDX)     
T17939        END-IF                                                    
T17939     END-IF.                                                      
T18424     MOVE 'N'  TO WS-EARLY-PAYOFF-PROC-FLG.                       
      *                                                                 55240000
       2184-EXIT.                                                       
           EXIT.                                                        
      /                                                                 55270000
T33192 2185-PROCESS-SRVCARE.                                            
T33192*                                                                 55290000
P00794*** CALCULATE TAXES FOR Service Care Appliance Repair             55300000
P00794***  FROM 2014-01-01                                              55320000
ACT059     MOVE WS-CNT-NAME-CD-CT(WS-CNT-INDX) TO WS-CNT-NAME-CODE.     
ACT059     IF CSR-DATABASE AND WS-COMPANY-NO-AT = WS-PSNC               
ACT059        PERFORM 2185A-PROCESS-CNT-NAME-CD  THRU 2185A-EXIT        
P00794     END-IF                                                       
P00794     .                                                            
P00794                                                                  
T33192 2185-EXIT.                                                       
T33192     EXIT.                                                        
T33192/                                                                 55500000
ACT059 2185A-PROCESS-CNT-NAME-CD.                                       
ACT059*                                                                 55520000
ACT059     EVALUATE TRUE                                                
ACT059         WHEN CNT-NAME-CODE-1                                     
ACT059            PERFORM 2186-CALC-SRVCARE-TAX   THRU 2186-EXIT        
ACT059         WHEN CNT-NAME-CODE-2                                     
ACT059           IF WS-DATE-CONTRACT-CT (WS-CNT-INDX) >= '2016-03-01'   
ACT059            PERFORM 2186-CALC-SRVCARE-TAX   THRU 2186-EXIT        
ACT059           END-IF                                                 
ACT059         WHEN OTHER                                               
ACT059            CONTINUE                                              
ACT059     END-EVALUATE.                                                
ACT059                                                                  
ACT059 2185A-EXIT.                                                      
ACT059     EXIT.                                                        
T33192/                                                                 55500000
T33192 2186-CALC-SRVCARE-TAX.                                           
T33192*                                                                 55520000
P00794     PERFORM 2187-GET-TAX-RATES        THRU 2187-EXIT             
T33192     PERFORM 2188-SELECT-LOCATION      THRU 2188-EXIT             
T33192     MOVE F4-MNICPLTY-COUNTY-CD        TO WS-LOCATION(WS-CNT-INDX)
T33192     MOVE WS-COMPANY-NO-AT             TO K6-COMPANY-NO           
T33192     MOVE WS-CNT-NAME-CD-CT(WS-CNT-INDX)   TO K6-CNT-NAME-CD      
T33192     PERFORM 7510-SELECT-CONTRACT-NAME THRU 7510-EXIT             
T33192     MOVE K6-CNT-NAME-DESC TO                                     
T33192                          WS-CONTRACT-NAME-DESC-CALC(WS-CNT-INDX) 
T33192     MOVE LS-CURR-REVENUE-MONTH        TO                         
T33192                                 WS-REVENUE-MONTH-CT(WS-CNT-INDX) 
T33192     INITIALIZE               WS-TOTAL-TAX-AMOUNT(WS-CNT-INDX)    
P00794*** STATE TAX                                                     55670000
P00794     SET WS-SVCARE-INDX      TO 1                                 
P00794     COMPUTE WS-TAX-AMOUNT ROUNDED =                              
P00794            WS-TAX-RATE-CALC-ST *                                 
P00794                            WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) 
P00794     MOVE WS-TAX-AMOUNT                                           
P00794       TO WS-SVCARE-TAX-AMOUNT(WS-CNT-INDX, WS-SVCARE-INDX)       
P00794          WS-101-AMT-POSTED                                       
P00794     PERFORM 5300-GET-GEN-LED-NO-FROM-TABLE    THRU 5300-EXIT     
P00794     MOVE WS-GL-ACCT-NO-ST                                        
P00794       TO WS-SVCARE-TAX-GL-NO(WS-CNT-INDX, WS-SVCARE-INDX)        
P00794          WS-101-ACCT-GEN-LED-CR                                  
P00794     PERFORM 2189-WRITE-SVCARE-TAX-GL      THRU 2189-EXIT         
P00794     ADD  WS-TAX-AMOUNT        TO WS-TOTAL-SVCARE-TAX             
P00794                                                                  
P00794*** COUNTY TAX                                                            
P00794     SET WS-SVCARE-INDX   UP BY 1                                 
P00794     COMPUTE WS-TAX-AMOUNT ROUNDED =                              
P00794            WS-TAX-RATE-CNTY *                                    
P00794                            WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) 
P00794     MOVE WS-TAX-AMOUNT                                           
P00794       TO WS-SVCARE-TAX-AMOUNT(WS-CNT-INDX, WS-SVCARE-INDX)       
P00794          WS-101-AMT-POSTED                                       
P00794     PERFORM 5300-GET-GEN-LED-NO-FROM-TABLE    THRU 5300-EXIT     
P00794     MOVE WS-GL-ACCT-NO-CNTY                                      
P00794       TO WS-SVCARE-TAX-GL-NO(WS-CNT-INDX, WS-SVCARE-INDX)        
P00794          WS-101-ACCT-GEN-LED-CR                                  
P00794     PERFORM 2189-WRITE-SVCARE-TAX-GL      THRU 2189-EXIT         
P00794                                                                  
P00794     ADD  WS-TAX-AMOUNT        TO WS-TOTAL-SVCARE-TAX             
P00794     MOVE WS-TOTAL-SVCARE-TAX  TO WS-TOTAL-TAX-AMOUNT(WS-CNT-INDX)
P00794     ADD  WS-TOTAL-SVCARE-TAX  TO                                 
P00794                          WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
P00794                          WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)
P00794     INITIALIZE WS-TOTAL-SVCARE-TAX                               
P00794     .                                                            
T33192 2186-EXIT.                                                       
T33192     EXIT.                                                        
T33192/                                                                 55850000
P00794*************************************************                         
P00794* GET STATE AND COUNTY TAX RATES FROM ARRAY                               
P00794*************************************************                         
T33192 2187-GET-TAX-RATES.                                              
T33192*                                                                 55870000
T33192     IF WS-REV-DISTRICT-CD-CT(WS-CNT-INDX)  NOT EQUAL SPACES      
T33192                         AND LOW-VALUES                           
T33192        MOVE WS-REV-DISTRICT-CD-CT(WS-CNT-INDX) TO                
T33192                                           F4-REV-DISTRICT-CD     
T33192     ELSE                                                         
T33192        MOVE WS-REV-DISTRICT-CD-PR      TO F4-REV-DISTRICT-CD     
T33192                                WS-REV-DISTRICT-CD-CT(WS-CNT-INDX)
T33192     END-IF                                                       
P00794                                                                  
P00794     INITIALIZE WS-TAX-RATE-ST                                    
P00794                WS-TAX-RATE-CALC-ST                               
P00794                WS-TAX-RATE-CNTY                                  
P00794                WS-GL-ACCT-NO-ST                                  
P00794                WS-GL-ACCT-NO-CNTY                                
P00794                                                                  
P00794     PERFORM VARYING WS-PSNC-TAX-DATA-INDX FROM 1 BY 1            
P00794             UNTIL WS-PSNC-TAX-DATA-INDX > 1000                   
P00794             OR WS-TAX-CNTRL-NO (WS-PSNC-TAX-DATA-INDX) = 0       
P00794                                                                  
P00794         IF WS-DETAIL-ID (WS-PSNC-TAX-DATA-INDX)                  
P00794            = WS-REV-DISTRICT-CD-PR                               
P00794                                                                  
P00794            IF WS-TAX-CNTRL-NO (WS-PSNC-TAX-DATA-INDX)            
P00794               = 12                                               
P00794               MOVE WS-TAX-RATE (WS-PSNC-TAX-DATA-INDX)           
P00794                 TO WS-TAX-RATE-ST                                
P00794               MOVE WS-GL-ACCT-NO (WS-PSNC-TAX-DATA-INDX)         
P00794                 TO WS-GL-ACCT-NO-ST                              
P00794            ELSE                                                  
P00794               MOVE WS-TAX-RATE (WS-PSNC-TAX-DATA-INDX)           
P00794                 TO WS-TAX-RATE-CNTY                              
P00794               MOVE WS-GL-ACCT-NO (WS-PSNC-TAX-DATA-INDX)         
P00794                 TO WS-GL-ACCT-NO-CNTY                            
P00794            END-IF                                                
P00794         END-IF                                                   
P00794                                                                  
P00794     END-PERFORM                                                  
P00794                                                                  
ACT302**** IF TAX RATES ARE NOT FOUND DO NOT PROCESS ACCOUNT                    
ACT302     IF (WS-TAX-RATE-ST = 0 OR                                    
ACT302         WS-TAX-RATE-CNTY = 0 )                                   
ACT302          STRING 'SERVICE CARE TAX RATE NOT FOUND FOR REV DIST: ' 
ACT302                  WS-REV-DISTRICT-CD-PR                           
ACT302                  DELIMITED BY SIZE                               
ACT302            INTO WS-MISC-MSG-TEXT                                 
ACT302          MOVE +50 TO WS-MISC-MSG-LEN                             
ACT302          MOVE 12 TO RETURN-CODE                                  
ACT302          PERFORM 9910-MISC-ERROR THRU 9910-EXIT                  
ACT302     END-IF                                                       
                                                                        
P00794**** ACTUAL STATE RATE TO USE IN CALCULATION.                             
P00794     COMPUTE WS-TAX-RATE-CALC-ST                                  
P00794              = WS-TAX-RATE-ST - WS-TAX-RATE-CNTY                 
P00794     END-COMPUTE                                                  
T33192     .                                                            
T33192 2187-EXIT.                                                       
T33192     EXIT.                                                        
T33192/                                                                 56280000
T33192 2188-SELECT-LOCATION.                                            
T33192*                                                                 56300000
T33192     EXEC SQL                                                     
T33192       SELECT MNICPLTY_COUNTY_CD                                  
T33192         INTO :F4-MNICPLTY-COUNTY-CD                              
T33192         FROM CSS_MNICPLTY_CNTY                                   
T33192        WHERE REV_DISTRICT_CD = :F4-REV-DISTRICT-CD               
T33192     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T33192                                                                  
T33192     MOVE SQLCODE                   TO WS-ACTIVE-RETURN-CODE.     
T33192                                                                  
T33192     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
T33192        NEXT SENTENCE                                             
T33192     ELSE                                                         
T33192        MOVE 'F4'                  TO WS-DB2-TABLE-ID             
T33192        MOVE 'SELECT'              TO WS-DB2-FUNCTION             
T33192        MOVE SQLCODE               TO WS-DB2-RETURN-CODE          
T33192        MOVE '108'                 TO WS-DB2-MODULE-ID            
T33192        MOVE '2187'                TO WS-DB2-PARAGRAPH            
T33192        MOVE F4-REV-DISTRICT-CD    TO WS-DB2-KEY-1                
T33192        MOVE 12 TO RETURN-CODE                                    
T33192        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
T33192     END-IF                                                       
T33192     .                                                            
T33192 2188-EXIT.                                                       
T33192     EXIT.                                                        
T33192/                                                                 56550000
T33192 2189-WRITE-SVCARE-TAX-GL.                                        
T33192*                                                                 56570000
T33192     PERFORM 5202-CREATE-101-HEADING           THRU 5202-EXIT     
T33192     MOVE LS-INPUT-DATE           TO WS-101-DATE-AR-BILLED        
T33192                                                                  
T33192     MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX) TO WS-101-ITEM-ID-NO    
P00794     MOVE CJF00101                TO CJF00105                     
T33192     MOVE WS-REV-DISTRICT-CD-PR   TO WS-105-CODE-REVENUE-DISTRICT 
T33192     MOVE WS-CODE-EMPL-ACCT-CU    TO WS-105-CODE-EMPL-ACCT        
T33192     MOVE WS-CODE-COMPANY-ACCT-AT TO WS-105-CODE-COMPANY-ACCT     
T33192     MOVE WS-CODE-ACCT-STAT-AT    TO WS-105-CODE-ACCOUNT-STATUS   
T33192     MOVE WS-CODE-PREMISE-STAT-PR TO WS-105-CODE-PREMISE-STATUS   
T33192     MOVE WS-101-AMT-POSTED       TO WS-101-AMOUNT-ENTERED        
P00794     MOVE WS-101-AMT-POSTED       TO E-FWK03-RCV-DEBIT-AMT        
P00794                                     E-FWK03-GEN-LEG-CREDIT-AMT   
P00794     MOVE ZEROS                   TO E-FWK03-RCV-CREDIT-AMT       
P00794                                     E-FWK03-GEN-LEG-DEBIT-AMT    
P00794     MOVE ZEROS                   TO E-FWK03-SORT-SUM-FLD         
P00794                                     WS-105-QUANTITY-ENTERED      
P00794     MOVE CJF00105                TO E-FWK03-USER-DEFINED-AREA    
ACt016     PERFORM 8200-WRITE-FCSWK03 THRU 8200-EXIT.                   
T33192     .                                                            
T33192 2189-EXIT.                                                       
T33192     EXIT.                                                        
T33192/                                                                 56760000
      /                                                                 57960000
       2200-PROCESS-PJS-RECV.                                           
           IF WS-SHARE-STATUS-CD-PJ = WS-PLEDGE                         
              MOVE WS-ACTIVE TO WS-SHARE-STATUS-CD-PJ                   
           END-IF                                                       
                                                                        
      * IF A PROJ SHARE CONTRIBUTOR GOES MORE THAN 60 DAYS WITHOUT      58020000
      * PAYING, INACTIVATE THE CONTRIBUTION                             58030000
T9627 * LPC LOGIC WAS MOVED AFTER AGING - USE 90-DAY INSTEAD OF 60.     58040000
T11651     IF WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) > ZERO              
T11651           AND WS-DATE-BILL-DAY-60-AT < LS-DATE-55-DAYS-AGO       
T13274      IF WS-SHARE-STATUS-CD-PJ NOT EQUAL WS-PJS-INACTIVE          
              MOVE WS-PJS-INACTIVE TO WS-SHARE-STATUS-CD-PJ             
T11624        MOVE LS-INPUT-DATE   TO WS-ACCT-TERM-DT-PJ                
T13274      END-IF                                                      
                                                                        
T5832 *       GET ENTIRE AMOUNT TO INACTIVATE INTO 00 DAY               58240000
T5832 *       BUCKET FOR JOURNALING PURPOSES AND ZERO OUT THE           58250000
T5832 *       OTHER BUCKETS.                                            58260000
T5832         ADD   WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)               
T5832               WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)               
T5832               WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)               
T5832            TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)               
T5832         MOVE ZERO TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)        
T5832                    WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)          
T5832                    WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)          
T11624                   WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)     
T5832         PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT       
              MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)        
                         WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)       
T11825     ELSE                                                         
PCR363        IF WS-CODE-ACCT-STAT-AT NOT EQUAL WS-FINAL-BILL           
T13274          AND WS-SHARE-STATUS-CD-PJ NOT EQUAL WS-PJS-INACTIVE     
                   MOVE WS-MONTHLY-BILL-AM-PJ                           
                     TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)           
                        WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)      
                   ADD WS-MONTHLY-BILL-AM-PJ                            
                     TO WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)        
PCR363        END-IF                                                    
T11825      END-IF.                                                     
                                                                        
       2200-EXIT.                                                       
           EXIT.                                                        
      /                                                                 58510000
C36304 2300-CALC-INSTAL-NUM-REBILLS.                                    
C36304     MOVE '2300' TO ACTIVE-PARAGRAPH.                             
C36304     IF WS-CNT-STATUS-CD-CT (WS-CNT-INDX) NOT = 'A'     AND       
C36304        WS-DATE-PYMT-START-CT (WS-CNT-INDX) <= LS-INPUT-DATE      
C36304        COMPUTE WS-MAXIMUM-AMOUNT-TO-BILL                         
C36304                = WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)        
C36304                - (WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) +        
C36304                   WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) +        
C36304                   WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) +        
C36304                   WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX))     
C36304        IF WS-CODE-BILL-TYPE-CT (WS-CNT-INDX) = 'C' OR 'D'        
C36304           IF WS-CODE-BILL-TYPE-BI = WS-FINAL-BILL      AND       
C36304              WS-AMT-MO-PYMT-CT(WS-CNT-INDX)=99999.99             
C36304              MOVE WS-NO-SCHED-PYMTS-CT (WS-CNT-INDX)   TO        
C36304                   WS-INSTALLMENT-NUMBER-CALC (WS-CNT-INDX)       
C36304           ELSE                                                   
C36304              IF WS-NO-SCHED-PYMTS-CT (WS-CNT-INDX) = 0 OR        
C36304                 WS-DATE-PYMT-START-CT (WS-CNT-INDX) =  LOW-VALUES
C36304                 NEXT SENTENCE                                    
C36304              ELSE                                                
C36304                 MOVE WS-AMT-MO-PYMT-CT (WS-CNT-INDX)   TO        
C36304                      WS-MO-PYMT                                  
C36304                 MOVE WS-NO-SCHED-PYMTS-CT (WS-CNT-INDX) TO       
C36304                      WS-SCHED-PYMTS                              
C36304                 PERFORM 5010-DETERMINE-MONTHS-BILLED   THRU      
C36304                         5010-EXIT                                
C36304                 MOVE WS-MONTHS-BILLED-COUNTER          TO        
C36304                   WS-INSTALLMENT-NUMBER-CALC (WS-CNT-INDX)       
C36304              END-IF                                              
C36304           END-IF                                                 
C36304        END-IF                                                    
C36304     END-IF.                                                      
C36304 2300-EXIT.                                                       
      /                                                                 58850000
       3000-CALCULATE-LPC-CHARGE.                                       
           PERFORM 3030-PROJECT-LPC             THRU 3030-EXIT          
T10439     SET WS-LPC-AC-NOT-CREATED TO TRUE                            
                                                                        
6081       IF WS-LPC-UTIL-ELIG-BFR-BILL-CALC > ZERO                     
              IF WS-THERE-IS-A-UTL-LPC-AC                               
                 SET WS-THERE-IS-AN-LPC-AC TO TRUE                      
              ELSE                                                      
                 SET WS-THERE-IS-NO-LPC-AC TO TRUE                      
              END-IF                                                    
              MOVE 30 TO WS-PYMT-PRIORITY-HOLD                          
              PERFORM 3010-CALCULATE-LPC-CHARGE THRU 3010-EXIT          
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
                 TO WS-LPC-CUR-ACCUM (WS-LO-INDX)                       
                    WS-LPC-NEW-ACCUM (WS-LO-INDX)                       
           END-IF                                                       
                                                                        
           IF WS-LPC-NONUT-ELG-BFR-BILL-CALC > ZERO                     
              IF WS-THERE-IS-A-NONUT-LPC-AC                             
                 SET WS-THERE-IS-AN-LPC-AC TO TRUE                      
              ELSE                                                      
                 SET WS-THERE-IS-NO-LPC-AC TO TRUE                      
              END-IF                                                    
              MOVE 39 TO WS-PYMT-PRIORITY-HOLD                          
              PERFORM 3010-CALCULATE-LPC-CHARGE THRU 3010-EXIT          
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
                 TO WS-LPN-CUR-ACCUM (WS-LO-INDX)                       
                    WS-LPN-NEW-ACCUM (WS-LO-INDX)                       
           END-IF.                                                      
                                                                        
           IF WS-LPC-AC-WAS-CREATED                                     
               MOVE WS-CODE-USED  TO WS-CODE-LPC                        
           END-IF.                                                      
                                                                        
       3000-EXIT.                                                       
           EXIT.                                                        
      /                                                                 59220000
       3010-CALCULATE-LPC-CHARGE.                                       
      *** THE FOLLOWING SEARCH POSITIONS WS-AR-DATA-INDX TO THE AR      59240000
      *** CNTRL DATA FOR RECEIVABLE THAT IS THE LPC:                    59250000
           SET WS-AR-DATA-INDX TO 1                                     
           SEARCH WS-AR-DATA                                            
               AT END                                                   
                  IF WS-THERE-IS-AN-LPC-AC                              
                     MOVE 'AR CONTROL RETRIEVAL ERROR'                  
                       TO WS-MISC-MSG-TEXT                              
                     MOVE +26 TO WS-MISC-MSG-LEN                        
                     MOVE 16 TO RETURN-CODE                             
                     PERFORM 9910-MISC-ERROR THRU 9910-EXIT             
                  ELSE                                                  
                     MOVE 'AR CONTROL OVERFLOW'                         
                       TO WS-MISC-MSG-TEXT                              
                     MOVE +20 TO WS-MISC-MSG-LEN                        
                     MOVE 16 TO RETURN-CODE                             
                     PERFORM 9910-MISC-ERROR THRU 9910-EXIT             
                  END-IF                                                
               WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)           
                           = WS-PYMT-PRIORITY-HOLD                      
GAC123            MOVE WS-UPDATE TO                                     
GAC123                 WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)        
               WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO           
                  IF WS-THERE-IS-AN-LPC-AC                              
                     MOVE 'AR CONTROL RETRIEVAL ERROR'                  
                       TO WS-MISC-MSG-TEXT                              
                     MOVE +26 TO WS-MISC-MSG-LEN                        
                     MOVE 16 TO RETURN-CODE                             
                     PERFORM 9910-MISC-ERROR THRU 9910-EXIT             
                  ELSE                                                  
                     SET WS-LPC-AC-WAS-CREATED TO TRUE                  
                     MOVE WS-ACCOUNT-NO-AT                              
                       TO WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)            
                     MOVE WS-PYMT-PRIORITY-HOLD                         
                       TO WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)     
                     MOVE ZERO TO WS-ITEM-ID-AC (WS-AR-DATA-INDX)       
TP9134               MOVE WS-INSERT                                     
TP9134                 TO WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)     
                  END-IF                                                
           END-SEARCH                                                   
                                                                        
           IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 30            
              COMPUTE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)  ROUNDED    
                = (WS-LPC-UTIL-ELIG-BFR-BILL-CALC                       
                    * WS-UTIL-LPC-RATE)                                 
T13862              + WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
                                                                        
ACT102***--- WS-AMT-LPC-MIN-BALANCE IS MIN BALANCE TO CALCULATE LPC     59710000
ACT102        IF WS-LPC-UTIL-ELIG-BFR-BILL-CALC                         
ACT102            >= WS-AMT-LPC-MIN-BALANCE                             
C30137          COMPUTE WS-ARREARS-AMT-SEB-LPC                          
C30137              ROUNDED = WS-LPC-UTIL-ELIG-BFR-BILL-CALC            
C30137                          * WS-UTIL-LPC-RATE                      
ACT102        ELSE                                                      
ACT102          MOVE 0 TO WS-ARREARS-AMT-SEB-LPC                        
ACT102        END-IF                                                    
                                                                        
T13862        COMPUTE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)        
T13862          ROUNDED = WS-LPC-UTIL-ELIG-BFR-BILL-CALC                
T13862              * WS-UTIL-LPC-RATE                                  
                                                                        
T13862        ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)            
T13862          TO WS-NEW-REVENUE-ACCUM                                 
                                                                        
T23513        IF SEB-DATABASE                                           
ACT102           IF WS-ARREARS-AMT-SEB-LPC = 0                          
KDFKDF             MOVE 0 TO                                            
KDFKDF                     WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)   
KDFKDF                     WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)        
A00869             ADD WS-TOT-SUMM-UNBILLED-LPC TO                      
A00869                     WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)        
KDFKDF           END-IF                                                 
ACT102           IF WS-ARREARS-AMT-SEB-LPC > 0 AND                      
T22749                WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) <      
T22749                WS-AMT-LPC-MIN-CHG                                
T22749              MOVE WS-AMT-LPC-MIN-CHG TO                          
T22749                   WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)     
T22749                   WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)          
A00869              ADD WS-TOT-SUMM-UNBILLED-LPC TO                     
A00869                     WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)        
T22749            END-IF                                                
T22749        END-IF                                                    
           ELSE                                                         
              COMPUTE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)  ROUNDED    
                = (WS-LPC-NONUT-ELG-BFR-BILL-CALC                       
                    * WS-NONUTIL-LPC-RATE)                              
T13862              + WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
T13862        COMPUTE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)        
T13862          ROUNDED = WS-LPC-NONUT-ELG-BFR-BILL-CALC                
T13862              * WS-NONUTIL-LPC-RATE                               
T13862        ADD WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)            
T13862          TO WS-NEW-REVENUE-ACCUM                                 
           END-IF                                                       
                                                                        
T15231*    IF THE LPC CALCULATED IS ZERO (BECAUSE ARREARS AMT IS SMALL) 60170000
T15231*    DON'T JOURNAL OR WRITE TO TRANS HISTORY                      60180000
T15231     IF WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX) > 0            
T13862        SET LPC-JOURNAL TO TRUE                                   
              PERFORM 5200-CREATE-101-JRNL-FROM-AC  THRU 5200-EXIT      
T15231     END-IF.                                                      
T13862     SET NO-LPC-JOURNAL TO TRUE                                   
KDFKDF                                                                  
           IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 30            
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
               TO WS-LPC-UTIL-ELIG-AFT-BILL-CALC                        
                  LS-CURR-UTL-CHARGES                                   
              MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
                TO WS-LPC-UTIL-ASSESSED-CALC                            
T13990        SUBTRACT WS-TOT-SUMM-UNBILLED-LPC                         
T13990          FROM WS-LPC-UTIL-ELIG-AFT-BILL-CALC                     
T13990               LS-CURR-UTL-CHARGES                                
           ELSE                                                         
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
               TO WS-LPC-NONUT-ELG-AFT-BILL-CALC                        
                  LS-CURR-NONUTL-CHARGES                                
              MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
                TO WS-LPC-NONUT-ASSESSED-CALC                           
T13990        SUBTRACT WS-TOT-SUMM-UNBILLED-LPN                         
T13990          FROM WS-LPC-NONUT-ELG-AFT-BILL-CALC                     
T13990               LS-CURR-NONUTL-CHARGES                             
           END-IF.                                                      
                                                                        
       3010-EXIT.                                                       
           EXIT.                                                        
      /                                                                 60470000
       3030-PROJECT-LPC.                                                
           IF WS-LPC-UTIL-ELIG-AFT-BILL-CALC > ZERO                     
                 AND WS-UT-TABLE-COUNT-CALC > ZERO                      
                 AND WS-CODE-ACCT-STAT-AT = WS-ACTIVE                   
                 AND WS-CODE-LPC-XMT-AT NOT = 'A'                       
              COMPUTE WS-PROJECT-LPC-AMT-CALC ROUNDED                   
                 = (WS-LPC-UTIL-ELIG-AFT-BILL-CALC                      
                       * WS-UTIL-LPC-RATE)                              
           END-IF.                                                      
                                                                        
           IF WS-LPC-NONUT-ELG-AFT-BILL-CALC > ZERO                     
                 AND WS-CODE-ACCT-STAT-AT = WS-ACTIVE                   
                 AND WS-CODE-LPC-XMT-AT NOT = 'B'                       
              COMPUTE WS-PROJECT-LPC-AMT-CALC ROUNDED                   
                 = WS-PROJECT-LPC-AMT-CALC                              
                   + (WS-LPC-NONUT-ELG-AFT-BILL-CALC                    
                       * WS-NONUTIL-LPC-RATE)                           
           END-IF.                                                      
                                                                        
       3030-EXIT.                                                       
           EXIT.                                                        
      *                                                                 60690000
                                                                        
      /                                                                 60710000
       4000-UPDATE-BILL-CALC-TOTALS.                                    
           SET WS-LO-REV-INDX TO 1                                      
           SEARCH WS-LOC-OFFICE-REVENUE-RECORD                          
              AT END                                                    
                 MOVE 'LOC OFFICE REVENUE OVERFLOW'                     
                    TO WS-MISC-MSG-TEXT                                 
                  MOVE WS-LOCAL-OFFICE-AT                               
                    TO WS-MISC-MSG-TEXT (33:2)                          
                  MOVE +29 TO WS-MISC-MSG-LEN                           
                  MOVE 16 TO RETURN-CODE                                
                  PERFORM 9910-MISC-ERROR THRU 9910-EXIT                
              WHEN WS-LO-OFFICE-NO (WS-LO-REV-INDX)                     
                     = WS-LOCAL-OFFICE-AT                               
                   AND WS-LO-COMPANY-NO (WS-LO-REV-INDX)                
                     = WS-COMPANY-NO-AT                                 
                  ADD WS-NEW-REVENUE-ACCUM                              
                    TO WS-LO-TOT-NEW-REVENUE (WS-LO-REV-INDX)           
              WHEN WS-LO-COMPANY-NO (WS-LO-REV-INDX) = SPACE            
                   AND WS-LO-OFFICE-NO (WS-LO-REV-INDX) = ZERO          
                 MOVE WS-LOCAL-OFFICE-AT                                
                    TO WS-LO-OFFICE-NO  (WS-LO-REV-INDX)                
                 MOVE WS-COMPANY-NO-AT                                  
                    TO WS-LO-COMPANY-NO (WS-LO-REV-INDX)                
                 MOVE WS-NEW-REVENUE-ACCUM                              
                    TO WS-LO-TOT-NEW-REVENUE (WS-LO-REV-INDX)           
           END-SEARCH.                                                  
       4000-EXIT.                                                       
           EXIT.                                                        
                                                                        
T5679 **************** LPC CANCEL/REBILL ROUTINES *************         61010000
                                                                        
T5679  4500-COMPUTE-ORIG-LPC.                                           
T14478     MOVE WS-ACCOUNT-NO-BG (1) TO AR-ACCOUNT-NO.                  
T14478     INITIALIZE WS-AMT-POSTED-TOTAL.                              
T16366     MOVE 'N' TO WS-AR-TRN-CSR-OPN-SW.                            
T14478     MOVE WS-RE-DATE-BILLED (WS-RE-INDX) TO AR-DATE-TRANS.        
T14478     PERFORM 7125-SELECT-AR-TRANS-HIST.                           
T14478     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL                   
T14478        MOVE WS-AR-LPC-GL-NO (WS-GL-SUB) TO AU-GL-ACCT-DEBIT      
T14478        IF WS-RE-CODE-UTIL-TYPE (WS-RE-INDX) = WS-ELEC            
T14478           MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO                  
T14478              AU-GL-ACCT-CREDIT                                   
T5679         ELSE                                                      
T14478           MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO                  
T14478              AU-GL-ACCT-CREDIT                                   
T5679         END-IF                                                    
T14478        MOVE WS-ACCOUNT-NO-BG (1) TO AU-ACCOUNT-NO                
T14478        MOVE AR-TRANS-HIST-SEQ-NO TO AU-TRANS-HIST-SEQ-NO         
T14478        PERFORM 7127-OPEN-AR-TRANS-HST-DET                        
T14478        MOVE 'Y' TO WS-AR-TRN-CSR-OPN-SW                          
T14478        PERFORM UNTIL WS-ACTIVE-RETURN-CODE = NOT-FOUND           
T14478           IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL             
T14478              PERFORM 7128-FETCH-AR-TRANS-HST-DET                 
T14478              PERFORM UNTIL WS-ACTIVE-RETURN-CODE = NOT-FOUND     
T14478              ADD AU-AMT-POSTED TO WS-AMT-POSTED-TOTAL            
T14478                 PERFORM 7128-FETCH-AR-TRANS-HST-DET              
T14478              END-PERFORM                                         
T14478           END-IF                                                 
T14478        END-PERFORM                                               
T14478     END-IF.                                                      
T14478     IF WS-AR-TRN-CSR-OPN                                         
T14478        PERFORM 7129-CLOSE-AR-TRANS-HST-DET THRU 7129-EXIT        
T5679      END-IF.                                                      
                                                                        
T5679  4500-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
T5679  4510-COMPUTE-ADJUST-90.                                          
T14478     COMPUTE WS-LPC-ADJUST-AMT ROUNDED = WS-REBILL-NET *          
T14478                                 WS-UTIL-LPC-RATE.                
C36223     IF SEB-DATABASE AND                                          
C36223        WS-AMT-POSTED-TOTAL = WS-AMT-LPC-MIN-CHG                  
C36223        MOVE +0          TO  WS-LPC-ADJUST-AMT                    
C36223     END-IF.                                                      
T14478     IF (WS-LPC-ADJUST-AMT * -1) >  WS-AMT-POSTED-TOTAL           
T14478        MULTIPLY -1 BY WS-AMT-POSTED-TOTAL                        
T14478            GIVING WS-LPC-ADJUST-AMT                              
T5679      END-IF.                                                      
T14478     SET WS-AR-DATA-INDX TO 1.                                    
T14478     SEARCH WS-AR-DATA                                            
T14478        WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 30       
T14478           ADD WS-LPC-ADJUST-AMT TO                               
T14478               WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)              
T14478           IF ELEC-90-DAY-REBILL                                  
T14478              PERFORM 5400-ORIG-LPC-ELEC-GL   THRU 5400-EXIT      
T14478              IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0    
T14478                 PERFORM 5410-REBILL-LPC-ELEC-GL THRU 5410-EXIT   
T14478              END-IF                                              
T14478           ELSE                                                   
T14478              PERFORM 5420-ORIG-LPC-GAS-GL    THRU 5420-EXIT      
T14478              IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0    
T14478                 PERFORM 5430-REBILL-LPC-GAS-GL  THRU 5430-EXIT   
T14478              END-IF                                              
T14478           END-IF                                                 
T14478           IF WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) < 0           
T14478              MOVE WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)          
T14478                 TO WS-AMT-CIA-FOR-REBILL                         
T18416              MOVE ZERO  TO  WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)
T14478              MOVE 'Y' TO WS-CIA-FOR-REBILL-SW                    
T14478              PERFORM 5030-CREATE-CIA         THRU 5030-EXIT      
T14478              MOVE 'N' TO WS-CIA-FOR-REBILL-SW                    
T14478           END-IF                                                 
T14478        WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO            
T14478              MOVE WS-LPC-ADJUST-AMT TO WS-AMT-CIA-FOR-REBILL     
T14478              IF ELEC-90-DAY-REBILL                               
T14478                 PERFORM 5400-ORIG-LPC-ELEC-GL   THRU 5400-EXIT   
T14478                 IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0 
T14478                    PERFORM 5410-REBILL-LPC-ELEC-GL THRU 5410-EXIT
T14478                 END-IF                                           
T14478              ELSE                                                
T14478                 PERFORM 5420-ORIG-LPC-GAS-GL    THRU 5420-EXIT   
T14478                 IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0 
T14478                    PERFORM 5430-REBILL-LPC-GAS-GL  THRU 5430-EXIT
T14478                 END-IF                                           
T14478              END-IF                                              
T14478              MOVE 'Y' TO WS-CIA-FOR-REBILL-SW                    
T14478              SET WS-AR-DATA-INDX TO WS-AR-HOLD-INDX              
T14478              PERFORM 5030-CREATE-CIA         THRU 5030-EXIT      
T14478              MOVE 'N' TO WS-CIA-FOR-REBILL-SW                    
T14478     END-SEARCH.                                                  
      *                                                                 61930000
T5679  4510-EXIT.                                                       
T5679      EXIT.                                                        
      *                                                                 61960000
T5679  4520-COMPUTE-ADJUST-60.                                          
T14478     COMPUTE WS-LPC-ADJUST-AMT ROUNDED = WS-REBILL-NET *          
T14478                                 WS-UTIL-LPC-RATE.                
C36223     IF SEB-DATABASE AND                                          
C36223        WS-AMT-POSTED-TOTAL = WS-AMT-LPC-MIN-CHG                  
C36223        MOVE +0          TO  WS-LPC-ADJUST-AMT                    
C36223     END-IF.                                                      
T14478     IF (WS-LPC-ADJUST-AMT * -1) >  WS-AMT-POSTED-TOTAL           
T14478        MULTIPLY -1 BY WS-AMT-POSTED-TOTAL                        
T14478            GIVING WS-LPC-ADJUST-AMT                              
T5679      END-IF.                                                      
T14478     SET WS-AR-DATA-INDX TO 1.                                    
T14478     SEARCH WS-AR-DATA                                            
T14478        WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 30       
T14478           ADD WS-LPC-ADJUST-AMT TO                               
T14478               WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)              
T14478           IF ELEC-60-DAY-REBILL                                  
T14478              PERFORM 5400-ORIG-LPC-ELEC-GL   THRU 5400-EXIT      
T14478              IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0    
T14478                 PERFORM 5410-REBILL-LPC-ELEC-GL THRU 5410-EXIT   
T14478              END-IF                                              
T14478           ELSE                                                   
T14478              PERFORM 5420-ORIG-LPC-GAS-GL    THRU 5420-EXIT      
T14478              IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0    
T14478                 PERFORM 5430-REBILL-LPC-GAS-GL  THRU 5430-EXIT   
T14478              END-IF                                              
T14478           END-IF                                                 
T14478           IF WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) < 0           
T14478              MOVE WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)          
T14478                 TO WS-AMT-CIA-FOR-REBILL                         
T18416              MOVE ZERO  TO  WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)
T14478              MOVE 'Y' TO WS-CIA-FOR-REBILL-SW                    
T14478              PERFORM 5030-CREATE-CIA         THRU 5030-EXIT      
T14478              MOVE 'N' TO WS-CIA-FOR-REBILL-SW                    
T14478           END-IF                                                 
T14478        WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO            
T14478              MOVE WS-LPC-ADJUST-AMT TO WS-AMT-CIA-FOR-REBILL     
T14478              IF ELEC-60-DAY-REBILL                               
T14478                 PERFORM 5400-ORIG-LPC-ELEC-GL   THRU 5400-EXIT   
T14478                 IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0 
T14478                    PERFORM 5410-REBILL-LPC-ELEC-GL THRU 5410-EXIT
T14478                 END-IF                                           
T14478              ELSE                                                
T14478                 PERFORM 5420-ORIG-LPC-GAS-GL    THRU 5420-EXIT   
T14478                 IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0 
T14478                    PERFORM 5430-REBILL-LPC-GAS-GL  THRU 5430-EXIT
T14478                 END-IF                                           
T14478              END-IF                                              
T14478              MOVE 'Y' TO WS-CIA-FOR-REBILL-SW                    
T14478              SET WS-AR-DATA-INDX TO WS-AR-HOLD-INDX              
T14478              PERFORM 5030-CREATE-CIA         THRU 5030-EXIT      
T14478              MOVE 'N' TO WS-CIA-FOR-REBILL-SW                    
T14478     END-SEARCH.                                                  
      *                                                                 62510000
T5679  4520-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
T5679  4530-COMPUTE-ADJUST-30.                                          
T14478     COMPUTE WS-LPC-ADJUST-AMT ROUNDED = WS-REBILL-NET *          
T14478                                 WS-UTIL-LPC-RATE.                
C36223     IF SEB-DATABASE AND                                          
C36223        WS-AMT-POSTED-TOTAL = WS-AMT-LPC-MIN-CHG                  
C36223        MOVE +0          TO  WS-LPC-ADJUST-AMT                    
C36223     END-IF.                                                      
T14478     IF (WS-LPC-ADJUST-AMT * -1) >  WS-AMT-POSTED-TOTAL           
T14478        MULTIPLY -1 BY WS-AMT-POSTED-TOTAL                        
T14478            GIVING WS-LPC-ADJUST-AMT                              
T5679      END-IF.                                                      
T14478     SET WS-AR-DATA-INDX TO 1.                                    
T14478     SEARCH WS-AR-DATA                                            
T14478        WHEN WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 30       
T14478           ADD WS-LPC-ADJUST-AMT TO                               
T14478               WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)              
T14478           IF ELEC-30-DAY-REBILL                                  
T14478              PERFORM 5400-ORIG-LPC-ELEC-GL   THRU 5400-EXIT      
T14478              IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0    
T14478                 PERFORM 5410-REBILL-LPC-ELEC-GL THRU 5410-EXIT   
T14478              END-IF                                              
T14478           ELSE                                                   
T14478              PERFORM 5420-ORIG-LPC-GAS-GL    THRU 5420-EXIT      
T14478              IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0    
T14478                 PERFORM 5430-REBILL-LPC-GAS-GL  THRU 5430-EXIT   
T14478              END-IF                                              
T14478           END-IF                                                 
T14478           IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) < 0           
T14478              MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)          
T14478                 TO WS-AMT-CIA-FOR-REBILL                         
T18416              MOVE 0  TO  WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)   
T14478              MOVE 'Y' TO WS-CIA-FOR-REBILL-SW                    
T14478              PERFORM 5030-CREATE-CIA         THRU 5030-EXIT      
T14478              MOVE 'N' TO WS-CIA-FOR-REBILL-SW                    
T14478           END-IF                                                 
T14478        WHEN WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO            
T14478              MOVE WS-LPC-ADJUST-AMT TO WS-AMT-CIA-FOR-REBILL     
T14478              IF ELEC-30-DAY-REBILL                               
T14478                 PERFORM 5400-ORIG-LPC-ELEC-GL   THRU 5400-EXIT   
T14478                 IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0 
T14478                    PERFORM 5410-REBILL-LPC-ELEC-GL THRU 5410-EXIT
T14478                 END-IF                                           
T14478              ELSE                                                
T14478                 PERFORM 5420-ORIG-LPC-GAS-GL    THRU 5420-EXIT   
T14478                 IF (WS-LPC-ADJUST-AMT + WS-AMT-POSTED-TOTAL) > 0 
T14478                    PERFORM 5430-REBILL-LPC-GAS-GL  THRU 5430-EXIT
T14478                 END-IF                                           
T14478              END-IF                                              
T14478              MOVE 'Y' TO WS-CIA-FOR-REBILL-SW                    
T14478              SET WS-AR-DATA-INDX TO WS-AR-HOLD-INDX              
T14478              PERFORM 5030-CREATE-CIA         THRU 5030-EXIT      
T14478              MOVE 'N' TO WS-CIA-FOR-REBILL-SW                    
T14478     END-SEARCH.                                                  
                                                                        
T5679  4530-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
      *                                                                 63130000
      *                                                                 63140000
      /*************** UTILITY ROUTINES ***********************         63150000
       5002-COMPUTE-UNBILLED.                                           
           COMPUTE LS-UNBILLED-RECEIVABLES                              
              = LS-UNBILLED-RECEIVABLES                                 
                 + WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)             
                 - (WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)               
                    + WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)             
                    + WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)             
                    + WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)).           
                                                                        
       5002-EXIT.                                                       
           EXIT.                                                        
      *                                                                 63270000
       5003-COMPUTE-UTL-DELINQ.                                         
           MOVE ZERO TO WS-ARR-ACCUM                                    
                        WS-CUR-ACCUM                                    
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
                  WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)                 
                  WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)                 
                  WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)                 
                  WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)                 
                TO WS-LPC-UTIL-ELIG-AFT-BILL-CALC                       
              EVALUATE TRUE                                             
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-85-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-UTILITY-ARREARS                             
                         LS-DAY-90-UTL-RELATED-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-55-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-UTILITY-ARREARS                             
                         LS-DAY-60-UTL-RELATED-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-UTILITY-ARREARS                             
                         LS-DAY-30-UTL-RELATED-DELINQ                   
                         WS-ARR-ACCUM                                   
T26954           WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-20-DAYS-AGO      
T26954                AND WS-REGULATED-CD-AT = '02'                     
T26954              ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
T26954                TO LS-UTILITY-ARREARS                             
T26954                   LS-DAY-30-UTL-RELATED-DELINQ                   
T26954                   WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-UTL-CHARGES                            
                         LS-DAY-00-UTL-RELATED-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              EVALUATE TRUE                                             
                 WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-55-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-UTILITY-ARREARS                             
                         LS-DAY-60-UTL-RELATED-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-UTILITY-ARREARS                             
                         LS-DAY-30-UTL-RELATED-DELINQ                   
                         WS-ARR-ACCUM                                   
T26954           WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-20-DAYS-AGO      
T26954                AND WS-REGULATED-CD-AT = '02'                     
T26954              ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
T26954                TO LS-UTILITY-ARREARS                             
T26954                   LS-DAY-30-UTL-RELATED-DELINQ                   
T26954                   WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-UTL-CHARGES                            
                         LS-DAY-00-UTL-RELATED-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              EVALUATE TRUE                                             
C36418           WHEN (CSR-DATABASE AND WS-CREDIT-GROUP-AT = 'B')       
C36418              ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
C36418                TO LS-UTILITY-ARREARS                             
C36418                   LS-DAY-30-UTL-RELATED-DELINQ                   
C36418                   WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-30-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO LS-UTILITY-ARREARS                             
                         LS-DAY-30-UTL-RELATED-DELINQ                   
                         WS-ARR-ACCUM                                   
T26954           WHEN WS-DATE-BILL-DAY-30-AT < LS-DATE-20-DAYS-AGO      
T26954                AND WS-REGULATED-CD-AT = '02'                     
T26954              ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
T26954                TO LS-UTILITY-ARREARS                             
T26954                   LS-DAY-30-UTL-RELATED-DELINQ                   
T26954                   WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-UTL-CHARGES                            
                         LS-DAY-00-UTL-RELATED-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
                  WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)                 
                TO LS-CURR-UTL-CHARGES                                  
                   LS-DAY-00-UTL-RELATED-DELINQ                         
                   WS-CUR-ACCUM                                         
                                                                        
           IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 50            
              IF WS-DATE-BILL-DAY-90-AT < LS-DATE-25-DAYS-AGO           
                 ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)              
                   TO LS-BUDGET-AMOUNT-DELINQ                           
              END-IF                                                    
              IF WS-DATE-BILL-DAY-60-AT < LS-DATE-25-DAYS-AGO           
                 ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)              
                   TO LS-BUDGET-AMOUNT-DELINQ                           
              END-IF                                                    
              IF WS-DATE-BILL-DAY-30-AT < LS-DATE-25-DAYS-AGO           
                 ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)              
                   TO LS-BUDGET-AMOUNT-DELINQ                           
              END-IF                                                    
           END-IF.                                                      
      *                                                                 64350000
       5003-EXIT.                                                       
           EXIT.                                                        
      *                                                                 64450000
       5004-COMPUTE-NON-UTL-DELINQ.                                     
T10503     MOVE ZERO TO WS-ARR-ACCUM                                    
T10503                  WS-CUR-ACCUM                                    
           ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                    
               WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)                    
               WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)                    
               WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)                    
               WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)                    
             TO WS-LPC-NONUT-ELG-AFT-BILL-CALC.                         
           IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 100           
              EVALUATE TRUE                                             
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-85-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-CONTRACT-ARREARS                            
T12034                   LS-DAY-90-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-55-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-CONTRACT-ARREARS                            
T12034                   LS-DAY-60-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-CONTRACT-ARREARS                            
T12034                   LS-DAY-30-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-CNT-CHARGES                            
T12034                   LS-DAY-00-NON-UTL-REL-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              EVALUATE TRUE                                             
                 WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-55-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-CONTRACT-ARREARS                            
T12034                   LS-DAY-60-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-CONTRACT-ARREARS                            
T12034                   LS-DAY-30-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-CNT-CHARGES                            
T12034                   LS-DAY-00-NON-UTL-REL-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              EVALUATE TRUE                                             
C36418           WHEN (CSR-DATABASE AND WS-CREDIT-GROUP-AT = 'B')       
C36418              ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
C36418                TO LS-CONTRACT-ARREARS                            
C36418                   LS-DAY-30-NON-UTL-REL-DELINQ                   
C36418                   WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-30-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO LS-CONTRACT-ARREARS                            
T12034                   LS-DAY-30-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-CNT-CHARGES                            
T12034                   LS-DAY-00-NON-UTL-REL-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
                  WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)                 
                TO LS-CURR-CNT-CHARGES                                  
T12034             LS-DAY-00-NON-UTL-REL-DELINQ                         
                   WS-CUR-ACCUM                                         
           ELSE                                                         
              EVALUATE TRUE                                             
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-85-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-NONUTIL-ARREARS                             
                         LS-DAY-90-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-55-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-NONUTIL-ARREARS                             
                         LS-DAY-60-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-NONUTIL-ARREARS                             
                         LS-DAY-30-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
T26954           WHEN WS-DATE-BILL-DAY-90-AT < LS-DATE-20-DAYS-AGO      
T26954                AND WS-REGULATED-CD-AT = '02'                     
T26954              ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
T26954                TO LS-NONUTIL-ARREARS                             
T26954                   LS-DAY-30-NON-UTL-REL-DELINQ                   
T26954                   WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-NONUTL-CHARGES                         
                         LS-DAY-00-NON-UTL-REL-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              EVALUATE TRUE                                             
                 WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-55-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-NONUTIL-ARREARS                             
                         LS-DAY-60-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
                 WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-NONUTIL-ARREARS                             
                         LS-DAY-30-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
T26954           WHEN WS-DATE-BILL-DAY-60-AT < LS-DATE-20-DAYS-AGO      
T26954                AND WS-REGULATED-CD-AT = '02'                     
T26954              ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
T26954                TO LS-NONUTIL-ARREARS                             
T26954                   LS-DAY-30-NON-UTL-REL-DELINQ                   
T26954                   WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-NONUTL-CHARGES                         
                         LS-DAY-00-NON-UTL-REL-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              EVALUATE TRUE                                             
                 WHEN WS-DATE-BILL-DAY-30-AT < LS-DATE-25-DAYS-AGO      
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO LS-NONUTIL-ARREARS                             
                         LS-DAY-30-NON-UTL-REL-DELINQ                   
                         WS-ARR-ACCUM                                   
T26954           WHEN WS-DATE-BILL-DAY-30-AT < LS-DATE-20-DAYS-AGO      
T26954                AND WS-REGULATED-CD-AT = '02'                     
T26954              ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
T26954                TO LS-NONUTIL-ARREARS                             
T26954                   LS-DAY-30-NON-UTL-REL-DELINQ                   
T26954                   WS-ARR-ACCUM                                   
                 WHEN OTHER                                             
                    ADD WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)           
                      TO LS-CURR-NONUTL-CHARGES                         
                         LS-DAY-00-NON-UTL-REL-DELINQ                   
                         WS-CUR-ACCUM                                   
              END-EVALUATE                                              
                                                                        
              ADD WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                 
                  WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)                 
                TO LS-CURR-NONUTL-CHARGES                               
                   LS-DAY-00-NON-UTL-REL-DELINQ                         
                   WS-CUR-ACCUM                                         
           END-IF                                                       
           .                                                            
       5004-EXIT.                                                       
           EXIT.                                                        
      *                                                                 66180000
       5005-APPLY-UNUSED-CREDIT.                                        
           MOVE 'Y' TO WS-UNUSED-CR-FL                                  
                                                                        
      ** APPLY UNUSED CREDIT TO 90 DAY                                  66220000
           IF WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX) > ZERO              
                 AND WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO       
              COMPUTE WS-NET-CURRENT-AMT                                
                 = WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)                
                    + WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
              IF WS-NET-CURRENT-AMT < ZERO                              
      ** UNUSED CREDIT EXCEEDS CHARGE                                   66290000
                 MOVE WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                 MOVE ZERO TO WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)     
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED       
              ELSE                                                      
      ** CHARGE EXCEEDS (OR EQUALS) UNUSED CREDIT                       66370000
                 MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE ZERO TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)     
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)             
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED * -1  
              END-IF                                                    
                                                                        
              MOVE WS-P TO WS-101-AR-AGE                                
              PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT       
           END-IF                                                       
                                                                        
      ** APPLY UNUSED CREDIT TO 60 DAY                                  66500000
           IF WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) > ZERO              
                 AND WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO       
              COMPUTE WS-NET-CURRENT-AMT                                
                 = WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)                
                    + WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
              IF WS-NET-CURRENT-AMT < ZERO                              
      ** UNUSED CREDIT EXCEEDS CHARGE                                   66570000
                 MOVE WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                 MOVE ZERO TO WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)     
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED       
              ELSE                                                      
      ** CHARGE EXCEEDS (OR EQUALS) UNUSED CREDIT                       66650000
                 MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE ZERO TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)     
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)             
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED * -1  
              END-IF                                                    
                                                                        
              MOVE WS-P TO WS-101-AR-AGE                                
              PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT       
           END-IF                                                       
                                                                        
      ** APPLY UNUSED CREDIT TO 30 DAY                                  66780000
           IF WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) > ZERO              
                 AND WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO       
              COMPUTE WS-NET-CURRENT-AMT                                
                 = WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)                
                    + WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
              IF WS-NET-CURRENT-AMT < ZERO                              
      ** UNUSED CREDIT EXCEEDS CHARGE                                   66850000
                 MOVE WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                 MOVE ZERO TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)     
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED       
              ELSE                                                      
      ** CHARGE EXCEEDS (OR EQUALS) UNUSED CREDIT                       66930000
                 MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE ZERO TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)     
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)             
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED * -1  
              END-IF                                                    
                                                                        
              MOVE WS-P TO WS-101-AR-AGE                                
              PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT       
           END-IF                                                       
                                                                        
      ** APPLY UNUSED CREDIT TO CURRENT                                 67060000
           IF WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) > ZERO              
                 AND WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO       
              COMPUTE WS-NET-CURRENT-AMT                                
                 = WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)                
                    + WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
              IF WS-NET-CURRENT-AMT < ZERO                              
      ** UNUSED CREDIT EXCEEDS CHARGE                                   67130000
                 MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                 MOVE ZERO TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)     
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED       
              ELSE                                                      
      ** CHARGE EXCEEDS (OR EQUALS) UNUSED CREDIT                       67210000
                 MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
                   TO WS-UNUSED-CR-APPLIED                              
                 MOVE ZERO TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)     
                 MOVE WS-NET-CURRENT-AMT                                
                   TO WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
                 COMPUTE WS-101-AMT-POSTED = WS-UNUSED-CR-APPLIED * -1  
              END-IF                                                    
                                                                        
              MOVE WS-P TO WS-101-AR-AGE                                
              PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT       
           END-IF                                                       
                                                                        
KMG        MOVE 'N' TO WS-UNUSED-CR-FL                                  
                                                                        
T12012*    IF THIS IS AN ANNUAL MINIMUM ACCT AND PPL IS 40/45           67360000
T12012*    AND UNUSED CR IS STILL < 0                                   67370000
T12012     IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 40 OR 45      
T12012           AND WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX) < ZERO       
T12845           AND WS-MST-SUB-ACCT-IND-AT NOT = WS-SUB                
T12900        SET WS-BILL-ADJ-INDX TO 1                                 
T12900        SEARCH WS-BILL-ADJ-DATA                                   
T12900           AT END CONTINUE                                        
T12900           WHEN WS-ACCOUNT-NO-BA (WS-BILL-ADJ-INDX) = 0           
T12900              CONTINUE                                            
T12900           WHEN WS-ACCOUNT-NO-BA (WS-BILL-ADJ-INDX) =             
T12900                WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)                
T12900             AND WS-CODE-UTIL-TYPE-BA (WS-BILL-ADJ-INDX) = 'E'    
T12900             AND WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 40   
T12900             AND (WS-FACTOR-ID-BA (WS-BILL-ADJ-INDX) =            
T12900                    'SPANMINCR' OR 'SPANMINDR')                   
T12012               PERFORM 5030-CREATE-CIA    THRU  5030-EXIT         
T12900           WHEN WS-ACCOUNT-NO-BA (WS-BILL-ADJ-INDX) =             
T12900                WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)                
T12900             AND WS-CODE-UTIL-TYPE-BA (WS-BILL-ADJ-INDX) = 'G'    
T12900             AND WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 45   
T12900             AND (WS-FACTOR-ID-BA (WS-BILL-ADJ-INDX) =            
T12900                    'SPANMINCR' OR 'SPANMINDR')                   
T12012               PERFORM 5030-CREATE-CIA    THRU  5030-EXIT         
T12900        END-SEARCH                                                
T12012     END-IF.                                                      
       5005-EXIT.                                                       
           EXIT.                                                        
ACT059*                                                                 82640000
ACT059******************************************************************82640000
ACT059**  5006-SET-MNT-HISTORY                                         *82650000
ACT059******************************************************************82640000
ACT059*                                                                 82640000
ACT059 5006-SET-MNT-HISTORY.                                            
ACT059*                                                                 04928000
ACT059     EXEC SQL                                                     
ACT059          SELECT
              REPLACE(REPLACE(CONVERT(CHAR(26), CIS.CURRENT$TIMESTAMP()
           , 121), ' ', '-'), ':', '.')
            INTO
              :MH-TRANS-HIST-SEQ-NO           
ACT059     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ006
MFA-TR* MSQ028
MFA-TR* MSQ061
MFA-TR*    EXEC SQL                                                     04930000
MFA-TR*         SET :MH-TRANS-HIST-SEQ-NO = CURRENT TIMESTAMP           04931000
MFA-TR*    END-EXEC.                                                    04930000

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

ACT059*                                                                 04930000
ACT059     MOVE MH-TRANS-HIST-SEQ-NO TO MI-TRANS-HIST-SEQ-NO.           
ACT059     MOVE LS-INPUT-DATE        TO MH-DATE-TRANS.                  
ACT059     MOVE 'F'                  TO MH-CODE-TRAN-TYPE.              
ACT059     MOVE SPACES               TO MH-RESP-AREA-ID.                
ACT059     MOVE WS-ACCOUNT-NO-AT     TO MH-ACCOUNT-NO.                  
ACT059     MOVE ZERO                 TO MH-CUSTOMER-NO                  
ACT059                                  MH-PREMISE-NO.                  
ACT059     MOVE 'SYSTEM'             TO MH-USER-ID.                     
ACT059     MOVE 'SCSCA108A'          TO MH-APPL-PROGRAM-ID.             
ACT059*                                                                 04941000
ACT059 5006-EXIT.                                                       
ACT059     EXIT.                                                        
ACT059*                                                                 04941000
      /                                                                 67640000
       5010-DETERMINE-MONTHS-BILLED.                                    
           MOVE '5010' TO ACTIVE-PARAGRAPH.                             
                                                                        
T23418     COMPUTE WS-MONTHS-REMAINING-COUNTER ROUNDED =                
              WS-MAXIMUM-AMOUNT-TO-BILL / WS-MO-PYMT .                  
                                                                        
T31692***  4/10/06 CHANGES TO COVER TRANSFERS ****                      67710000
T31692     IF WS-MONTHS-REMAINING-COUNTER = 0                           
T31692        MOVE WS-SCHED-PYMTS TO WS-MONTHS-BILLED-COUNTER           
T31692     ELSE                                                         
             COMPUTE WS-MONTHS-BILLED-COUNTER ROUNDED =                 
T10211          WS-SCHED-PYMTS - WS-MONTHS-REMAINING-COUNTER + 1        
T31692     END-IF.                                                      
      *                                                                 67780000
       5010-EXIT.                                                       
           EXIT.                                                        
      *                                                                 67810000
      /***************************************************************  67820000
      * CREATE THE INTERNAL CIA AR_CNTL ROW.                            67830000
      ****************************************************************  67840000
T12012 5030-CREATE-CIA.                                                 
T12012*    MOVE UNUSED-CR FROM THE UTE/UTG ROW TO THE NEW CIA ROW       67860000
T12012     MOVE WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)                   
T12012       TO WS-AMT-UNUSED-CR-HOLD-AC.                               
T12012     MOVE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)               
T12012       TO WS-PYMT-PRIORITY-HOLD.                                  
T12012     MOVE WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)                      
T12012             TO WS-ACCOUNT-NO-HOLD-AC.                            
                                                                        
T12012*    SEARCH FOR THE NEXT AVAILABLE AR ROW                         67940000
T12012     SET WS-AR-HOLD-INDX TO WS-AR-DATA-INDX.                      
T12012     SET WS-AR-DATA-INDX TO 1.                                    
T12012     SEARCH WS-AR-DATA                                            
T12012        AT END                                                    
T18829           MOVE 'MISSING AR DATA            '                     
T18829              TO WS-MISC-MSG-TEXT                                 
T18829            MOVE WS-LOCAL-OFFICE-AT                               
T18829              TO WS-MISC-MSG-TEXT (33:2)                          
T18829            MOVE +29 TO WS-MISC-MSG-LEN                           
T18829           MOVE 12 TO RETURN-CODE                                 
T12012        WHEN (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 70      
T12012               AND WS-ITEM-ID-AC (WS-AR-DATA-INDX) = 1)           
T12012          OR WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX) = ZERO            
T12012           CONTINUE                                               
T12012     END-SEARCH.                                                  
                                                                        
T12012*    MOVE THE VALUES TO THE NEW AR-CNTL CIA ROW                   68110000
T12012     MOVE WS-ACCOUNT-NO-HOLD-AC                                   
T12012             TO WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX).               
T12012     MOVE +70 TO WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX).       
T12012     MOVE +1  TO WS-ITEM-ID-AC (WS-AR-DATA-INDX).                 
T12012     MOVE ZERO TO                                                 
T12012                WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)        
T12012                WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)             
T12012                WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX)             
T12012                WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX)             
T12012                WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX)             
T12012                WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)         
T12012                WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX).         
T14478     IF WS-CIA-FOR-REBILL                                         
T14478        ADD WS-AMT-CIA-FOR-REBILL                                 
T14478             TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
T14478        MOVE WS-AMT-CIA-FOR-REBILL                                
T14478             TO WS-AMT-UNUSED-CR-HOLD-AC                          
T14478        MOVE WS-ACCOUNT-NO-BG (1) TO                              
T14478             WS-ACCOUNT-NO-AC (WS-AR-DATA-INDX)                   
T14478     ELSE                                                         
T12012        ADD  WS-AMT-UNUSED-CR-HOLD-AC                             
T12012             TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)             
T14478     END-IF.                                                      
T12012     IF (WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX) = ' ' OR       
T12012         WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX) = 'I')         
A00312        MOVE WS-CODES-DATA-PRESENT-AT TO WS-CODES-DATA-PRESENT    
A00312        MOVE 'A'                      TO WS-CODE-CIA              
A00312        MOVE WS-CODES-DATA-PRESENT    TO WS-CODES-DATA-PRESENT-AT 
T12012        MOVE 'I' TO WS-UPDATE-ACTION-IND-AC (WS-AR-DATA-INDX)     
T12012     END-IF.                                                      
T12012     SET CREATE-CIA-FROM-UNUSED TO TRUE.                          
T12012     PERFORM 5200-CREATE-101-JRNL-FROM-AC THRU 5200-EXIT.         
                                                                        
T12012*    SET THE AR-INDX BACK TO THE ORIGINAL ROW                     68460000
T12012     SET WS-AR-DATA-INDX TO WS-AR-HOLD-INDX.                      
T12845*    SET THE UNUSED CREDIT THAT WAS TURNED INTO CIA TO 0          68480000
T14478     IF NOT WS-CIA-FOR-REBILL                                     
T12845        MOVE 0 TO WS-AMT-UNUSED-CR-AC (WS-AR-DATA-INDX)           
T14478     END-IF.                                                      
T12012     SET NOT-CREATE-CIA TO TRUE.                                  
T12012 5030-EXIT.                                                       
T12012     EXIT.                                                        
      /                                                                 68550000
       5100-PROCESS-EXCEPTION.                                          
           MOVE WS-YES TO WS-WARNING-BILL-IND-BI                        
A02036     IF WS-UPDATE-ACTION-IND-BI = 'I'                             
A02036         CONTINUE                                                 
A02036     ELSE                                                         
               MOVE WS-UPDATE TO WS-UPDATE-ACTION-IND-BI                
A02036     END-IF                                                       
                                                                        
I01687     MOVE WS-PGRMNAME                                             
I01687       TO WS-CREATED-BY-WF (WS-BILL-WQ-INDX)                      
           MOVE WS-BILL-NO-BG (WS-BILLING-INDX) TO WS-BILL-NO-WQ        
           MOVE WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX)                  
             TO  WS-CODE-UTIL-TYPE-WQ                                   
           MOVE WS-IC-NO-BG (WS-BILLING-INDX)  TO  WS-IC-NO-WQ          
           MOVE WS-RATE-PLAN-NO-BG (WS-BILLING-INDX)                    
             TO  WS-RATE-PLAN-NO-WQ                                     
           COMPUTE WS-START-POS                                         
             = WS-COMMENTS-LEN-WF (WS-BILL-WQ-INDX) + 1                 
           MOVE WS-SUPPLEMENTAL-TXT-WQ                                  
             TO WS-COMMENTS-TEXT-WF (WS-BILL-WQ-INDX) (WS-START-POS:)   
           ADD WS-SUPPLEMENTAL-TXT-LEN-WQ                               
             TO WS-COMMENTS-LEN-WF (WS-BILL-WQ-INDX).                   
      *                                                                 68720000
       5100-EXIT.                                                       
           EXIT.                                                        
      /*****************************************************************68770000
      *                                                                *68780000
      *     5200-CREATE-101-JRNL-FROM-AC.                              *68790000
      *                                                                *68800000
      ******************************************************************68810000
       5200-CREATE-101-JRNL-FROM-AC.                                    
      *                                                                 68830000
PCR212     PERFORM 5205-CREATE-101-COMMON-DATA  THRU 5205-EXIT          
                                                                        
PCR212     EVALUATE TRUE                                                
PCR212       WHEN PJS                                                   
PCR212       WHEN LPN                                                   
PCR212       WHEN CNT AND WS-CODE-BILL-TYPE-CT(WS-CNT-INDX) =           
PCR212                            WS-MONTHLY-AMOUNT-CNTRACT             
PCR212         PERFORM 5210-PROCESS-GL-RCV-FIELDS THRU 5210-EXIT        
                                                                        
PCR212       WHEN LPC                                                   
PCR212*      FOR ACCOUNTS WITH BOTH ELEC AND GAS SERVICES, DETERMINE  * 68940000
PCR212*      THE AMOUNT OF LPC TO POST TO THE GEN LED FOR ELEC LPC    * 68950000
PCR212*      AND POST THE REMAINING LPC AMOUNT TO THE GEN LED FOR GAS * 68960000
PCR212*      LPC.  WRITE A GEN LED RECORD FOR BOTH SERVICES.          * 68970000
T17189*                                                                 68980000
T17189*      BYPASS LPC LOGIC IF THE ACCOUNT IS A MASTER ACCOUNT.  LPC* 68990000
T17189*      PROCESSING FOR MASTER ACCOUNTS IS DONE IN CRED COLL.     * 69000000
T17189*                                                                 69010000
T17189         IF (WS-MST-SUB-ACCT-IND-AT NOT = WS-MASTER               
T21934               OR (WS-MST-SUB-ACCT-IND-AT = WS-MASTER             
T21934               AND WS-101-ACCT-GEN-LED-CR = 0))                   
PCR212           AND ((HAS-ELE-AC AND HAS-GAS-AC)                       
PCR212              OR (HAS-BUD-ELEC-SERVICE AND HAS-BUD-GAS-SERVICE))  
A35648           EVALUATE TRUE                                          
A35648            WHEN WS-LOC-OFF-CHECK = 'G'                           
PCR212               MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO              
PCR212                                      WS-101-ACCT-GEN-LED-CR      
T10783               MOVE ZERO             TO WS-101-DETAIL-END-AR-BAL  
PCR212               PERFORM 5210-PROCESS-GL-RCV-FIELDS THRU 5210-EXIT  
A35648            WHEN WS-ELEC-REV-ALLOC-PCT-AT > 0                     
PCR212             COMPUTE WS-LPC-ELEC ROUNDED =                        
PCR212             (WS-ELEC-REV-ALLOC-PCT-AT * WS-101-AMT-POSTED) / 100 
PCR212             COMPUTE WS-LPC-GAS = WS-101-AMT-POSTED - WS-LPC-ELEC 
PCR212             MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO                
PCR212                                      WS-101-ACCT-GEN-LED-CR      
PCR212             MOVE WS-LPC-ELEC         TO WS-101-AMT-POSTED        
T10783             MOVE ZERO                TO WS-101-DETAIL-END-AR-BAL 
PCR212             PERFORM 5210-PROCESS-GL-RCV-FIELDS  THRU 5210-EXIT   
PCR212             PERFORM 5205-CREATE-101-COMMON-DATA THRU 5205-EXIT   
PCR212             MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO                
PCR212                                      WS-101-ACCT-GEN-LED-CR      
PCR212             MOVE WS-LPC-GAS          TO WS-101-AMT-POSTED        
T10783             MOVE ZERO                TO WS-101-DETAIL-END-AR-BAL 
PCR212             PERFORM 5210-PROCESS-GL-RCV-FIELDS THRU 5210-EXIT    
A35648                                                                  
A35648            WHEN (WS-UTE-ARREARS > ZERO OR                        
A35648                                WS-DPP-ELEC-ARREARS > 0)          
PCR212               MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO              
PCR212                                      WS-101-ACCT-GEN-LED-CR      
T10783               MOVE ZERO           TO WS-101-DETAIL-END-AR-BAL    
PCR212               PERFORM 5210-PROCESS-GL-RCV-FIELDS  THRU 5210-EXIT 
A35648            WHEN (WS-UTG-ARREARS > ZERO OR                        
A35648                                WS-DPP-GAS-ARREARS > 0)           
PCR212               MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO              
PCR212                                      WS-101-ACCT-GEN-LED-CR      
T10783               MOVE ZERO             TO WS-101-DETAIL-END-AR-BAL  
PCR212               PERFORM 5210-PROCESS-GL-RCV-FIELDS THRU 5210-EXIT  
A35648            WHEN OTHER                                            
A02036*                                                                         
A02036             MOVE WS-COMPANY-NO-AT   TO B1-COMPANY-NO             
A02036             MOVE WS-LOCAL-OFFICE-AT TO B1-LOCAL-OFFICE           
A02036             PERFORM 7400-SELECT-LOCOFC-FIX-FACTOR                
A02036                   THRU 7400-EXIT                                 
A02036             IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL           
A02036                   MOVE B1-ELEC-REV-ALLOC-PCT TO                  
A02036                           WS-ELEC-REV-ALLOC-PCT-AT               
A02036             ELSE                                                 
A02036                 MOVE 1 TO WS-ELEC-REV-ALLOC-PCT-AT               
A02036             END-IF                                               
A02036*                                                                         
A35648*            MOVE B1-ELEC-REV-ALLOC-PCT TO                        69420000
A35648*                                  WS-ELEC-REV-ALLOC-PCT-AT       69430000
A35648             COMPUTE WS-LPC-ELEC ROUNDED =                        
A35648             (WS-ELEC-REV-ALLOC-PCT-AT * WS-101-AMT-POSTED) / 100 
A35648             COMPUTE WS-LPC-GAS = WS-101-AMT-POSTED - WS-LPC-ELEC 
A35648             MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO                
A35648                                      WS-101-ACCT-GEN-LED-CR      
A35648             MOVE WS-LPC-ELEC         TO WS-101-AMT-POSTED        
A35648             MOVE ZERO                TO WS-101-DETAIL-END-AR-BAL 
A35648             PERFORM 5210-PROCESS-GL-RCV-FIELDS  THRU 5210-EXIT   
A35648             PERFORM 5205-CREATE-101-COMMON-DATA THRU 5205-EXIT   
A35648             MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO                
A35648                                      WS-101-ACCT-GEN-LED-CR      
A35648             MOVE WS-LPC-GAS          TO WS-101-AMT-POSTED        
A35648             MOVE ZERO                TO WS-101-DETAIL-END-AR-BAL 
A35648             PERFORM 5210-PROCESS-GL-RCV-FIELDS THRU 5210-EXIT    
A3564             END-EVALUATE                                          
PCR212         ELSE                                                     
T21934           IF WS-MST-SUB-ACCT-IND-AT = WS-MASTER                  
T21934              AND WS-101-ACCT-GEN-LED-CR = 0                      
T21934                  MOVE ZERO TO WS-101-DETAIL-END-AR-BAL           
T21934                  IF HAS-ELE-AC OR HAS-BUD-ELEC-SERVICE           
T21934                     MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO        
T21934                                      WS-101-ACCT-GEN-LED-CR      
T21934                  ELSE                                            
T21934                    IF HAS-GAS-AC OR HAS-BUD-GAS-SERVICE          
T21934                       MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO      
T21934                                      WS-101-ACCT-GEN-LED-CR      
T21934                    ELSE                                          
T21934*        DETERMINE ELEC REV PERCENTAGE BASED ON LOCAL OFFICE *    69710000
T21934                       MOVE WS-COMPANY-NO-AT   TO B1-COMPANY-NO   
T21934                       MOVE WS-LOCAL-OFFICE-AT TO B1-LOCAL-OFFICE 
T21934                       PERFORM 7400-SELECT-LOCOFC-FIX-FACTOR      
T21934                          THRU 7400-EXIT                          
T21934                       IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL 
T21934                          MOVE B1-ELEC-REV-ALLOC-PCT TO           
T21934                                   WS-ELEC-REV-ALLOC-PCT-AT       
T21934                       ELSE                                       
T21934                          MOVE 1 TO WS-ELEC-REV-ALLOC-PCT-AT      
T21934                       END-IF                                     
T21934                       COMPUTE WS-LPC-ELEC ROUNDED =              
T21934                               (WS-ELEC-REV-ALLOC-PCT-AT          
T21934                                * WS-101-AMT-POSTED) / 100        
T21934                       COMPUTE WS-LPC-GAS =                       
T21934                               WS-101-AMT-POSTED - WS-LPC-ELEC    
T21934                       MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO      
T21934                                      WS-101-ACCT-GEN-LED-CR      
T21934                       MOVE WS-LPC-ELEC TO WS-101-AMT-POSTED      
T21934                       MOVE ZERO TO WS-101-DETAIL-END-AR-BAL      
T21934                       PERFORM 5210-PROCESS-GL-RCV-FIELDS         
T21934                          THRU 5210-EXIT                          
T21934                       PERFORM 5205-CREATE-101-COMMON-DATA        
T21934                          THRU 5205-EXIT                          
T21934                       MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO      
T21934                                      WS-101-ACCT-GEN-LED-CR      
T21934                       MOVE WS-LPC-GAS TO WS-101-AMT-POSTED       
T21934                       MOVE ZERO TO WS-101-DETAIL-END-AR-BAL      
T21934                    END-IF                                        
T21934                  END-IF                                          
T21934                  PERFORM 5210-PROCESS-GL-RCV-FIELDS              
T21934                     THRU 5210-EXIT                               
PCR212           ELSE                                                   
PCR212             PERFORM 5210-PROCESS-GL-RCV-FIELDS THRU 5210-EXIT    
T21934           END-IF                                                 
PCR212         END-IF                                                   
PCR212       WHEN OTHER                                                 
PCR212         MOVE ZEROS             TO  E-FWK03-RCV-CREDIT-AMT        
PCR212                                    E-FWK03-RCV-DEBIT-AMT         
PCR212                                    E-FWK03-GEN-LEG-DEBIT-AMT     
PCR212                                    E-FWK03-GEN-LEG-CREDIT-AMT    
PCR212         MOVE CJF00101          TO  E-FWK03-USER-DEFINED-AREA     
PCR212         MOVE ZEROS             TO  E-FWK03-SORT-SUM-FLD          
PCR212         PERFORM 8200-WRITE-FCSWK03 THRU 8200-EXIT                
PCR212     END-EVALUATE.                                                
       5200-EXIT.                                                       
           EXIT.                                                        
                                                                        
T5679  5202-CREATE-101-HEADING.                                         
      *                                                                 70200000
      * JOURNAL KEY                                                     70210000
      *                                                                 70220000
           MOVE WS-A                    TO  E-FWK03-JRNL-SORT-ID.       
           MOVE WS-COMPANY-NO-AT        TO  E-FWK03-COMPANY-NO.         
           MOVE WS-LOCAL-OFFICE-AT      TO  E-FWK03-LOCAL-OFFICE.       
           MOVE WS-ACCOUNT-NO-AT        TO  E-FWK03-ACCT-NO.            
           MOVE WS-CUSTOMER-NO-CU       TO  E-FWK03-CUSTOMER-NO.        
           MOVE WS-BILL                 TO  E-FWK03-CODE-TERMINAL-TRAN. 
           MOVE LS-INPUT-DATE           TO  E-FWK03-DATE-LAST-ACTION    
           MOVE WS-B                    TO  E-FWK03-CODE-ENTRY-SOURCE.  
                                                                        
      *                                                                 70320000
      * COMMON JOURNAL DATA                                             70330000
      *                                                                 70340000
P00794     IF WS-101-ACCT-GEN-LED-CR = 241.0123 OR 241.0207             
P00794        MOVE WS-105               TO WS-101-JRNL-FORMAT-NO        
P00794     ELSE                                                         
              MOVE WS-101               TO WS-101-JRNL-FORMAT-NO        
P00794     END-IF.                                                      
           MOVE WS-X                    TO WS-101-CASH-DRAWER-USED.     
                                                                        
           MOVE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)               
             TO WS-PYMT-LVL-CHECK.                                      
                                                                        
T5679  5202-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
PCR212 5205-CREATE-101-COMMON-DATA.                                     
                                                                        
T5679      PERFORM 5202-CREATE-101-HEADING        THRU 5202-EXIT        
           PERFORM 5300-GET-GEN-LED-NO-FROM-TABLE THRU 5300-EXIT        
           IF WS-UNUSED-CR-FL NOT = 'Y'                                 
T8556         IF WS-SUMM-UNBILLED                                       
T8556            MOVE WS-TOT-SUMM-UNBILLED-AC (WS-AR-DATA-INDX)         
T8556              TO WS-101-AMT-POSTED                                 
T8556         ELSE                                                      
T12012          IF CREATE-CIA-FROM-UNUSED                               
T?????             MOVE WS-P TO WS-101-AR-AGE                           
T12012             COMPUTE WS-101-AMT-POSTED = WS-AMT-UNUSED-CR-HOLD-AC 
T12012                                                * -1              
T12012          ELSE                                                    
T?????            MOVE ZERO TO WS-101-AR-AGE                            
T13862            IF LPC-JOURNAL                                        
T13862             MOVE WS-TOT-NEW-CHRGS-CALC-AC (WS-AR-DATA-INDX)      
T13862                TO WS-101-AMT-POSTED                              
T13862            ELSE                                                  
                    MOVE WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX)          
                      TO WS-101-AMT-POSTED                              
T13862            END-IF                                                
T12012          END-IF                                                  
T8556         END-IF                                                    
              IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)              
                    NOT = 40 AND 45                                     
                 MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)          
                   TO WS-101-DETAIL-END-BAL                             
                 COMPUTE WS-101-DETAIL-END-AR-BAL EQUAL                 
                     (WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) +           
                      WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) +           
                      WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) +           
                      WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX))            
T11825           IF (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) = 129    
T11825               AND WS-SHARE-STATUS-CD-PJ = WS-PJS-INACTIVE)       
T12629              OR (WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX) =     
T12629                   30 OR 39)                                      
T11825             MOVE 0     TO WS-101-DETAIL-END-BAL                  
T11825                           WS-101-DETAIL-END-AR-BAL               
T11825           END-IF                                                 
              END-IF                                                    
           END-IF                                                       
                                                                        
C36303     IF PACE-CNT-CANCEL                                           
C36303        MOVE SPACES               TO WS-101-AR-AGE                
C36303     END-IF.                                                      
T11460     MOVE LS-INPUT-DATE           TO WS-101-DATE-AR-BILLED.       
                                                                        
           MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX) TO WS-101-ITEM-ID-NO    
           MOVE WS-REV-DISTRICT-CD-PR   TO WS-101-CODE-REVENUE-DISTRICT.
           MOVE WS-CODE-EMPL-ACCT-CU    TO WS-101-CODE-EMPL-ACCT.       
           MOVE WS-CODE-COMPANY-ACCT-AT TO WS-101-CODE-COMPANY-ACCT.    
           MOVE WS-CODE-ACCT-STAT-AT    TO WS-101-CODE-ACCOUNT-STATUS.  
           MOVE WS-CODE-PREMISE-STAT-PR TO WS-101-CODE-PREMISE-STATUS.  
           MOVE WS-101-AMT-POSTED       TO WS-101-AMOUNT-ENTERED.       
                                                                        
PCR212 5205-EXIT.                                                       
PCR212     EXIT.                                                        
                                                                        
PCR212 5210-PROCESS-GL-RCV-FIELDS.                                      
PCR212     MOVE WS-101-AMT-POSTED  TO  E-FWK03-RCV-DEBIT-AMT            
PCR212                                 E-FWK03-GEN-LEG-CREDIT-AMT       
PCR212     MOVE ZEROS              TO  E-FWK03-RCV-CREDIT-AMT           
PCR212                                 E-FWK03-GEN-LEG-DEBIT-AMT        
PCR212     MOVE CJF00101           TO  E-FWK03-USER-DEFINED-AREA        
PCR212     MOVE ZEROS              TO  E-FWK03-SORT-SUM-FLD             
PCR212     PERFORM 8200-WRITE-FCSWK03 THRU 8200-EXIT.                   
PCR212 5210-EXIT.                                                       
PCR212     EXIT.                                                        
                                                                        
                                                                        
T5679  5220-PROCESS-GL-RCV-FIELDS2.                                     
T5679      MOVE ZEROS              TO  E-FWK03-RCV-DEBIT-AMT            
T5679                                  E-FWK03-GEN-LEG-CREDIT-AMT       
T5679      MOVE WS-101-AMT-POSTED  TO  E-FWK03-RCV-CREDIT-AMT           
T5679                                  E-FWK03-GEN-LEG-DEBIT-AMT        
T5679      MOVE CJF00101           TO  E-FWK03-USER-DEFINED-AREA        
T5679      MOVE ZEROS              TO  E-FWK03-SORT-SUM-FLD             
T5679      PERFORM 8200-WRITE-FCSWK03 THRU 8200-EXIT.                   
T5679  5220-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
PCR305/*****************************************************************71280000
PCR305*                                                                *71290000
PCR305*     5250-CREATE-105-JRNL-FROM-AC.                              *71300000
PCR305*                                                                *71310000
PCR305******************************************************************71320000
PCR305 5250-CREATE-105-JRNL-FROM-AC.                                    
PCR305*                                                                 71340000
PCR305* JOURNAL KEY                                                     71350000
PCR305*                                                                 71360000
PCR305     MOVE WS-A                    TO  E-FWK03-JRNL-SORT-ID.       
PCR305     MOVE WS-COMPANY-NO-AT        TO  E-FWK03-COMPANY-NO.         
PCR305     MOVE WS-LOCAL-OFFICE-AT      TO  E-FWK03-LOCAL-OFFICE.       
PCR305     MOVE WS-ACCOUNT-NO-AT        TO  E-FWK03-ACCT-NO.            
PCR305     MOVE WS-CUSTOMER-NO-CU       TO  E-FWK03-CUSTOMER-NO.        
PCR305     MOVE WS-BILL                 TO  E-FWK03-CODE-TERMINAL-TRAN. 
PCR305     MOVE LS-INPUT-DATE           TO  E-FWK03-DATE-LAST-ACTION    
PCR305     MOVE WS-B                    TO  E-FWK03-CODE-ENTRY-SOURCE.  
PCR305                                                                  
PCR305*                                                                 71460000
PCR305* COMMON JOURNAL DATA                                             71470000
PCR305*                                                                 71480000
PCR305     MOVE WS-105                  TO WS-105-JRNL-FORMAT-NO.       
PCR305     MOVE WS-X                    TO WS-105-CASH-DRAWER-USED.     
PCR305                                                                  
PCR305     MOVE WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)               
PCR305       TO WS-PYMT-LVL-CHECK.                                      
PCR305     IF WS-UNUSED-CR-FL NOT = 'Y'                                 
T12327        MOVE SPACES TO WS-105-AR-AGE                              
PCR305        IF WS-PYMT-PRIORITY-LVL-AC (WS-AR-DATA-INDX)              
PCR305              NOT = 40 AND 45                                     
PCR305           MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)          
PCR305             TO WS-105-DETAIL-END-BAL                             
PCR305           COMPUTE WS-105-DETAIL-END-AR-BAL EQUAL                 
PCR305               (WS-AMT-AR-DAY-00-AC (WS-AR-DATA-INDX) +           
PCR305                WS-AMT-AR-DAY-30-AC (WS-AR-DATA-INDX) +           
PCR305                WS-AMT-AR-DAY-60-AC (WS-AR-DATA-INDX) +           
PCR305                WS-AMT-AR-DAY-90-AC (WS-AR-DATA-INDX))            
PCR305        END-IF                                                    
PCR305     END-IF                                                       
PCR305                                                                  
T11460     MOVE LS-INPUT-DATE           TO WS-105-DATE-AR-BILLED.       
PCR305                                                                  
PCR305     MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX) TO WS-105-ITEM-ID-NO    
PCR305     MOVE WS-REV-DISTRICT-CD-PR   TO WS-105-CODE-REVENUE-DISTRICT.
PCR305     MOVE WS-CODE-EMPL-ACCT-CU    TO WS-105-CODE-EMPL-ACCT.       
PCR305     MOVE WS-CODE-COMPANY-ACCT-AT TO WS-105-CODE-COMPANY-ACCT.    
PCR305     MOVE WS-CODE-ACCT-STAT-AT    TO WS-105-CODE-ACCOUNT-STATUS.  
PCR305     MOVE WS-CODE-PREMISE-STAT-PR TO WS-105-CODE-PREMISE-STATUS.  
PCR305     MOVE WS-105-AMT-POSTED       TO WS-105-AMOUNT-ENTERED.       
PCR305     MOVE WS-INTRST-COST-CENTER-CT(WS-CNT-INDX)                   
PCR305                                  TO WS-105-COST-CENTER.          
PCR305     MOVE WS-INTRST-NOE-CODE-CT(WS-CNT-INDX)                      
PCR305                                  TO WS-105-NATURE-OF-EXPENDITURE.
PCR305     MOVE WS-INTRST-FNCTN-CODE-CT(WS-CNT-INDX)                    
PCR305                                  TO WS-105-FUNCTION-CODE.        
PCR305     MOVE WS-BNFT-COST-CENTER-EA(WS-CNT-DET-INDX)                 
                                        TO WS-105-BENE-COST-CENTER.     
PCR305     MOVE WS-WORK-ORDER-NO-EA(WS-CNT-DET-INDX)                    
                                        TO WS-105-CODE-PROPERTY-UNIT.   
PCR305                                                                  
PCR305     MOVE CJF00105                TO E-FWK03-USER-DEFINED-AREA.   
PCR305                                                                  
PCR305     IF (CNT AND WS-CODE-BILL-TYPE-CT (WS-CNT-INDX)               
PCR305                  =  WS-MONTHLY-AMOUNT-CNTRACT)                   
PCR305        MOVE WS-105-AMT-POSTED  TO  E-FWK03-RCV-DEBIT-AMT         
PCR305                                    E-FWK03-GEN-LEG-CREDIT-AMT    
PCR305        MOVE ZEROS              TO  E-FWK03-RCV-CREDIT-AMT        
PCR305                                    E-FWK03-GEN-LEG-DEBIT-AMT     
PCR305     ELSE                                                         
PCR305        MOVE ZEROS              TO  E-FWK03-RCV-CREDIT-AMT        
PCR305                                    E-FWK03-RCV-DEBIT-AMT         
PCR305                                    E-FWK03-GEN-LEG-DEBIT-AMT     
PCR305                                    E-FWK03-GEN-LEG-CREDIT-AMT    
PCR305     END-IF                                                       
PCR305                                                                  
PCR305     MOVE ZEROS                   TO E-FWK03-SORT-SUM-FLD.        
PCR305     PERFORM 8200-WRITE-FCSWK03 THRU 8200-EXIT.                   
PCR305 5250-EXIT.                                                       
           EXIT.                                                        
                                                                        
      /*****************************************************************72100000
      *                                                                *72110000
      *    5300-GET-GEN-LED-NO-FROM-TABLE.                             *72120000
      *                                                                *72130000
      ******************************************************************72140000
       5300-GET-GEN-LED-NO-FROM-TABLE.                                  
           EVALUATE TRUE                                                
               WHEN LPC                                                 
                  MOVE WS-AR-LPC-GL-NO (WS-GL-SUB) TO                   
                                          WS-101-ACCT-GEN-LED-DR        
PCR212*           IF THE ACCOUNT HAS BOTH ELEC AND GAS SERVICES,      * 72200000
PCR212*           THE GEN-LED-CR CODE IS SET IN PARA 5200-CREATE-101- * 72210000
PCR212*           JRNL-FROM-AC.  A GEN LED RECORD WILL BE WRITTEN FOR * 72220000
PCR212*           BOTH SERVICES.                                      * 72230000
PCR212            EVALUATE TRUE                                         
T10933              WHEN WS-SUMM-UNBILLED AND WASH-LPC-JRNL             
T10933                MOVE WS-AR-LPC-GL-NO (WS-GL-SUB) TO               
T10933                                    WS-101-ACCT-GEN-LED-CR        
PCR212              WHEN HAS-ELE-AC AND HAS-GAS-AC                      
PCR212              WHEN HAS-BUD-ELEC-SERVICE AND HAS-BUD-GAS-SERVICE   
PCR212                CONTINUE                                          
PCR212              WHEN HAS-ELE-AC                                     
PCR212              WHEN HAS-BUD-ELEC-SERVICE                           
PCR212                MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO             
PCR212                                      WS-101-ACCT-GEN-LED-CR      
PCR212              WHEN HAS-GAS-AC                                     
PCR212              WHEN HAS-BUD-GAS-SERVICE                            
PCR212                MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO             
PCR212                                      WS-101-ACCT-GEN-LED-CR      
T20993*********** USE EREV LPC AS DEFAULT PER KC KOFFER ****            72390000
T20993              WHEN OTHER                                          
T21512                MOVE WS-COMPANY-NO-AT    TO  B1-COMPANY-NO        
T21512                MOVE WS-LOCAL-OFFICE-AT  TO  B1-LOCAL-OFFICE      
T21512                PERFORM 7450-SELECT-DISTRICT-NO THRU 7450-EXIT    
T21512                IF B1-DISTRICT-NO = 'GAS'                         
T21512                  MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB) TO           
PCR212                                      WS-101-ACCT-GEN-LED-CR      
T21512                ELSE                                              
T20993                  MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB) TO           
PCR212                                      WS-101-ACCT-GEN-LED-CR      
T21512                END-IF                                            
PCR212            END-EVALUATE                                          
               WHEN LPN                                                 
                  MOVE WS-AR-LPN-GL-NO (WS-GL-SUB) TO                   
                                            WS-101-ACCT-GEN-LED-DR      
T16185            IF WS-SUMM-UNBILLED AND WASH-LPC-JRNL                 
T16185               MOVE WS-AR-LPN-GL-NO (WS-GL-SUB) TO                
                                            WS-101-ACCT-GEN-LED-CR      
T16185            ELSE                                                  
PCR212               MOVE WS-REV-LPN-GL-NO (WS-GL-SUB) TO               
                                            WS-101-ACCT-GEN-LED-CR      
                  END-IF                                                
               WHEN UTE                                                 
      ** UTE/UTG 101S ARE ALWAYS OFFSETS                                72630000
                  MOVE WS-AR-UTE-GL-NO (WS-GL-SUB) TO                   
                                            WS-101-ACCT-GEN-LED-DR      
                                            WS-101-ACCT-GEN-LED-CR      
               WHEN UTG                                                 
                  MOVE WS-AR-UTG-GL-NO (WS-GL-SUB) TO                   
                                            WS-101-ACCT-GEN-LED-DR      
                                            WS-101-ACCT-GEN-LED-CR      
               WHEN BUD                                                 
                  MOVE WS-AR-BUD-GL-NO (WS-GL-SUB) TO                   
                                          WS-101-ACCT-GEN-LED-DR        
                                          WS-101-ACCT-GEN-LED-CR        
               WHEN CCC                                                 
                  MOVE WS-AR-CCC-GL-NO (WS-GL-SUB) TO                   
                                          WS-101-ACCT-GEN-LED-DR        
                                          WS-101-ACCT-GEN-LED-CR        
               WHEN DFA                                                 
                  MOVE WS-AR-DFA-GL-NO (WS-GL-SUB) TO                   
                                          WS-101-ACCT-GEN-LED-DR        
                                          WS-101-ACCT-GEN-LED-CR        
               WHEN CIA                                                 
                  MOVE WS-AR-CIA-GL-NO (WS-GL-SUB) TO                   
                                          WS-101-ACCT-GEN-LED-DR        
                                          WS-101-ACCT-GEN-LED-CR        
T12012            IF CREATE-CIA-FROM-UNUSED                             
T14478              IF WS-CIA-FOR-REBILL                                
T14478                 MOVE WS-AR-LPC-GL-NO (WS-GL-SUB) TO              
T12012                                    WS-101-ACCT-GEN-LED-DR        
T12012              ELSE                                                
P00453                 EVALUATE WS-PYMT-PRIORITY-HOLD                   
P00453                     WHEN 40                                      
P00453                          MOVE WS-AR-UTE-GL-NO (WS-GL-SUB) TO     
P00453                               WS-101-ACCT-GEN-LED-DR             
P00453                     WHEN 45                                      
P00453                          MOVE WS-AR-UTG-GL-NO (WS-GL-SUB) TO     
P00453                               WS-101-ACCT-GEN-LED-DR             
P00453                     WHEN 50                                      
P00453                          MOVE WS-AR-BUD-GL-NO (WS-GL-SUB) TO     
P00453                               WS-101-ACCT-GEN-LED-DR             
P00453                 END-EVALUATE                                     
T12012              END-IF                                              
T12012            END-IF                                                
               WHEN DEP                                                 
                  MOVE WS-AR-DEP-GL-NO (WS-GL-SUB) TO                   
                                          WS-101-ACCT-GEN-LED-DR        
                                          WS-101-ACCT-GEN-LED-CR        
               WHEN CNT                                                 
                  IF (WS-CODE-BILL-TYPE-CT (WS-CNT-INDX)                
PCR305               =  WS-MONTHLY-AMOUNT-CNTRACT OR WS-MNTHLY-CREDIT)  
T18278               AND (WS-NOT-SUMM-UNBILLED)                         
                     PERFORM 5310-GET-CNT-REV-ACCT                      
                  ELSE                                                  
                     MOVE WS-AR-CNT-GL-NO (WS-GL-SUB) TO                
                                          WS-101-ACCT-GEN-LED-DR        
                                          WS-101-ACCT-GEN-LED-CR        
                  END-IF                                                
               WHEN PJS                                                 
T5832             IF WS-SHARE-STATUS-CD-PJ = WS-PJS-INACTIVE            
T5832                 MOVE WS-AR-PJS-GL-NO (WS-GL-SUB) TO               
T5832                                         WS-101-ACCT-GEN-LED-CR    
A35920               IF WS-SUMM-UNBILLED                                
A35920                  MOVE WS-AR-PJS-GL-NO (WS-GL-SUB)  TO            
A35920                                        WS-101-ACCT-GEN-LED-DR    
A35920               ELSE                                               
A35920                  MOVE WS-LIA-PJS-GL-NO (WS-GL-SUB) TO            
A35920                                        WS-101-ACCT-GEN-LED-DR    
A35920               END-IF                                             
T5832             ELSE                                                  
A35920              IF WS-UNUSED-CR-FL = 'Y' OR WS-SUMM-UNBILLED        
A35920                  MOVE WS-AR-PJS-GL-NO (WS-GL-SUB) TO             
A35920                                        WS-101-ACCT-GEN-LED-DR    
A35920                                        WS-101-ACCT-GEN-LED-CR    
A35920              ELSE                                                
A35920                  MOVE WS-AR-PJS-GL-NO (WS-GL-SUB) TO             
A35920                                        WS-101-ACCT-GEN-LED-DR    
A35920                  MOVE WS-LIA-PJS-GL-NO (WS-GL-SUB) TO            
A35920                                        WS-101-ACCT-GEN-LED-CR    
A35920              END-IF                                              
T5832             END-IF                                                
T13989         WHEN NSF                                                 
T13989            MOVE WS-AR-NSC-GL-NO (WS-GL-SUB) TO                   
T13989                                    WS-101-ACCT-GEN-LED-CR        
T13989                                    WS-101-ACCT-GEN-LED-DR        
T13989         WHEN NSA                                                 
T13989            MOVE WS-AR-NSA-GL-NO (WS-GL-SUB) TO                   
T13989                                    WS-101-ACCT-GEN-LED-CR        
T13989                                    WS-101-ACCT-GEN-LED-DR        
T13989         WHEN NSN                                                 
T13989            MOVE WS-AR-NSN-GL-NO (WS-GL-SUB) TO                   
T13989                                    WS-101-ACCT-GEN-LED-CR        
T13989                                    WS-101-ACCT-GEN-LED-DR        
               WHEN OTHER                                               
                  MOVE ZEROES   TO WS-101-ACCT-GEN-LED-DR               
                                   WS-101-ACCT-GEN-LED-CR               
           END-EVALUATE.                                                
       5300-EXIT.                                                       
           EXIT.                                                        
                                                                        
       5310-GET-CNT-REV-ACCT.                                           
T14658     SET WS-CNT-DET-INDX TO 1                                     
T14658     SEARCH WS-CNT-DETAIL-DATA                                    
T14658        AT END                                                    
T14658           MOVE 'CONTRACT DETAIL ENTRY NOT FOUND'                 
T14658             TO WS-MISC-MSG-TEXT                                  
T14658           MOVE +31 TO WS-MISC-MSG-LEN                            
T18829           MOVE 12 TO RETURN-CODE                                 
T14658           PERFORM 9910-MISC-ERROR THRU 9910-EXIT                 
T14658        WHEN  WS-ACCOUNT-NO-EA (WS-CNT-DET-INDX)                  
T14658          = WS-ACCOUNT-NO-CT (WS-CNT-INDX)                        
T14658         AND  WS-CNT-ITEM-ID-EA  (WS-CNT-DET-INDX)                
T14658          = WS-CNT-ITEM-ID-CT (WS-CNT-INDX)                       
C36303         IF PACE-CNT-CANCEL                                       
C36303            MOVE WS-GL-ACCT-NO-EA(WS-CNT-DET-INDX)                
C36303                                        TO WS-101-ACCT-GEN-LED-DR 
C36303            MOVE WS-AR-CNT-GL-NO (WS-GL-SUB)                      
C36303                                        TO WS-101-ACCT-GEN-LED-CR 
C36303         ELSE                                                     
C36303            MOVE WS-GL-ACCT-NO-EA(WS-CNT-DET-INDX)                
C36303                                        TO WS-101-ACCT-GEN-LED-CR 
C36303            MOVE WS-AR-CNT-GL-NO (WS-GL-SUB)                      
C36303                                        TO WS-101-ACCT-GEN-LED-DR 
C36303         END-IF                                                   
T14658     END-SEARCH.                                                  
       5310-EXIT.                                                       
           EXIT.                                                        
                                                                        
T5679  5400-ORIG-LPC-ELEC-GL.                                           
                                                                        
T5679      PERFORM 5202-CREATE-101-HEADING  THRU 5202-EXIT.             
                                                                        
T5679      MOVE WS-AR-LPC-GL-NO (WS-GL-SUB)                             
T5679                            TO WS-101-ACCT-GEN-LED-CR.             
T5679      MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB)                           
T5679                            TO WS-101-ACCT-GEN-LED-DR.             
                                                                        
T14478     MOVE 'F'              TO WS-101-AR-AGE.                      
T14478     MOVE WS-AMT-POSTED-TOTAL TO WS-101-AMT-POSTED.               
T5679      MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)                
T5679                            TO WS-101-DETAIL-END-BAL.              
                                                                        
T5679      MOVE ZERO             TO WS-101-DETAIL-END-AR-BAL.           
                                                                        
T11460     MOVE LS-INPUT-DATE     TO WS-101-DATE-AR-BILLED.             
                                                                        
T5679      MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX) TO WS-101-ITEM-ID-NO    
T5679      MOVE WS-REV-DISTRICT-CD-PR   TO WS-101-CODE-REVENUE-DISTRICT.
T5679      MOVE WS-CODE-EMPL-ACCT-CU    TO WS-101-CODE-EMPL-ACCT.       
T5679      MOVE WS-CODE-COMPANY-ACCT-AT TO WS-101-CODE-COMPANY-ACCT.    
T5679      MOVE WS-CODE-ACCT-STAT-AT    TO WS-101-CODE-ACCOUNT-STATUS.  
T5679      MOVE WS-CODE-PREMISE-STAT-PR TO WS-101-CODE-PREMISE-STATUS.  
T5679      MOVE WS-101-AMT-POSTED       TO WS-101-AMOUNT-ENTERED.       
                                                                        
T5679      PERFORM 5220-PROCESS-GL-RCV-FIELDS2 THRU 5220-EXIT.          
                                                                        
T5679  5400-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
T5679  5410-REBILL-LPC-ELEC-GL.                                         
                                                                        
T5679      PERFORM 5202-CREATE-101-HEADING  THRU 5202-EXIT.             
                                                                        
T5679      MOVE WS-EREV-LPC-GL-NO (WS-GL-SUB)                           
T5679                            TO WS-101-ACCT-GEN-LED-CR.             
T5679      MOVE WS-AR-LPC-GL-NO (WS-GL-SUB)                             
T5679                            TO WS-101-ACCT-GEN-LED-DR.             
                                                                        
T14478     IF ELEC-90-DAY-REBILL                                        
T14478        MOVE '60' TO WS-101-AR-AGE                                
T14478     ELSE                                                         
T14478        IF ELEC-60-DAY-REBILL                                     
T14478           MOVE '30' TO WS-101-AR-AGE                             
T14478        ELSE                                                      
T14478           MOVE ZERO TO WS-101-AR-AGE                             
T14478        END-IF                                                    
T14478     END-IF.                                                      
T14478     ADD WS-LPC-ADJUST-AMT TO WS-AMT-POSTED-TOTAL                 
T14478        GIVING WS-101-AMT-POSTED.                                 
T5679      MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)                
T5679                            TO WS-101-DETAIL-END-BAL.              
                                                                        
T5679      MOVE WS-REBILL-LPC-ELEC TO WS-101-DETAIL-END-AR-BAL.         
                                                                        
T11460     MOVE LS-INPUT-DATE     TO WS-101-DATE-AR-BILLED.             
                                                                        
T5679      MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX) TO WS-101-ITEM-ID-NO    
T5679      MOVE WS-REV-DISTRICT-CD-PR   TO WS-101-CODE-REVENUE-DISTRICT.
T5679      MOVE WS-CODE-EMPL-ACCT-CU    TO WS-101-CODE-EMPL-ACCT.       
T5679      MOVE WS-CODE-COMPANY-ACCT-AT TO WS-101-CODE-COMPANY-ACCT.    
T5679      MOVE WS-CODE-ACCT-STAT-AT    TO WS-101-CODE-ACCOUNT-STATUS.  
T5679      MOVE WS-CODE-PREMISE-STAT-PR TO WS-101-CODE-PREMISE-STATUS.  
T5679      MOVE WS-101-AMT-POSTED       TO WS-101-AMOUNT-ENTERED.       
                                                                        
T5679      PERFORM 5210-PROCESS-GL-RCV-FIELDS  THRU 5210-EXIT.          
                                                                        
T5679  5410-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
T5679  5420-ORIG-LPC-GAS-GL.                                            
                                                                        
T5679      PERFORM 5202-CREATE-101-HEADING  THRU 5202-EXIT.             
                                                                        
T5679      MOVE WS-AR-LPC-GL-NO (WS-GL-SUB)                             
T5679                            TO WS-101-ACCT-GEN-LED-CR.             
T5679      MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB)                           
T5679                            TO WS-101-ACCT-GEN-LED-DR.             
                                                                        
T14478     MOVE 'F'              TO WS-101-AR-AGE.                      
T14478     MOVE WS-AMT-POSTED-TOTAL TO WS-101-AMT-POSTED.               
T5679      MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)                
T5679                            TO WS-101-DETAIL-END-BAL.              
                                                                        
T5679      MOVE ZERO             TO WS-101-DETAIL-END-AR-BAL.           
                                                                        
T11460     MOVE LS-INPUT-DATE     TO WS-101-DATE-AR-BILLED.             
                                                                        
T5679      MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX) TO WS-101-ITEM-ID-NO    
T5679      MOVE WS-REV-DISTRICT-CD-PR   TO WS-101-CODE-REVENUE-DISTRICT.
T5679      MOVE WS-CODE-EMPL-ACCT-CU    TO WS-101-CODE-EMPL-ACCT.       
T5679      MOVE WS-CODE-COMPANY-ACCT-AT TO WS-101-CODE-COMPANY-ACCT.    
T5679      MOVE WS-CODE-ACCT-STAT-AT    TO WS-101-CODE-ACCOUNT-STATUS.  
T5679      MOVE WS-CODE-PREMISE-STAT-PR TO WS-101-CODE-PREMISE-STATUS.  
T5679      MOVE WS-101-AMT-POSTED       TO WS-101-AMOUNT-ENTERED.       
                                                                        
T5679      PERFORM 5220-PROCESS-GL-RCV-FIELDS2 THRU 5220-EXIT.          
                                                                        
T5679  5420-EXIT.                                                       
T5679      EXIT.                                                        
                                                                        
T5679  5430-REBILL-LPC-GAS-GL.                                          
                                                                        
T5679      PERFORM 5202-CREATE-101-HEADING  THRU 5202-EXIT.             
                                                                        
T5679      MOVE WS-GREV-LPC-GL-NO (WS-GL-SUB)                           
T5679                            TO WS-101-ACCT-GEN-LED-CR.             
T5679      MOVE WS-AR-LPC-GL-NO (WS-GL-SUB)                             
T5679                            TO WS-101-ACCT-GEN-LED-DR.             
                                                                        
T14478     IF GAS-90-DAY-REBILL                                         
T14478        MOVE '60' TO WS-101-AR-AGE                                
T14478     ELSE                                                         
T14478        IF GAS-60-DAY-REBILL                                      
T14478           MOVE '30' TO WS-101-AR-AGE                             
T14478        ELSE                                                      
T14478           MOVE ZERO TO WS-101-AR-AGE                             
T14478        END-IF                                                    
T14478     END-IF.                                                      
T14478     ADD WS-LPC-ADJUST-AMT TO WS-AMT-POSTED-TOTAL                 
T14478        GIVING WS-101-AMT-POSTED.                                 
T5679      MOVE WS-AMT-TRAN-BALANCE-AC (WS-AR-DATA-INDX)                
T5679                            TO WS-101-DETAIL-END-BAL.              
                                                                        
T5679      MOVE WS-REBILL-LPC-GAS  TO WS-101-DETAIL-END-AR-BAL.         
                                                                        
T11460     MOVE LS-INPUT-DATE     TO WS-101-DATE-AR-BILLED.             
                                                                        
T5679      MOVE WS-ITEM-ID-AC (WS-AR-DATA-INDX) TO WS-101-ITEM-ID-NO    
T5679      MOVE WS-REV-DISTRICT-CD-PR   TO WS-101-CODE-REVENUE-DISTRICT.
T5679      MOVE WS-CODE-EMPL-ACCT-CU    TO WS-101-CODE-EMPL-ACCT.       
T5679      MOVE WS-CODE-COMPANY-ACCT-AT TO WS-101-CODE-COMPANY-ACCT.    
T5679      MOVE WS-CODE-ACCT-STAT-AT    TO WS-101-CODE-ACCOUNT-STATUS.  
T5679      MOVE WS-CODE-PREMISE-STAT-PR TO WS-101-CODE-PREMISE-STATUS.  
T5679      MOVE WS-101-AMT-POSTED       TO WS-101-AMOUNT-ENTERED.       
                                                                        
T5679      PERFORM 5210-PROCESS-GL-RCV-FIELDS  THRU 5210-EXIT.          
                                                                        
T5679  5430-EXIT.                                                       
T5679      EXIT.                                                        
P00453*                                                                 75410000
P00453******************************************************************75410000
P00453* 5440-CREATE-ADJ-JOURNAL                                        *75410000
P00453******************************************************************75410000
P00453*                                                                 75410000
P00453 5440-CREATE-ADJ-JOURNAL.                                         
P00453     INITIALIZE CJF00101.                                         
P00453* Journal Key                                                     33190400
P00453     MOVE 'A'                   TO E-FWK03-JRNL-SORT-ID.          
P00453     MOVE WS-COMPANY-NO-AT      TO E-FWK03-COMPANY-NO.            
P00453     MOVE WS-LOCAL-OFFICE-AT    TO E-FWK03-LOCAL-OFFICE.          
P00453     MOVE WS-ACCOUNT-NO-AT      TO E-FWK03-ACCT-NO.               
P00453     MOVE WS-CUSTOMER-NO-CU     TO E-FWK03-CUSTOMER-NO.           
P00453     MOVE 'A108'                TO E-FWK03-CODE-TERMINAL-TRAN.    
P00453     MOVE LS-INPUT-DATE         TO E-FWK03-DATE-LAST-ACTION       
P00453     MOVE WS-B                  TO E-FWK03-CODE-ENTRY-SOURCE.     
P00453* Common Journal Data                                             33191500
P00453     MOVE WS-101                TO WS-101-JRNL-FORMAT-NO.         
P00453     MOVE SPACES                TO WS-101-CASH-DRAWER-USED.       
P00453     MOVE WS-AR-BUD-GL-NO (WS-GL-SUB)                             
P00453                                TO WS-101-ACCT-GEN-LED-CR         
P00453                                   WS-101-ACCT-GEN-LED-DR.        
P00453     MOVE WS-JRNL-AMT-POSTED    TO WS-101-AMT-POSTED              
P00453                                   WS-101-DETAIL-END-BAL          
P00453                                   WS-101-DETAIL-END-AR-BAL       
P00453                                   WS-101-AMOUNT-ENTERED          
P00453                                   E-FWK03-RCV-DEBIT-AMT          
P00453                                   E-FWK03-RCV-CREDIT-AMT.        
P00453     MOVE WS-JRNL-ACCT-END-AR-BAL                                 
P00453                                TO WS-101-ACCT-END-AR-BAL         
P00453                                   AR-AMT-BILLED-UNPAID.          
P00453     MOVE LS-INPUT-DATE         TO WS-101-DATE-AR-BILLED.         
P00453     MOVE 1                     TO WS-101-ITEM-ID-NO.             
P00453     MOVE WS-REV-DISTRICT-CD-PR TO WS-101-CODE-REVENUE-DISTRICT.  
P00453     MOVE WS-CODE-EMPL-ACCT-CU  TO WS-101-CODE-EMPL-ACCT.         
P00453     MOVE WS-CODE-COMPANY-ACCT-AT  TO WS-101-CODE-COMPANY-ACCT.   
P00453     MOVE WS-CODE-ACCT-STAT-AT  TO WS-101-CODE-ACCOUNT-STATUS.    
P00453     MOVE WS-CODE-PREMISE-STAT-PR  TO WS-101-CODE-PREMISE-STATUS. 
P00453     MOVE ZEROS                 TO E-FWK03-GEN-LEG-CREDIT-AMT     
P00453                                   E-FWK03-GEN-LEG-DEBIT-AMT.     
P00453     MOVE SPACES                TO WS-101-AR-AGE                  
P00453     MOVE ZERO                  TO WS-DETAIL-END-BAL              
P00453                                   WS-DETAIL-END-AR-BAL.          
P00453     MOVE 1                     TO E-FWK03-JRNL-TRAN-APPL-NO.     
P00453     MOVE LS-CURR-REVENUE-MONTH TO WS-101-REVENUE-MONTH.          
P00453     MOVE CJF00101              TO E-FWK03-USER-DEFINED-AREA.     
P00453     MOVE ZEROS                 TO E-FWK03-SORT-SUM-FLD.          
P00453     PERFORM 8200-WRITE-FCSWK03 THRU 8200-EXIT.                   
P00453*                                                                 33196700
P00453 5440-EXIT.                                                       
P00453     EXIT.                                                        
P00453*                                                                 33196700
T21265****************************************************************  75420000
T21265*                                                              *  75430000
T21265* CREATE A WORK QUEUE FOR THE ACCOUNT HAVING LIEN_CD = 'Y'     *  75440000
T21265* AND THE CONTRACT ACCOUNT PAID IN FULL                        *  75450000
T21265*                                                              *  75460000
T21265****************************************************************  75470000
T21265 6797F-WRITE-LIEN-WQ.                                             
T21265                                                                  
T21265     IF LS-CURR-WQ-ITEM = 50                                      
T21265        DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'                 
T21265        DISPLAY 'PROCESSING TERMINATED'                           
T21265        MOVE 16              TO RETURN-CODE                       
T21265     ELSE                                                         
T21265        ADD 1                TO LS-CURR-WQ-ITEM                   
T21265        SET WS-BILL-WQ-INDX  TO LS-CURR-WQ-ITEM                   
T21265     END-IF.                                                      
T21265     MOVE WS-VALUE-68        TO                                   
T21265             WS-CATEGORY-ID-WF(WS-BILL-WQ-INDX)                   
T21265     MOVE WS-PAR-N           TO                                   
T21265             WS-PRIORITY-WF(WS-BILL-WQ-INDX)                      
T21265     MOVE '4'                TO                                   
T21265             WS-ROUTE-CATEGORY-WF(WS-BILL-WQ-INDX)                
I01687     MOVE WS-PGRMNAME                                             
I01687       TO WS-CREATED-BY-WF (WS-BILL-WQ-INDX)                      
T21265     MOVE LS-INPUT-DATE      TO WS-LIEN-DATE-WQ                   
T21265     MOVE ZEROES             TO WS-LIEN-CNT-ITEM-ID               
T21265     MOVE WS-CNT-ITEM-ID-CT(WS-CNT-INDX)                          
T21265                             TO WS-LIEN-CNT-ITEM-ID               
T21265     MOVE +100               TO                                   
T21265             WS-COMMENTS-LEN-WF(WS-BILL-WQ-INDX)                  
T21265     MOVE WS-LIEN-WQ-COMMENT TO                                   
T21265             WS-COMMENTS-TEXT-WF(WS-BILL-WQ-INDX).                
T21265                                                                  
T21265 6797F-EXIT.                                                      
T21265      EXIT.                                                       
A02036*                                                                 75750000
A02036******************************************************************75760000
A02036*  DETERMINE IF FROM ACCOUNT IS FINAL BILLED                     *75770000
A02036******************************************************************75780000
A02036 7010-CHECK-FINAL-BILL.                                           
A02036*                                                                 75800000
A02036     EXEC SQL                                                     
A02036        SELECT                                                    
A02036              REPLACE(REPLACE(CONVERT(CHAR(26), COALESCE(
           ACCT_FINALED_DT,CIS.CHAR2TIMESTAMP(
              '2999-12-31-00.00.00.000000')), 121), ' ', '-'), ':', 
           '.')
A02036          INTO                                                    
A02036              :AT-ACCT-FINALED-DT                                 
A02036          FROM                                                    
A02036              CSS_ACCOUNT WITH(READUNCOMMITTED)                           
A02036         WHERE                                                    
A02036              ACCOUNT_NO = :AT-ACCT-XFER-FROM-LST                 
A02036                                                           
A02036     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ022
MFA-TR* MSQ029
MFA-TR* MSQ054
MFA-TR* MSQ061
MFA-TR*    EXEC SQL                                                     75810000
MFA-TR*       SELECT                                                    75820000
MFA-TR*             IFNULL(ACCT_FINALED_DT,'2999-12-31-00.00.00.000000')75830000
MFA-TR*         INTO                                                    75840000
MFA-TR*             :AT-ACCT-FINALED-DT                                 75850000
MFA-TR*         FROM                                                    75850100
MFA-TR*             CSS_ACCOUNT                                         75850200
MFA-TR*        WHERE                                                    75850300
MFA-TR*             ACCOUNT_NO = :AT-ACCT-XFER-FROM-LST                 75850400
MFA-TR*        WITH UR                                                  75850600
MFA-TR*    END-EXEC.                                                    75860000

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

A02036*                                                                 75870000
A02036     MOVE SQLCODE                    TO WS-ACTIVE-RETURN-CODE.    
A02036     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL OR NOT-FOUND      
A02036        IF AT-ACCT-FINALED-DT = '2999-12-31-00.00.00.000000'      
A02036           MOVE 'N'                  TO WS-ACCT-XFER-FINAL-BILLED 
A02036        ELSE                                                      
A02036           MOVE 'Y'                  TO WS-ACCT-XFER-FINAL-BILLED 
A02036        END-IF                                                    
A02036     ELSE                                                         
A02036        MOVE 'AT'                    TO WS-DB2-TABLE-ID           
A02036        MOVE 'SELECT'                TO WS-DB2-FUNCTION           
A02036        MOVE SQLCODE                 TO WS-DB2-RETURN-CODE        
A02036        MOVE '108'                   TO WS-DB2-MODULE-ID          
A02036        MOVE '7010'                  TO WS-DB2-PARAGRAPH          
A02036        MOVE AT-ACCT-XFER-FROM-LST   TO WS-DB2-KEY-1N             
A02036        MOVE 12 TO RETURN-CODE                                    
A02036        PERFORM 9900-SQL-ERROR       THRU 9900-EXIT               
A02036     END-IF.                                                      
A02036                                                                  
A02036 7010-EXIT.                                                       
A02036     EXIT.                                                        
      *                                                                 76040000
C26130 7011-OPEN-DW.                                                    
                                                                        
           EXEC SQL                                                     
              OPEN DELINQUENCY-CSR                                      
           END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

                                                                        
           MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
           IF WS-ACTIVE-RETURN-CODE NOT = SUCCESSFUL-CALL               
              MOVE 'C8'                 TO WS-DB2-TABLE-ID              
              MOVE 'OPEN'               TO WS-DB2-FUNCTION              
              MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
              MOVE '108'                TO WS-DB2-MODULE-ID             
              MOVE '7011'               TO WS-DB2-PARAGRAPH             
              MOVE WS-ACCOUNT-NO-AT     TO WS-DB2-KEY-1                 
              MOVE 12                   TO RETURN-CODE                  
              PERFORM 9900-SQL-ERROR THRU 9900-EXIT
           END-IF.                    
                                                                        
C26130 7011-EXIT.                                                       
           EXIT.                                                        
      /                                                                 76240000
C26130 7012-FETCH-DW.                                                   
                                                                        
           EXEC SQL                                                     
              FETCH DELINQUENCY-CSR                                     
                 INTO :C8-DELINQ-CD,                                    
                      :C8-DELINQ-VALUE,                                 
                      :C8-COMPANY-NO                                    
           END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

                                                                        
           MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
           IF WS-ACTIVE-RETURN-CODE NOT = SUCCESSFUL-CALL AND NOT-FOUND 
              MOVE 'C8'                 TO WS-DB2-TABLE-ID              
              MOVE 'FETCH'              TO WS-DB2-FUNCTION              
              MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
              MOVE '108'                TO WS-DB2-MODULE-ID             
              MOVE '7012'               TO WS-DB2-PARAGRAPH             
              MOVE 12 TO RETURN-CODE                                    
              PERFORM 9900-SQL-ERROR THRU 9900-EXIT
           END-IF.                    
                                                                        
C26130 7012-EXIT.                                                       
           EXIT.                                                        
      /                                                                 76460000
C26130 7014-CLOSE-DW.                                                   
                                                                        
           EXEC SQL                                                     
              CLOSE DELINQUENCY-CSR                                     
           END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

                                                                        
           MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
           IF WS-ACTIVE-RETURN-CODE NOT = SUCCESSFUL-CALL               
              MOVE 'C8'                 TO WS-DB2-TABLE-ID              
              MOVE 'CLOSE'              TO WS-DB2-FUNCTION              
              MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
              MOVE '108'                TO WS-DB2-MODULE-ID             
              MOVE '7014'               TO WS-DB2-PARAGRAPH             
              MOVE 12 TO RETURN-CODE                                    
              PERFORM 9900-SQL-ERROR THRU 9900-EXIT
           END-IF.                    
                                                                        
C26130 7014-EXIT.                                                       
           EXIT.                                                        
                                                                        
       7015-GET-NUMBER-OF-DAYS.                                         
           EXEC SQL                                                     
              SELECT
              CIS.DAYS( IIF(TRY_CONVERT(DATE, :WS-END-DATE
              ) IS NULL OR (PATINDEX('%.%', :WS-END-DATE
              ) <> 0) OR (LEN(:WS-END-DATE) <> 10), CIS.CHAR2DATE(
                                                           :WS-END-DATE
              ), CONVERT(DATE, :WS-END-DATE) ) ) -  CIS.DAYS( 
              IIF(TRY_CONVERT(DATE, :WS-START-DATE
              ) IS NULL OR (PATINDEX('%.%', :WS-START-DATE
              ) <> 0) OR (LEN(:WS-START-DATE) <> 10), CIS.CHAR2DATE(
                                                         :WS-START-DATE
              ), CONVERT(DATE, :WS-START-DATE) ) )
            INTO
              :WS-NUMBER-DAYS      
           END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ006
MFA-TR* MSQ029
MFA-TR*    EXEC SQL                                                     76670000
MFA-TR*       SET :WS-NUMBER-DAYS =                                     76680000
MFA-TR*                 DAYS(:WS-END-DATE) -  DAYS(:WS-START-DATE)      76690000
MFA-TR*    END-EXEC.                                                    76700000

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

           IF SQLCODE NOT = SUCCESSFUL-CALL                             
              MOVE 'MS'                 TO WS-DB2-TABLE-ID              
              MOVE 'SELECT'             TO WS-DB2-FUNCTION              
              MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
              MOVE '108'                TO WS-DB2-MODULE-ID             
              MOVE '7015'               TO WS-DB2-PARAGRAPH             
              MOVE WS-DATE-1            TO WS-DB2-KEY-1                 
              MOVE WS-DATE-2            TO WS-DB2-KEY-2                 
              MOVE 16 TO RETURN-CODE                                    
              PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
           END-IF.                                                      
       7015-EXIT.                                                       
           EXIT.                                                        
      /                                                                 76840000
C34569*                                                                 76850000
C34569******************************************************************76860000
C34569* 7016-GET-RATE-TYPE.                                            *76870000
C34569******************************************************************76880000
C34569*                                                                 76890000
C34569 7016-GET-RATE-TYPE.                                              
C34569*                                                                 76910000
C34569     EXEC SQL                                                     
C34569          SELECT                                                  
C34569                  'Y'                                             
C34569            INTO                                                  
C34569                  :WS-FIXED-RATE                                  
C34569            FROM                                                  
C34569                  CSS_ACCT_RTPK_AGR DF                            
C34569                 ,CSS_UTIL_ENVRNMT  UT                            
C34569                 ,CRM_RT_PKG_OPTION FI                            
C34569           WHERE                                                  
C34569                  DF.ACCOUNT_NO         = :DF-ACCOUNT-NO          
C34569             AND  DF.COMPANY_NO         = :DF-COMPANY-NO          
C34569             AND  DF.STATUS_CD          = 'A'                     
C34569             AND  DF.RT_PKG_OPT_SEQ_NO  = UT.RT_PKG_OPT_SEQ_NO    
C34569             AND  DF.CODE_UTIL_TYPE     = UT.CODE_UTIL_TYPE       
C34569             AND  DF.IC_NO              = UT.IC_NO                
C34569             AND  UT.ACCOUNT_NO         = :UT-ACCOUNT-NO          
C34569             AND  DF.OPTION_CD          = FI.OPTION_CD            
C34569             AND  DF.COMPANY_NO         = FI.COMPANY_NO           
C34569             AND  FI.OPT_CALC_TYPE_CD   = 'FP'                    
P00473             AND  FI.OPT_VSTART_TS     <= CIS.CURRENT$TIMESTAMP()       
P00473             AND  FI.OPT_VEND_TS       >= CIS.CURRENT$TIMESTAMP()       
P00473             AND  FI.PROC_STATUS_CD = 'AC'                        
C34569     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ028
MFA-TR*    EXEC SQL                                                     76920000
MFA-TR*         SELECT                                                  76930000
MFA-TR*                 'Y'                                             76940000
MFA-TR*           INTO                                                  76950000
MFA-TR*                 :WS-FIXED-RATE                                  76960000
MFA-TR*           FROM                                                  76970000
MFA-TR*                 CSS_ACCT_RTPK_AGR DF                            76980000
MFA-TR*                ,CSS_UTIL_ENVRNMT  UT                            76990000
MFA-TR*                ,CRM_RT_PKG_OPTION FI                            77000000
MFA-TR*          WHERE                                                  77010000
MFA-TR*                 DF.ACCOUNT_NO         = :DF-ACCOUNT-NO          77020000
MFA-TR*            AND  DF.COMPANY_NO         = :DF-COMPANY-NO          77030000
MFA-TR*            AND  DF.STATUS_CD          = 'A'                     77040000
MFA-TR*            AND  DF.RT_PKG_OPT_SEQ_NO  = UT.RT_PKG_OPT_SEQ_NO    77050000
MFA-TR*            AND  DF.CODE_UTIL_TYPE     = UT.CODE_UTIL_TYPE       77060000
MFA-TR*            AND  DF.IC_NO              = UT.IC_NO                77070000
MFA-TR*            AND  UT.ACCOUNT_NO         = :UT-ACCOUNT-NO          77080000
MFA-TR*            AND  DF.OPTION_CD          = FI.OPTION_CD                    
MFA-TR*            AND  DF.COMPANY_NO         = FI.COMPANY_NO                   
MFA-TR*            AND  FI.OPT_CALC_TYPE_CD   = 'FP'                            
MFA-TR*            AND  FI.OPT_VSTART_TS     <= CURRENT TIMESTAMP               
MFA-TR*            AND  FI.OPT_VEND_TS       >= CURRENT TIMESTAMP               
MFA-TR*            AND  FI.PROC_STATUS_CD = 'AC'                                
MFA-TR*    END-EXEC.                                                            

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

C34569*                                                                         
C34569     MOVE SQLCODE                        TO WS-ACTIVE-RETURN-CODE.
C34569*                                                                 77150000
C34569     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL OR NOT-FOUND      
C34569        NEXT SENTENCE                                             
C34569     ELSE                                                         
C34569        MOVE 'DF'                 TO WS-DB2-TABLE-ID              
C34569        MOVE 'SELECT'             TO WS-DB2-FUNCTION              
C34569        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
C34569        MOVE '108'                TO WS-DB2-MODULE-ID             
C34569        MOVE '7016'               TO WS-DB2-PARAGRAPH             
C34569        MOVE 12 TO RETURN-CODE                                    
C34569        PERFORM 9900-SQL-ERROR    THRU 9900-EXIT                  
C34569     END-IF.                                                      
C34569*                                                                 77270000
C34569 7016-EXIT.                                                       
C34569     EXIT.                                                        
C28085*                                                                 77300000
C28085 7019-SELECT-REG-PROFILE.                                         
C28085*                                                                 77320000
C28085     EXEC SQL                                                     
C28085        SELECT 'Y'                                                
C28085          INTO :WS-SEBR-ACCT                                      
C28085          FROM CSS_REG_PROFILE                                    
C28085         WHERE ACCOUNT_NO = :LR-ACCOUNT-NO                        
C28085     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

C28085*                                                                 77390000
C28085     MOVE SQLCODE                 TO WS-ACTIVE-RETURN-CODE        
C28085     IF WS-ACTIVE-RETURN-CODE EQUAL SUCCESSFUL-CALL OR NOT-FOUND  
C28085        CONTINUE                                                  
C28085     ELSE                                                         
C28085        MOVE 'LR'                 TO WS-DB2-TABLE-ID              
C28085        MOVE 'SELECT'             TO WS-DB2-FUNCTION              
C28085        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
C28085        MOVE '108'                TO WS-DB2-MODULE-ID             
C28085        MOVE '7019'               TO WS-DB2-PARAGRAPH             
C28085        MOVE LR-ACCOUNT-NO        TO WS-DB2-KEY-1                 
C28085        MOVE 16                   TO RETURN-CODE                  
C28085        PERFORM 9900-SQL-ERROR    THRU 9900-EXIT                  
C28085     END-IF.                                                      
C28085                                                                  
C28085 7019-EXIT.                                                       
C28085     EXIT.                                                        
C28085*                                                                 77560000
A35967******************************************************************77800000
A35967* 7021-CHECK-TOU-CUSTOMER                                        *77810000
A35967*     THIS PARAGRAPH CHECKS THE CSS_RATE_TOU_DEF TABLE TO SEE IF *77820000
A35967*     ACCOUNT HAS A TOU RATE.                                    *77830000
A35967******************************************************************77840000
A35967*                                                                 77850000
A35967 7021-CHECK-TOU-CUSTOMER.                                         
A35967*                                                                 77870000
A35967     EXEC SQL                                                     
A35967        SELECT TOP(1) 'Y'                                                
A35967          INTO :WS-TOU-EXISTS                                     
A35967        FROM CSS_RATE_TOU_DEF RJ                                  
A35967            ,CSS_UTIL_ENVRNMT UT                                  
A35967        WHERE UT.ACCOUNT_NO        = :UT-ACCOUNT-NO               
A35967        AND   RJ.CODE_UTIL_TYPE    = UT.CODE_UTIL_TYPE            
A35967        AND   RJ.RATE_PLAN_NO      = UT.RATE_PLAN_NO              
A35967        AND   RJ.VERSION_NO_CNTRL  =                              
A35967          (SELECT MAX(RT.VERSION_NO_CNTRL)                        
A35967           FROM CSS_RATE_CREATOR RT                               
A35967           WHERE RT.CODE_UTIL_TYPE = RJ.CODE_UTIL_TYPE            
A35967           AND   RT.RATE_PLAN_NO   = RJ.RATE_PLAN_NO              
A35967           AND   RT.CODE_STATUS NOT IN ('T')                      
A35967           AND   RT.FROM_EFFECTIVE_DT <= CAST(SYSDATETIMEOFFSET() 
           AS DATE))            
A35967                                              
P00251                                                      
A35967     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ003
MFA-TR* MSQ020
MFA-TR* MSQ028
MFA-TR*    EXEC SQL                                                     77880000
MFA-TR*       SELECT 'Y'                                                77890000
MFA-TR*         INTO :WS-TOU-EXISTS                                     77900000
MFA-TR*       FROM CSS_RATE_TOU_DEF RJ                                  77910000
MFA-TR*           ,CSS_UTIL_ENVRNMT UT                                  77920000
MFA-TR*       WHERE UT.ACCOUNT_NO        = :UT-ACCOUNT-NO               77930000
MFA-TR*       AND   RJ.CODE_UTIL_TYPE    = UT.CODE_UTIL_TYPE            77940000
MFA-TR*       AND   RJ.RATE_PLAN_NO      = UT.RATE_PLAN_NO              77950000
MFA-TR*       AND   RJ.VERSION_NO_CNTRL  =                              77960000
MFA-TR*         (SELECT MAX(RT.VERSION_NO_CNTRL)                        77970000
MFA-TR*          FROM CSS_RATE_CREATOR RT                               77980000
MFA-TR*          WHERE RT.CODE_UTIL_TYPE = RJ.CODE_UTIL_TYPE            77990000
MFA-TR*          AND   RT.RATE_PLAN_NO   = RJ.RATE_PLAN_NO              78000000
MFA-TR*          AND   RT.CODE_STATUS NOT IN ('T')                      78010000
MFA-TR*          AND   RT.FROM_EFFECTIVE_DT <= CURRENT DATE)            78020000
MFA-TR*          FETCH FIRST ROW ONLY                                   78030000
MFA-TR*          QUERYNO 7021                                           78031000
MFA-TR*    END-EXEC.                                                    78040000

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

A35967*                                                                 78050000
A35967     MOVE SQLCODE                 TO WS-ACTIVE-RETURN-CODE.       
A35967*                                                                 78070000
A35967     IF WS-ACTIVE-RETURN-CODE EQUAL SUCCESSFUL-CALL OR NOT-FOUND  
A35967        CONTINUE                                                  
A35967     ELSE                                                         
A35967        MOVE 'UT'                 TO WS-DB2-TABLE-ID              
A35967        MOVE 'SELECT'             TO WS-DB2-FUNCTION              
A35967        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
A35967        MOVE '108'                TO WS-DB2-MODULE-ID             
A35967        MOVE '7021'               TO WS-DB2-PARAGRAPH             
A35967        MOVE UT-ACCOUNT-NO        TO WS-DB2-KEY-1                 
A35967        MOVE 16                   TO RETURN-CODE                  
A35967        PERFORM 9900-SQL-ERROR    THRU 9900-EXIT                  
A35967     END-IF.                                                      
A35967*                                                                 78200000
A35967 7021-EXIT.                                                       
A35967     EXIT.                                                        
A35967*                                                                 78230000
P00251******************************************************************78231000
P00251* 7022-CHECK-COGEN-CUSTOMER                                      *78232000
P00251*     THIS PARAGRAPH CHECKS THE CSS_RATE_COMP_DEF TABLE TO SEE IF*78233000
P00251*     ACCOUNT IS COGENERATION CUSTOMER                           *78234000
P00251******************************************************************78235000
P00251*                                                                 78236000
P00251 7022-CHECK-COGEN-CUSTOMER.                                       
P00251*                                                                 78238000
P00251     EXEC SQL                                                     
P00251        SELECT TOP(1) 'Y'                                                
P00251          INTO :WS-COGEN-EXISTS                                   
P00251        FROM CSS_RATE_COMP_DEF J1 WITH(READUNCOMMITTED)                   
P00251            ,CSS_UTIL_ENVRNMT  UT WITH(READUNCOMMITTED)                   
P00251        WHERE UT.ACCOUNT_NO        = :UT-ACCOUNT-NO               
P00251        AND   J1.CODE_UTIL_TYPE    = UT.CODE_UTIL_TYPE            
P00251        AND   J1.RATE_PLAN_NO      = UT.RATE_PLAN_NO              
P00251        AND  (J1.BAL_FWD_CD        > ' '                          
P00251         OR   J1.CMPNT_ID_CD       = '60')                        
P00251        AND   J1.VERSION_NO_CNTRL  =                              
P00251          (SELECT MAX(RT.VERSION_NO_CNTRL)                        
P00251           FROM CSS_RATE_CREATOR RT WITH(READUNCOMMITTED)                 
P00251           WHERE RT.CODE_UTIL_TYPE = J1.CODE_UTIL_TYPE            
P00251           AND   RT.RATE_PLAN_NO   = J1.RATE_PLAN_NO              
P00251           AND   RT.CODE_STATUS    = 'A')                         
P00251                                       
P00251                                                      
P00251     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ003
MFA-TR* MSQ020
MFA-TR* MSQ022
MFA-TR*    EXEC SQL                                                     78239000
MFA-TR*       SELECT 'Y'                                                78239100
MFA-TR*         INTO :WS-COGEN-EXISTS                                   78239200
MFA-TR*       FROM CSS_RATE_COMP_DEF J1                                 78239300
MFA-TR*           ,CSS_UTIL_ENVRNMT  UT                                 78239400
MFA-TR*       WHERE UT.ACCOUNT_NO        = :UT-ACCOUNT-NO               78239500
MFA-TR*       AND   J1.CODE_UTIL_TYPE    = UT.CODE_UTIL_TYPE            78239600
MFA-TR*       AND   J1.RATE_PLAN_NO      = UT.RATE_PLAN_NO              78239700
MFA-TR*       AND  (J1.BAL_FWD_CD        > ' '                          78239800
MFA-TR*        OR   J1.CMPNT_ID_CD       = '60')                        78239900
MFA-TR*       AND   J1.VERSION_NO_CNTRL  =                              78240000
MFA-TR*         (SELECT MAX(RT.VERSION_NO_CNTRL)                        78240100
MFA-TR*          FROM CSS_RATE_CREATOR RT                               78240200
MFA-TR*          WHERE RT.CODE_UTIL_TYPE = J1.CODE_UTIL_TYPE            78240300
MFA-TR*          AND   RT.RATE_PLAN_NO   = J1.RATE_PLAN_NO              78240400
MFA-TR*          AND   RT.CODE_STATUS    = 'A')                         78240500
MFA-TR*          FETCH FIRST ROW ONLY WITH UR                           78240600
MFA-TR*          QUERYNO 7022                                           78240700
MFA-TR*    END-EXEC.                                                    78240800

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

P00251*                                                                 78240900
P00251     MOVE SQLCODE                 TO WS-ACTIVE-RETURN-CODE.       
P00251*                                                                 78241100
P00251     IF WS-ACTIVE-RETURN-CODE EQUAL SUCCESSFUL-CALL OR NOT-FOUND  
P00251        CONTINUE                                                  
P00251     ELSE                                                         
P00251        MOVE 'J1'                 TO WS-DB2-TABLE-ID              
P00251        MOVE 'SELECT'             TO WS-DB2-FUNCTION              
P00251        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
P00251        MOVE '108'                TO WS-DB2-MODULE-ID             
P00251        MOVE '7022'               TO WS-DB2-PARAGRAPH             
P00251        MOVE UT-ACCOUNT-NO        TO WS-DB2-KEY-1                 
P00251        MOVE 16                   TO RETURN-CODE                  
P00251        PERFORM 9900-SQL-ERROR    THRU 9900-EXIT                  
P00251     END-IF.                                                      
P00251*                                                                 78242400
P00251 7022-EXIT.                                                       
P00251     EXIT.                                                        
P00251*                                                                 78242700
C28085 7026-CHECK-CREDIT-BAL.                                           
C28085*                                                                 78250000
C28085     EXEC SQL                                                     
C28085         SELECT SUM(AC.AMT_UNUSED_CR)                             
C28085           INTO :WS-CREDIT-BALANCE :WS-NULL-ID-1                  
C28085           FROM CSS_AR_CNTL AC                                    
C28085          WHERE AC.ACCOUNT_NO     = :AC-ACCOUNT-NO                
C28085            AND AC.PYMT_PRIORITY_LVL = 70                         
C28085            AND AC.ITEM_ID IN (1,2)                               
C28085     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

C28085*                                                                 78340000
C28085     MOVE SQLCODE                 TO WS-ACTIVE-RETURN-CODE.       
C28085     IF WS-ACTIVE-RETURN-CODE EQUAL SUCCESSFUL-CALL OR NOT-FOUND  
C28085        CONTINUE                                                  
C28085     ELSE                                                         
C28085        MOVE 'AC'                 TO WS-DB2-TABLE-ID              
C28085        MOVE 'SELECT'             TO WS-DB2-FUNCTION              
C28085        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
C28085        MOVE '108'                TO WS-DB2-MODULE-ID             
C28085        MOVE '7026'               TO WS-DB2-PARAGRAPH             
C28085        MOVE AC-ACCOUNT-NO        TO WS-DB2-KEY-1                 
C28085        MOVE 16                   TO RETURN-CODE                  
C28085        PERFORM 9900-SQL-ERROR    THRU 9900-EXIT                  
C28085     END-IF.                                                      
C28085                                                                  
C28085*                                                                 78490000
C28085 7026-EXIT.                                                       
C28085     EXIT.                                                        
      *                                                                 78740000
T14478 7125-SELECT-AR-TRANS-HIST.                                       
T14478     EXEC SQL                                                     
T14478        SELECT REPLACE(REPLACE(CONVERT(CHAR(26), TRANS_HIST_SEQ_NO
           , 121), ' ', '-'), ':', '.') TRANS_HIST_SEQ_NO                      
T14478          INTO :AR-TRANS-HIST-SEQ-NO                              
T14478          FROM CSS_AR_TRANS_HIST                                  
T14478         WHERE ACCOUNT_NO     = :AR-ACCOUNT-NO                    
T14478           AND CODE_TRAN_TYPE = 'B'                               
T14478           AND DATE_TRANS     =                                   
T14478               ( SELECT MIN (DATE_TRANS)                          
T14478                   FROM CSS_AR_TRANS_HIST                         
T14478                  WHERE CODE_TRAN_TYPE = 'B'                      
T14478                    AND ACCOUNT_NO     = :AR-ACCOUNT-NO           
T14478                    AND DATE_TRANS     > IIF(TRY_CONVERT(DATE, 
                                                         :AR-DATE-TRANS
              ) IS NULL OR (PATINDEX('%.%', :AR-DATE-TRANS
              ) <> 0) OR (LEN(:AR-DATE-TRANS) <> 10), CIS.CHAR2DATE(
                                                         :AR-DATE-TRANS
              ), CONVERT(DATE, :AR-DATE-TRANS) ) )         
T14478     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ054
MFA-TR* MSQ061
MFA-TR*    EXEC SQL                                                     78760000
MFA-TR*       SELECT TRANS_HIST_SEQ_NO                                  78770000
MFA-TR*         INTO :AR-TRANS-HIST-SEQ-NO                              78780000
MFA-TR*         FROM CSS_AR_TRANS_HIST                                  78790000
MFA-TR*        WHERE ACCOUNT_NO     = :AR-ACCOUNT-NO                    78800000
MFA-TR*          AND CODE_TRAN_TYPE = 'B'                               78810000
MFA-TR*          AND DATE_TRANS     =                                   78820000
MFA-TR*              ( SELECT MIN (DATE_TRANS)                          78830000
MFA-TR*                  FROM CSS_AR_TRANS_HIST                         78840000
MFA-TR*                 WHERE CODE_TRAN_TYPE = 'B'                      78850000
MFA-TR*                   AND ACCOUNT_NO     = :AR-ACCOUNT-NO           78860000
MFA-TR*                   AND DATE_TRANS     > :AR-DATE-TRANS )         78870000
MFA-TR*    END-EXEC.                                                    78880000

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T14478                                                                  
T14478     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
T14478     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
T14478                                    OR NOT-FOUND                  
T14478         NEXT SENTENCE                                            
T14478     ELSE                                                         
T14478        MOVE 'AR'                 TO WS-DB2-TABLE-ID              
T14478        MOVE 'SELECT'             TO WS-DB2-FUNCTION              
T14478        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
T14478        MOVE '108'                TO WS-DB2-MODULE-ID             
T14478        MOVE '7125'               TO WS-DB2-PARAGRAPH             
T14478        MOVE AR-ACCOUNT-NO        TO WS-DB2-KEY-1N                
T14478        MOVE AR-DATE-TRANS        TO WS-DB2-KEY-2N                
T14478        MOVE 12 TO RETURN-CODE                                    
T14478        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
T14478     END-IF.                                                      
T14478                                                                  
T14478 7125-EXIT.                                                       
T14478     EXIT.                                                        
T14478*                                                                 79080000
      *                                                                 79090000
T14478 7127-OPEN-AR-TRANS-HST-DET.                                      
T14478     EXEC SQL                                                     
T14478        OPEN TRN_HST_DET_CURSOR                                   
T14478     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T14478                                                                  
T14478     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
T14478     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
T14478        NEXT SENTENCE                                             
T14478     ELSE                                                         
T14478        MOVE 'AU'                 TO WS-DB2-TABLE-ID              
T14478        MOVE 'OPEN  '             TO WS-DB2-FUNCTION              
T14478        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
T14478        MOVE '108'                TO WS-DB2-MODULE-ID             
T14478        MOVE '7127'               TO WS-DB2-PARAGRAPH             
T14478        MOVE AU-ACCOUNT-NO        TO WS-DB2-KEY-1N                
T14478        MOVE 12 TO RETURN-CODE                                    
T14478        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
T14478     END-IF.                                                      
T14478 7127-EXIT.                                                       
T14478     EXIT.                                                        
T14478*                                                                 79300000
T14478 7128-FETCH-AR-TRANS-HST-DET.                                     
T14478     EXEC SQL                                                     
T14478        FETCH TRN_HST_DET_CURSOR INTO                             
T14478          :AU-AMT-POSTED                                          
T14478     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T14478                                                                  
T14478     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
T14478     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
T14478                                    OR NOT-FOUND                  
T14478         NEXT SENTENCE                                            
T14478     ELSE                                                         
T14478        MOVE 'AU'                 TO WS-DB2-TABLE-ID              
T14478        MOVE 'FETCH '             TO WS-DB2-FUNCTION              
T14478        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
T14478        MOVE '108'                TO WS-DB2-MODULE-ID             
T14478        MOVE '7128'               TO WS-DB2-PARAGRAPH             
T14478        MOVE AU-ACCOUNT-NO        TO WS-DB2-KEY-1N                
T14478        MOVE 12 TO RETURN-CODE                                    
T14478        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
T14478     END-IF.                                                      
T14478                                                                  
T14478 7128-EXIT.                                                       
T14478     EXIT.                                                        
T14478*                                                                 79540000
T14478 7129-CLOSE-AR-TRANS-HST-DET.                                     
T14478     EXEC SQL                                                     
T14478        CLOSE TRN_HST_DET_CURSOR                                  
T14478     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T14478                                                                  
T14478     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
T14478     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
T14478        NEXT SENTENCE                                             
T14478     ELSE                                                         
T14478        MOVE 'AU'                 TO WS-DB2-TABLE-ID              
T14478        MOVE 'CLOSE '             TO WS-DB2-FUNCTION              
T14478        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
T14478        MOVE '108'                TO WS-DB2-MODULE-ID             
T14478        MOVE '7129'               TO WS-DB2-PARAGRAPH             
T14478        MOVE AU-ACCOUNT-NO        TO WS-DB2-KEY-1N                
T14478        MOVE 12 TO RETURN-CODE                                    
T14478        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
T14478     END-IF.                                                      
T14478 7129-EXIT.                                                       
T14478     EXIT.                                                        
      *                                                                 79750000
      ******************************************************            79760000
PCR212* RETURN THE NEW ELEC-REV-ALLOC-PCT FIELD FROM THE   *            79770000
PCR212* LOCAL_OFFICE TABLE.                                *            79780000
      ******************************************************            79790000
PCR212 7400-SELECT-LOCOFC-FIX-FACTOR.                                   
                                                                        
PCR212     EXEC SQL                                                     
PCR212       SELECT ELEC_REV_ALLOC_PCT,                                 
A35648              DISTRICT_NO                                         
PCR212         INTO :B1-ELEC-REV-ALLOC-PCT,                             
A35648              :B1-DISTRICT-NO                                     
PCR212         FROM CSS_LOCAL_OFFICE                                    
PCR212        WHERE COMPANY_NO   = :B1-COMPANY-NO                       
PCR212          AND LOCAL_OFFICE = :B1-LOCAL-OFFICE                     
PCR212     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

                                                                        
PCR212     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
PCR212     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
PCR212        NEXT SENTENCE                                             
PCR212     ELSE                                                         
PCR212        MOVE 'B1'                  TO WS-DB2-TABLE-ID             
PCR212        MOVE 'SELECT'              TO WS-DB2-FUNCTION             
PCR212        MOVE SQLCODE               TO WS-DB2-RETURN-CODE          
PCR212        MOVE '108'                 TO WS-DB2-MODULE-ID            
PCR212        MOVE '7400'                TO WS-DB2-PARAGRAPH            
PCR212        MOVE B1-COMPANY-NO         TO WS-DB2-KEY-1                
PCR212        MOVE B1-LOCAL-OFFICE       TO WS-DB2-KEY-2                
PCR212        MOVE 12 TO RETURN-CODE                                    
PCR212        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
PCR212     END-IF.                                                      
                                                                        
PCR212 7400-EXIT.                                                       
PCR212     EXIT.                                                        
                                                                        
C26130******************************************************************80100000
C26130*  DETERMINE IF STATUS CODE OF M OR N EXISTS.                    *80110000
C26130******************************************************************80120000
C26130 7443-SELECT-BANK-EFT.                                            
           MOVE 'N' TO WS-ROW-EXISTS.                                   
           EXEC SQL                                                     
               SELECT DISTINCT ('Y')                                    
                   INTO :WS-ROW-EXISTS                                  
               FROM CSS_BANK_EFT                                        
               WHERE ACCOUNT_NO  = :BE-ACCOUNT-NO                       
                 AND STATUS_CODE IN ('M', 'N')                          
           END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

           MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
           IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL OR NOT-FOUND      
              NEXT SENTENCE                                             
           ELSE                                                         
              MOVE 'BE'                    TO WS-DB2-TABLE-ID           
              MOVE 'SELECT'                TO WS-DB2-FUNCTION           
              MOVE SQLCODE                 TO WS-DB2-RETURN-CODE        
              MOVE '108'                   TO WS-DB2-MODULE-ID          
              MOVE '7443'                  TO WS-DB2-PARAGRAPH          
              MOVE BE-ACCOUNT-NO           TO WS-DB2-KEY-1N             
              MOVE 12 TO RETURN-CODE                                    
              PERFORM 9900-SQL-ERROR     THRU 9900-EXIT
           END-IF.                
                                                                        
C26130 7443-EXIT.                                                       
           EXIT.                                                        
      *                                                                 80370000
C26130******************************************************************80380000
C26130*  DETERMINE IF CASH ONLY FLAG = 'Y' ON CSS_CREDIT_PROFILE       *80390000
C26130******************************************************************80400000
C26130 7445-SELECT-CREDIT-PROFILE.                                      
           MOVE 'N' TO WS-ROW-EXISTS.                                   
           EXEC SQL                                                     
               SELECT DISTINCT ('Y')                                    
                   INTO :WS-ROW-EXISTS                                  
               FROM CSS_CREDIT_PROFILE                                  
               WHERE ACCOUNT_NO  = :CZ-ACCOUNT-NO                       
                 AND CASH_ONLY_FL = 'Y'                                 
           END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

           MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
           IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL OR NOT-FOUND      
              NEXT SENTENCE                                             
           ELSE                                                         
              MOVE 'CZ'                    TO WS-DB2-TABLE-ID           
              MOVE 'SELECT'                TO WS-DB2-FUNCTION           
              MOVE SQLCODE                 TO WS-DB2-RETURN-CODE        
              MOVE '108'                   TO WS-DB2-MODULE-ID          
              MOVE '7445'                  TO WS-DB2-PARAGRAPH          
              MOVE CZ-ACCOUNT-NO           TO WS-DB2-KEY-1N             
              MOVE 12 TO RETURN-CODE                                    
              PERFORM 9900-SQL-ERROR     THRU 9900-EXIT
           END-IF.                
                                                                        
C26130 7445-EXIT.                                                       
           EXIT.                                                        
C26130******************************************************************80650000
C26130*  DETERMINE IF 1-TIME CONTRACT EXISTS.                          *80660000
C26130******************************************************************80670000
C26130 7448-SELECT-CONTRACT.                                            
           MOVE 'N' TO WS-ROW-EXISTS.                                   
           EXEC SQL                                                     
               SELECT DISTINCT ('Y')                                    
                   INTO :WS-ROW-EXISTS                                  
               FROM CSS_CONTRACT                                        
               WHERE ACCOUNT_NO  = :CT-ACCOUNT-NO                       
                 AND CODE_BILL_TYPE = 'A'                               
                 AND CNT_STATUS_CD  = 'B'                               
           END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

           MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
           IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL OR NOT-FOUND      
              NEXT SENTENCE                                             
           ELSE                                                         
              MOVE 'CT'                    TO WS-DB2-TABLE-ID           
              MOVE 'SELECT'                TO WS-DB2-FUNCTION           
              MOVE SQLCODE                 TO WS-DB2-RETURN-CODE        
              MOVE '108'                   TO WS-DB2-MODULE-ID          
              MOVE '7448'                  TO WS-DB2-PARAGRAPH          
              MOVE CT-ACCOUNT-NO           TO WS-DB2-KEY-1N             
              MOVE 12 TO RETURN-CODE                                    
              PERFORM 9900-SQL-ERROR     THRU 9900-EXIT
           END-IF.                
                                                                        
C26130 7448-EXIT.                                                       
           EXIT.                                                        
                                                                        
T28021******************************************************************80940000
T28021*  DETERMINE IF THE CONTRACT IS PENDING.                         *80950000
T28021******************************************************************80960000
T28021 7449-SELECT-CONTRACT-PEND.                                       
T28021     MOVE 'N' TO WS-ROW-EXISTS.                                   
T28021     EXEC SQL                                                     
T28021         SELECT CNT_STATUS_CD                                     
T28021             INTO :WS-CNT-STATUS-CD                               
T28021         FROM CSS_CONTRACT                                        
T28021         WHERE ACCOUNT_NO        = :CT-ACCOUNT-NO                 
T28021           AND PYMT_PRIORITY_LVL = :CT-PYMT-PRIORITY-LVL          
T28021           AND CNT_ITEM_ID       = :CT-CNT-ITEM-ID                
T28021     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T28021     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
T28021     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL OR NOT-FOUND      
T28021        NEXT SENTENCE                                             
T28021     ELSE                                                         
T28021        MOVE 'CT'                    TO WS-DB2-TABLE-ID           
T28021        MOVE 'SELECT'                TO WS-DB2-FUNCTION           
T28021        MOVE SQLCODE                 TO WS-DB2-RETURN-CODE        
T28021        MOVE '108'                   TO WS-DB2-MODULE-ID          
T28021        MOVE '7449'                  TO WS-DB2-PARAGRAPH          
T28021        MOVE CT-ACCOUNT-NO           TO WS-DB2-KEY-1N             
T28021        MOVE 12 TO RETURN-CODE                                    
T28021        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT
           END-IF.                
T28021                                                                  
T28021 7449-EXIT.                                                       
T28021     EXIT.                                                        
                                                                        
T21512 7450-SELECT-DISTRICT-NO.                                         
T21512                                                                  
T21512     EXEC SQL                                                     
T21512       SELECT DISTRICT_NO                                         
T21512         INTO :B1-DISTRICT-NO                                     
T21512         FROM CSS_LOCAL_OFFICE                                    
T21512        WHERE COMPANY_NO   = :B1-COMPANY-NO                       
T21512          AND LOCAL_OFFICE = :B1-LOCAL-OFFICE                     
T21512     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T21512                                                                  
T21512     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
T21512     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
T21512        NEXT SENTENCE                                             
T21512     ELSE                                                         
T21512        MOVE 'B1'                  TO WS-DB2-TABLE-ID             
T21512        MOVE 'SELECT'              TO WS-DB2-FUNCTION             
T21512        MOVE SQLCODE               TO WS-DB2-RETURN-CODE          
T21512        MOVE '108'                 TO WS-DB2-MODULE-ID            
T21512        MOVE '7450'                TO WS-DB2-PARAGRAPH            
T21512        MOVE B1-COMPANY-NO         TO WS-DB2-KEY-1                
T21512        MOVE B1-LOCAL-OFFICE       TO WS-DB2-KEY-2                
T21512        MOVE 12 TO RETURN-CODE                                    
T21512        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
T21512     END-IF.                                                      
T21512                                                                  
T21512 7450-EXIT.                                                       
T21512     EXIT.                                                        
                                                                        
      **********************************************************        81510000
PCR393* RETRIEVE THE ARREARS AMOUNT LIMIT FROM CSS_DELINQUENCY *        81520000
PCR393* RATHER THAN USING HARD-CODED VALUES.                   *        81530000
      **********************************************************        81540000
PCR393 7500-SELECT-DELINQUENCY.                                         
                                                                        
PCR393     EXEC SQL                                                     
PCR393       SELECT DELINQ_VALUE                                        
C23501         INTO :C8-DELINQ-VALUE                                    
PCR393         FROM CSS_DELINQUENCY                                     
PCR393        WHERE DELINQ_CD    = :C8-DELINQ-CD                        
C23501          AND COMPANY_NO   = :C8-COMPANY-NO                       
PCR393     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

                                                                        
PCR393     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
PCR393     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
PCR393        NEXT SENTENCE                                             
PCR393     ELSE                                                         
PCR393        MOVE 'C8'                  TO WS-DB2-TABLE-ID             
PCR393        MOVE 'SELECT'              TO WS-DB2-FUNCTION             
PCR393        MOVE SQLCODE               TO WS-DB2-RETURN-CODE          
PCR393        MOVE '108'                 TO WS-DB2-MODULE-ID            
PCR393        MOVE '7500'                TO WS-DB2-PARAGRAPH            
PCR393        MOVE C8-DELINQ-CD          TO WS-DB2-KEY-1                
C23501        MOVE C8-COMPANY-NO         TO WS-DB2-KEY-2                
PCR393        MOVE 12 TO RETURN-CODE                                    
PCR393        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
PCR393     END-IF.                                                      
                                                                        
PCR393 7500-EXIT.                                                       
PCR393     EXIT.                                                        
                                                                        
T33192**********************************************************        81830000
T33192* RETRIEVE THE CONTRACT NAME FROM CSS_CONTRACT TO PASS   *        81840000
T33192* IN CONTRACT COPYBOOK FOR BILL PRINT                    *        81850000
T33192**********************************************************        81860000
T33192 7510-SELECT-CONTRACT-NAME.                                       
T33192                                                                  
T33192     EXEC SQL                                                     
T33192       SELECT CNT_NAME_DESC                                       
T33192         INTO :K6-CNT-NAME-DESC                                   
T33192         FROM CSS_CONTRACT_INFO                                   
T33192        WHERE CNT_NAME_CD  = :K6-CNT-NAME-CD                      
T33192          AND COMPANY_NO   = :K6-COMPANY-NO                       
T33192     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

T33192                                                                  
T33192     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
T33192     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
T33192        NEXT SENTENCE                                             
T33192     ELSE                                                         
T33192        MOVE 'C8'                  TO WS-DB2-TABLE-ID             
T33192        MOVE 'SELECT'              TO WS-DB2-FUNCTION             
T33192        MOVE SQLCODE               TO WS-DB2-RETURN-CODE          
T33192        MOVE '108'                 TO WS-DB2-MODULE-ID            
T33192        MOVE '7510'                TO WS-DB2-PARAGRAPH            
T33192        MOVE K6-CNT-NAME-CD        TO WS-DB2-KEY-1                
T33192        MOVE K6-COMPANY-NO         TO WS-DB2-KEY-2                
T33192        MOVE 12 TO RETURN-CODE                                    
T33192        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
T33192     END-IF.                                                      
T33192                                                                  
T33192 7510-EXIT.                                                       
T33192     EXIT.                                                        
                                                                        
C34216****************************************************************  82150000
C34216**    7565-SELECT-EPP-ARREARS.                                **  82160000
C34216** SELECTS EPP ARREARS AMOUNT                                 **  82170000
C34216****************************************************************  82180000
C34216 7565-SELECT-EPP-ARREARS.                                         
C34216     EXEC SQL                                                     
C34216         SELECT AC.AMT_AR_DAY_00                                  
C34216               ,AC.AMT_AR_DAY_30                                  
C34216               ,AC.AMT_AR_DAY_60                                  
C34216               ,AC.AMT_AR_DAY_90                                  
C34216               ,AC.AMT_UNUSED_CR                                  
C34216           INTO :AC-AMT-AR-DAY-00 :WS-NULL-IND-00                 
C34216               ,:AC-AMT-AR-DAY-30 :WS-NULL-IND-30                 
C34216               ,:AC-AMT-AR-DAY-60 :WS-NULL-IND-60                 
C34216               ,:AC-AMT-AR-DAY-90 :WS-NULL-IND-90                 
C34216               ,:AC-AMT-UNUSED-CR :WS-NULL-IND-UCR                
C34216           FROM CSS_AR_CNTL  AC                                   
C34216          WHERE AC.ACCOUNT_NO        = :AC-ACCOUNT-NO             
C34216            AND (AC.PYMT_PRIORITY_LVL = 50                        
C34216            AND AC.ITEM_ID = 1)                                   
C34216     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

C34216                                                                  
C34216     IF SQLCODE EQUAL SUCCESSFUL-CALL OR NOT-FOUND                
C34216        IF WS-NULL-IND-00  = -1 AND                               
C34216           WS-NULL-IND-30  = -1 AND                               
C34216           WS-NULL-IND-60  = -1 AND                               
C34216           WS-NULL-IND-90  = -1 AND                               
C34216           WS-NULL-IND-UCR = -1                                   
C34216           MOVE 0 TO AC-AMT-AR-DAY-00                             
C34216                     AC-AMT-AR-DAY-30                             
C34216                     AC-AMT-AR-DAY-60                             
C34216                     AC-AMT-AR-DAY-90                             
C34216                     AC-AMT-UNUSED-CR                             
C34216        END-IF                                                    
C34216     ELSE                                                         
C34216        MOVE 'AC'                    TO WS-DB2-TABLE-ID           
C34216        MOVE 'SELECT'                TO WS-DB2-FUNCTION           
C34216        MOVE SQLCODE                 TO WS-DB2-RETURN-CODE        
C34216        MOVE '108'                   TO WS-DB2-MODULE-ID          
C34216        MOVE '7565'                  TO WS-DB2-PARAGRAPH          
C34216        MOVE AC-ACCOUNT-NO           TO WS-DB2-KEY-1N             
C34216        MOVE 12                      TO RETURN-CODE               
C34216        PERFORM 9900-SQL-ERROR       THRU 9900-EXIT               
C34216     END-IF.                                                      
C34216                                                                  
C34216 7565-EXIT.                                                       
C34216     EXIT.                                                        
                                                                        
ACT109****************************************************************  82150000
ACT109**    7570-SET-BBP-CUTOFF                                         82160000
ACT109** SELECTS BBP CUTOFF DATE                                    **  82170000
ACT109****************************************************************  82180000
ACT109 7570-SET-BBP-CUTOFF.                                             
ACT109                                                                  
ACT109     EXEC SQL                                                     
ACT109          SELECT
              DATEADD( MONTH, -2, IIF(TRY_CONVERT(DATE, :WS-BBP-DATE
              ) IS NULL OR (PATINDEX('%.%', :WS-BBP-DATE
              ) <> 0) OR (LEN(:WS-BBP-DATE) <> 10), CIS.CHAR2DATE(
                                                           :WS-BBP-DATE
              ), CONVERT(DATE, :WS-BBP-DATE) ) )
            INTO
              :WS-BBP-CUTOFF-DT   
ACT109     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ006
MFA-TR* MSQ029
MFA-TR* MSQ044
MFA-TR*    EXEC SQL                                                             
MFA-TR*         SET :WS-BBP-CUTOFF-DT = DATE(:WS-BBP-DATE) - 2 MONTHS           
MFA-TR*    END-EXEC.                                                            

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

ACT109                                                                  
ACT109     MOVE SQLCODE                   TO WS-ACTIVE-RETURN-CODE      
ACT109                                                                  
ACT109     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
ACT109        NEXT SENTENCE                                             
ACT109     ELSE                                                         
ACT109        MOVE '  '                 TO WS-DB2-TABLE-ID              
ACT109        MOVE 'SET'                TO WS-DB2-FUNCTION              
ACT109        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
ACT109        MOVE '108'                TO WS-DB2-MODULE-ID             
ACT109        MOVE '7570'               TO WS-DB2-PARAGRAPH             
ACT109        MOVE WS-ACCOUNT-NO-AT     TO WS-DB2-KEY-1N                
ACT109        MOVE 12 TO RETURN-CODE                                    
ACT109        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
ACT109     END-IF.                                                      
ACT109                                                                  
ACT109 7570-EXIT.                                                       
ACT109      EXIT.                                                       
ACT109****************************************************************  82150000
ACT109**    7580-CHECK-BBP-DROP.                                        82160000
ACT109** CHECKS THAT ACOUNT DROPPED FROM BBP IN LAST 2 MONTHS       **  82170000
ACT109****************************************************************  82180000
ACT109 7580-CHECK-BBP-DROP.                                             
ACT109                                                                  
ACT109     EXEC SQL                                                     
ACT109          SELECT TOP(1) 'Y'                                              
ACT109            INTO                                                  
ACT109                 :WS-BBP-DROP-EXISTS                              
ACT109            FROM                                                  
ACT109                 CSS_BUDGET_HIST BH WITH(READUNCOMMITTED)                 
ACT109           WHERE                                                  
ACT109                 BH.ACCOUNT_NO         = :BH-ACCOUNT-NO           
ACT109             AND BH.CHANGE_REASON      = 'D'                      
ACT109             AND CIS.SUBSTR3(BH.REMARKS,1,30) =                        
ACT109                 'AUTOMATICALLY DROPPED FROM EPP'                 
ACT109             AND CAST(BH.LAST_UPDATE_TS AS DATE) >= 
              IIF(TRY_CONVERT(DATE, :WS-BBP-CUTOFF-DT
              ) IS NULL OR (PATINDEX('%.%', :WS-BBP-CUTOFF-DT
              ) <> 0) OR (LEN(:WS-BBP-CUTOFF-DT) <> 10), CIS.CHAR2DATE(
                                                      :WS-BBP-CUTOFF-DT
              ), CONVERT(DATE, :WS-BBP-CUTOFF-DT) )     
ACT109                                       
ACT109                                                      
ACT109     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ003
MFA-TR* MSQ020
MFA-TR* MSQ022
MFA-TR* MSQ029
MFA-TR* MSQ054
MFA-TR*    EXEC SQL                                                             
MFA-TR*         SELECT                                                          
MFA-TR*                'Y'                                                      
MFA-TR*           INTO                                                          
MFA-TR*                :WS-BBP-DROP-EXISTS                                      
MFA-TR*           FROM                                                          
MFA-TR*                CSS_BUDGET_HIST BH                                       
MFA-TR*          WHERE                                                          
MFA-TR*                BH.ACCOUNT_NO         = :BH-ACCOUNT-NO                   
MFA-TR*            AND BH.CHANGE_REASON      = 'D'                              
MFA-TR*            AND SUBSTR(BH.REMARKS,1,30) =                                
MFA-TR*                'AUTOMATICALLY DROPPED FROM EPP'                         
MFA-TR*            AND DATE(BH.LAST_UPDATE_TS) >= :WS-BBP-CUTOFF-DT             
MFA-TR*         FETCH FIRST ROW ONLY WITH UR                                    
MFA-TR*        QUERYNO 7580                                                     
MFA-TR*    END-EXEC.                                                            

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

ACT109                                                                  
ACT109     MOVE SQLCODE                   TO WS-ACTIVE-RETURN-CODE      
ACT109                                                                  
ACT109     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL OR         
ACT109                                       NOT-FOUND                  
ACT109        NEXT SENTENCE                                             
ACT109     ELSE                                                         
ACT109        MOVE 'BH'                 TO WS-DB2-TABLE-ID              
ACT109        MOVE 'SELECT'             TO WS-DB2-FUNCTION              
ACT109        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
ACT109        MOVE '108'                TO WS-DB2-MODULE-ID             
ACT109        MOVE '7580'               TO WS-DB2-PARAGRAPH             
ACT109        MOVE BH-ACCOUNT-NO        TO WS-DB2-KEY-1N                
ACT109        MOVE WS-BBP-CUTOFF-DT     TO WS-DB2-KEY-2N                
ACT109        MOVE 12 TO RETURN-CODE                                    
ACT109        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
ACT109     END-IF.                                                      
ACT109                                                                  
ACT109 7580-EXIT.                                                       
ACT109      EXIT.                                                       
                                                                        
P00794**********************************************************                
P00794* OPEN PSNC-TAX-RATES                                                     
P00794**********************************************************                
P00794 7581-OPEN-PSNC-TAX-RATES.                                        
P00794                                                                  
P00794     EXEC SQL                                                     
P00794        OPEN PSNC-TAX-RATES                                       
P00794     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

P00794                                                                  
P00794     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
P00794     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
P00794        NEXT SENTENCE                                             
P00794     ELSE                                                         
P00794        MOVE 'TR'                 TO WS-DB2-TABLE-ID              
P00794        MOVE 'OPEN  '             TO WS-DB2-FUNCTION              
P00794        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
P00794        MOVE '108'                TO WS-DB2-MODULE-ID             
P00794        MOVE '7581'               TO WS-DB2-PARAGRAPH             
P00794        MOVE 12 TO RETURN-CODE                                    
P00794        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
P00794     END-IF.                                                      
P00794                                                                  
P00794 7581-EXIT.                                                       
P00794      EXIT.                                                       
                                                                        
P00794**********************************************************                
P00794* FETCH PSNC-TAX-RATES                                                    
P00794**********************************************************                
                                                                        
P00794 7582-FETCH-PSNC-TAX-RATES.                                       
P00794                                                                  
P00794     EXEC SQL                                                     
P00794        FETCH PSNC-TAX-RATES                                      
P00794         INTO :TR-TAX-CNTRL-NO                                    
P00794             ,:TR-DETAIL-ID                                       
P00794             ,:TR-TAX-RATE                                        
P00794     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

P00794                                                                  
P00794     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
P00794     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL OR         
P00794                                       NOT-FOUND                  
P00794        NEXT SENTENCE                                             
P00794     ELSE                                                         
P00794        MOVE 'TR'                 TO WS-DB2-TABLE-ID              
P00794        MOVE 'FETCH '             TO WS-DB2-FUNCTION              
P00794        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
P00794        MOVE '108'                TO WS-DB2-MODULE-ID             
P00794        MOVE '7582'               TO WS-DB2-PARAGRAPH             
P00794        MOVE 12 TO RETURN-CODE                                    
P00794        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
P00794     END-IF.                                                      
P00794                                                                  
P00794 7582-EXIT.                                                       
P00794      EXIT.                                                       
                                                                        
P00794**********************************************************                
P00794* CLOSE PSNC-TAX-RATES                                                    
P00794**********************************************************                
P00794 7583-CLOSE-PSNC-TAX-RATES.                                       
P00794                                                                  
P00794     EXEC SQL                                                     
P00794        CLOSE PSNC-TAX-RATES                                      
P00794     END-EXEC.                                                    

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

P00794                                                                  
P00794     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
P00794     IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
P00794        NEXT SENTENCE                                             
P00794     ELSE                                                         
P00794        MOVE 'TR'                 TO WS-DB2-TABLE-ID              
P00794        MOVE 'CLOSE '             TO WS-DB2-FUNCTION              
P00794        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
P00794        MOVE '108'                TO WS-DB2-MODULE-ID             
P00794        MOVE '7583'               TO WS-DB2-PARAGRAPH             
P00794        MOVE 12 TO RETURN-CODE                                    
P00794        PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
P00794     END-IF.                                                      
P00794                                                                  
P00794 7583-EXIT.                                                       
P00794      EXIT.                                                       
                                                                        
      **********************************************************        82640000
      **  8010-UPDATE-CONTRACT.                              ***        82650000
      **                                                     ***        82660000
      **********************************************************        82670000
       8010-UPDATE-CONTRACT.                                            
                                                                        
           EXEC SQL                                                     
             UPDATE CSS_CONTRACT                                        
               SET AMT_DEF_INTEREST = :CT-AMT-DEF-INTEREST,             
                   INTRST_YTD       = :CT-INTRST-YTD                    
              WHERE ACCOUNT_NO      = :CT-ACCOUNT-NO                    
                AND PYMT_PRIORITY_LVL = :CT-PYMT-PRIORITY-LVL           
                AND CNT_ITEM_ID     = :CT-CNT-ITEM-ID                   
           END-EXEC                                                     

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

ACT059*                                                                 82780000
ACT059     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
ACT059*                                                                 82780000
           IF WS-ACTIVE-RETURN-CODE EQUAL TO SUCCESSFUL-CALL            
              NEXT SENTENCE                                             
           ELSE                                                         
              MOVE 'CT'                 TO WS-DB2-TABLE-ID              
              MOVE 'UPDATE'             TO WS-DB2-FUNCTION              
              MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
              MOVE '108'                TO WS-DB2-MODULE-ID             
              MOVE '8010'               TO WS-DB2-PARAGRAPH             
              MOVE CT-ACCOUNT-NO        TO WS-DB2-KEY-1N                
              MOVE CT-CNT-ITEM-ID       TO WS-DB2-KEY-2N                
              MOVE 12 TO RETURN-CODE                                    
              PERFORM 9900-SQL-ERROR     THRU 9900-EXIT                 
           END-IF.                                                      
                                                                        
       8010-EXIT.                                                       
           EXIT.                                                        
ACT059*                                                                 82640000
ACT059******************************************************************82640000
ACT059**  8020-INS-MNT-TRANS-HIST                                      *82650000
ACT059******************************************************************82640000
ACT059*                                                                 82640000
ACT059 8020-INS-MNT-TRANS-HIST.                                         
ACT059*                                                                 08241000
ACT059     EXEC SQL                                                     
ACT059         INSERT INTO CSS_MNT_TRANS_HIST                           
ACT059           ( TRANS_HIST_SEQ_NO                                    
ACT059            ,DATE_TRANS                                           
ACT059            ,CODE_TRAN_TYPE                                       
ACT059            ,RESP_AREA_ID                                         
ACT059            ,ACCOUNT_NO                                           
ACT059            ,CUSTOMER_NO                                          
ACT059            ,PREMISE_NO                                           
ACT059            ,USER_ID                                              
ACT059            ,APPL_PROGRAM_ID                                      
ACT059            ,TRAN_COMMENT)                                        
ACT059         VALUES                                                   
ACT059           ( CIS.CHAR2TIMESTAMP(:MH-TRANS-HIST-SEQ-NO)                    
ACT059            ,IIF(TRY_CONVERT(DATE, :MH-DATE-TRANS
              ) IS NULL OR (PATINDEX('%.%', :MH-DATE-TRANS
              ) <> 0) OR (LEN(:MH-DATE-TRANS) <> 10), CIS.CHAR2DATE(
                                                         :MH-DATE-TRANS
              ), CONVERT(DATE, :MH-DATE-TRANS) )                               
ACT059            ,:MH-CODE-TRAN-TYPE                                   
ACT059            ,:MH-RESP-AREA-ID                                     
ACT059            ,:MH-ACCOUNT-NO                                       
ACT059            ,:MH-CUSTOMER-NO                                      
ACT059            ,:MH-PREMISE-NO                                       
ACT059            ,:MH-USER-ID                                          
ACT059            ,:MH-APPL-PROGRAM-ID                                  
ACT059            ,:MH-TRAN-COMMENT)                                    
ACT059     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ054
MFA-TR*    EXEC SQL                                                     08242000
MFA-TR*        INSERT INTO CSS_MNT_TRANS_HIST                           08243000
MFA-TR*          ( TRANS_HIST_SEQ_NO                                    08244000
MFA-TR*           ,DATE_TRANS                                           08244000
MFA-TR*           ,CODE_TRAN_TYPE                                       08245000
MFA-TR*           ,RESP_AREA_ID                                         08245000
MFA-TR*           ,ACCOUNT_NO                                           08246000
MFA-TR*           ,CUSTOMER_NO                                          08247000
MFA-TR*           ,PREMISE_NO                                           08247000
MFA-TR*           ,USER_ID                                              08248000
MFA-TR*           ,APPL_PROGRAM_ID                                      08248000
MFA-TR*           ,TRAN_COMMENT)                                        08249000
MFA-TR*        VALUES                                                   08250000
MFA-TR*          ( :MH-TRANS-HIST-SEQ-NO                                08251000
MFA-TR*           ,:MH-DATE-TRANS                                       08251000
MFA-TR*           ,:MH-CODE-TRAN-TYPE                                   08252000
MFA-TR*           ,:MH-RESP-AREA-ID                                     08252000
MFA-TR*           ,:MH-ACCOUNT-NO                                       08253000
MFA-TR*           ,:MH-CUSTOMER-NO                                      08254000
MFA-TR*           ,:MH-PREMISE-NO                                       08254000
MFA-TR*           ,:MH-USER-ID                                          08255000
MFA-TR*           ,:MH-APPL-PROGRAM-ID                                  08255000
MFA-TR*           ,:MH-TRAN-COMMENT)                                    08256000
MFA-TR*    END-EXEC.                                                    08257000

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

ACT059*                                                                 08258000
ACT059     IF SQLCODE = SUCCESSFUL-CALL                                 
ACT059        CONTINUE                                                  
ACT059     ELSE                                                         
ACT059        MOVE 'MH'                 TO WS-DB2-TABLE-ID              
ACT059        MOVE 'INSERT'             TO WS-DB2-FUNCTION              
ACT059        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
ACT059        MOVE '108'                TO WS-DB2-MODULE-ID             
ACT059        MOVE '8020'               TO WS-DB2-PARAGRAPH             
ACT059        MOVE MH-ACCOUNT-NO        TO WS-DB2-KEY-1                 
ACT059        MOVE 12 TO RETURN-CODE                                    
ACT059        PERFORM 9900-SQL-ERROR    THRU 9900-EXIT                  
ACT059     END-IF.                                                      
ACT059*                                                                 08268000
ACT059 8020-EXIT.                                                       
ACT059     EXIT.                                                        
ACT059*                                                                 82640000
ACT059******************************************************************82640000
ACT059**  8021-INS-MT-TRN-HST-DET                                      *82650000
ACT059******************************************************************82640000
ACT059*                                                                 82640000
ACT059 8021-INS-MT-TRN-HST-DET.                                         
ACT059*                                                                 08241000
ACT059     EXEC SQL                                                     
ACT059         INSERT INTO CSS_MT_TRN_HST_DET                           
ACT059         ( TRANS_HIST_SEQ_NO                                      
ACT059          ,TRAN_APPL_NO                                           
ACT059          ,COLUMN_DESC                                            
ACT059          ,PRV_COLUMN_VALUE                                       
ACT059          ,CHG_COLUMN_VALUE                                       
ACT059          ,TABLE_ID)                                              
ACT059         VALUES                                                   
ACT059         ( CIS.CHAR2TIMESTAMP(:MI-TRANS-HIST-SEQ-NO)                      
ACT059          ,:MI-TRAN-APPL-NO                                       
ACT059          ,:MI-COLUMN-DESC                                        
ACT059          ,:MI-PRV-COLUMN-VALUE                                   
ACT059          ,:MI-CHG-COLUMN-VALUE                                   
ACT059          ,:MI-TABLE-ID)                                          
ACT059     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ054
MFA-TR*    EXEC SQL                                                     08241000
MFA-TR*        INSERT INTO CSS_MT_TRN_HST_DET                           08241000
MFA-TR*        ( TRANS_HIST_SEQ_NO                                      08241000
MFA-TR*         ,TRAN_APPL_NO                                           08241000
MFA-TR*         ,COLUMN_DESC                                            08241000
MFA-TR*         ,PRV_COLUMN_VALUE                                       08241000
MFA-TR*         ,CHG_COLUMN_VALUE                                       08241000
MFA-TR*         ,TABLE_ID)                                              08241000
MFA-TR*        VALUES                                                   08241000
MFA-TR*        ( :MI-TRANS-HIST-SEQ-NO                                  08241000
MFA-TR*         ,:MI-TRAN-APPL-NO                                       08241000
MFA-TR*         ,:MI-COLUMN-DESC                                        08241000
MFA-TR*         ,:MI-PRV-COLUMN-VALUE                                   08241000
MFA-TR*         ,:MI-CHG-COLUMN-VALUE                                   08241000
MFA-TR*         ,:MI-TABLE-ID)                                          08241000
MFA-TR*    END-EXEC.                                                    08241000

MSQ017     CALL "MFASQLCA"
MSQ017       USING SQLCA, BY VALUE MFA-PROGRAM-ID, "0", "0", "0",
MSQ017       BY REFERENCE MFSQLMESSAGETEXT
MSQ017     END-CALL

ACT059*                                                                 08268000
ACT059     IF SQLCODE = SUCCESSFUL-CALL                                 
ACT059        CONTINUE                                                  
ACT059     ELSE                                                         
ACT059        MOVE 'MI'                 TO WS-DB2-TABLE-ID              
ACT059        MOVE 'INSERT'             TO WS-DB2-FUNCTION              
ACT059        MOVE SQLCODE              TO WS-DB2-RETURN-CODE           
ACT059        MOVE '108'                TO WS-DB2-MODULE-ID             
ACT059        MOVE '8021'               TO WS-DB2-PARAGRAPH             
ACT059        MOVE MH-ACCOUNT-NO        TO WS-DB2-KEY-1                 
ACT059        MOVE 12 TO RETURN-CODE                                    
ACT059        PERFORM 9900-SQL-ERROR    THRU 9900-EXIT                  
ACT059     END-IF.                                                      
ACT059*                                                                 08268000
ACT059 8021-EXIT.                                                       
ACT059     EXIT.                                                        
      *                                                                 82640000
      **   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *  **82950000
      **    8200-WRITE-FCSWK03                                        **82960000
      **                                                              **82970000
      **    WRITE FWK03 FIELDS TO WK03 FILE.                          **82980000
      **                                                              **82990000
      **   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *  **83000000
       8200-WRITE-FCSWK03.                                              
PAL        IF WS-WK03-COUNT < 0                                         
PAL           MOVE 0 TO WS-WK03-COUNT                                   
PAL        END-IF.                                                      
           ADD 1 TO WS-WK03-COUNT                                       
T13536     IF WS-WK03-COUNT > 5000                                      
              MOVE 'WK03 HOLD TABLE OVERFLOW'                           
                TO WS-MISC-MSG-TEXT                                     
              MOVE +24 TO WS-MISC-MSG-LEN                               
              MOVE 16 TO RETURN-CODE                                    
              PERFORM 9910-MISC-ERROR THRU 9910-EXIT                    
           ELSE                                                         
              SET WK03-INDX TO WS-WK03-COUNT                            
              MOVE FIOWK03 TO WS-HOLD-WK03-DATA (WK03-INDX)             
              INITIALIZE FIOWK03                                        
T8620         INITIALIZE CJF00101                                       
P00794                   CJF00105                                       
           END-IF                                                       
           .                                                            
       8200-EXIT.                                                       
           EXIT.                                                        
                                                                        
C26130 8301-LOAD-ACC-DELINQ-VALUES.                                     
                                                                        
           SET TB-CO-INDEX TO 1.                                        
           SET TB-VAL-INDEX TO 1.                                       
           SET WS-OFFER-INDX TO 1.                                      
                                                                        
           PERFORM UNTIL                                                
             WS-COMPANY-NO-AT EQUAL                                     
             WS-DELINQ-COMPANY-TB (TB-CO-INDEX, TB-VAL-INDEX)           
             OR TB-CO-INDEX > 5                                         
                                                                        
               IF WS-COMPANY-NO-AT EQUAL                                
                  WS-DELINQ-COMPANY-TB (TB-CO-INDEX, TB-VAL-INDEX)      
                   NEXT SENTENCE                                        
               ELSE                                                     
                   SET TB-CO-INDEX UP BY 1                              
               END-IF                                                   
                                                                        
           END-PERFORM.                                                 
                                                                        
           PERFORM 8310-LOAD-DW-VARIABLE THRU 8310-EXIT                 
               UNTIL TB-VAL-INDEX > 20.                                 
                                                                        
           MOVE WS-COMPANY-NO-AT TO WS-CURRENT-COMPANY.                 
                                                                        
C26130 8301-EXIT.                                                       
           EXIT.                                                        
                                                                        
C26130 8310-LOAD-DW-VARIABLE.                                           
                                                                        
           EVALUATE WS-DELINQ-CODE-TB (TB-CO-INDEX, TB-VAL-INDEX)       
              WHEN 'EPP-OFFER-REV-MTH'                                  
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-EPP-OFFER-REV-MTH                              
                 SET TB-VAL-INDEX UP BY 1                               
              WHEN 'EPP-OFFER-GAS-MTH1'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH2'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH3'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH4'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH5'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH6'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH7'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH8'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH9'                                 
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH10'                                
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH11'                                
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'EPP-OFFER-GAS-MTH12'                                
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-GAS-EPP-OFFER-MONTH (WS-OFFER-INDX)            
                 SET TB-VAL-INDEX UP BY 1                               
                 SET WS-OFFER-INDX UP BY 1                              
              WHEN 'AMT-ARREARS        '                                
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-AMT-ARREARS                                    
                 SET TB-VAL-INDEX UP BY 1                               
              WHEN 'AMT-LPC-MIN-CHG    '                                
                 MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
                   TO WS-AMT-LPC-MIN-CHG                                
                 SET TB-VAL-INDEX UP BY 1                               
ACT102        WHEN 'AMT-LPC-MIN-BALANCE'                                
ACT102           MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
ACT102             TO WS-AMT-LPC-MIN-BALANCE                            
ACT102           SET TB-VAL-INDEX UP BY 1                               
ACT234        WHEN 'LPC-RATE-UTIL'                                      
ACT234           MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
ACT234             TO WS-UTIL-LPC-RATE-TOT                              
ACT234           COMPUTE WS-UTIL-LPC-RATE = WS-UTIL-LPC-RATE-TOT / 100  
ACT234           SET TB-VAL-INDEX UP BY 1                               
ACT234        WHEN 'LPC-RATE-NONUTIL'                                   
ACT234           MOVE WS-DELINQ-VALUE-TB (TB-CO-INDEX, TB-VAL-INDEX)    
ACT234             TO WS-NONUTIL-LPC-RATE-TOT                           
ACT234           COMPUTE WS-NONUTIL-LPC-RATE =                          
ACT234                           WS-NONUTIL-LPC-RATE-TOT / 100          
ACT234           SET TB-VAL-INDEX UP BY 1                               
              WHEN OTHER                                                
                 SET TB-VAL-INDEX UP BY 1                               
                                                                        
           END-EVALUATE.                                                
                                                                        
C26130 8310-EXIT.                                                       
           EXIT.                                                        
                                                                        
      /*****************************************************************84410000
      *                                                                *84420000
      *     CONTROLS ABNORMAL PROGRAM TERMINATION                      *84430000
      *                                                                *84440000
      ******************************************************************84450000
       9900-SQL-ERROR.                                                  
           IF LS-CURR-WQ-ITEM = 50                                      
              DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'                 
              DISPLAY 'PROCESSING TERMINATED'                           
              MOVE 16 TO RETURN-CODE                                    
           ELSE                                                         
              ADD 1 TO LS-CURR-WQ-ITEM                                  
              SET WS-BILL-WQ-INDX TO LS-CURR-WQ-ITEM                    
           END-IF.                                                      
                                                                        
           MOVE WS-DATABASE-EXCEPTION                                   
             TO WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)           
                                                                        
           COMPUTE WS-START-POS                                         
             = WS-COMMENTS-LEN-WF (WS-BILL-WQ-INDX) + 1                 
           MOVE WS-SQL-ERROR-TXT-WQ                                     
             TO WS-COMMENTS-TEXT-WF (WS-BILL-WQ-INDX) (WS-START-POS:)   
           ADD WS-SQL-ERROR-TXT-LEN-WQ                                  
             TO WS-COMMENTS-LEN-WF (WS-BILL-WQ-INDX).                   
                                                                        
           PERFORM 9999-BAIL-OUT THRU 9999-EXIT.                        
       9900-EXIT.                                                       
           EXIT.                                                        
      **                                                                84690000
       9910-MISC-ERROR.                                                 
           IF LS-CURR-WQ-ITEM = 50                                      
              DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'                 
              DISPLAY 'PROCESSING TERMINATED'                           
              MOVE 16 TO RETURN-CODE                                    
           ELSE                                                         
              ADD 1 TO LS-CURR-WQ-ITEM                                  
              SET WS-BILL-WQ-INDX TO LS-CURR-WQ-ITEM                    
A35920        MOVE 137            TO WS-CATEGORY-ID-WF(WS-BILL-WQ-INDX) 
I01687        MOVE WS-PGRMNAME                                          
I01687          TO WS-CREATED-BY-WF (WS-BILL-WQ-INDX)                   
              MOVE WS-MISCELLANEOUS-MESSAGE                             
                TO WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)        
                                                                        
              MOVE WS-BILL-NO-BG (WS-BILLING-INDX) TO WS-BILL-NO-WQ     
              MOVE WS-CODE-UTIL-TYPE-BG (WS-BILLING-INDX)               
                TO  WS-CODE-UTIL-TYPE-WQ                                
              MOVE WS-IC-NO-BG (WS-BILLING-INDX)  TO  WS-IC-NO-WQ       
              MOVE WS-RATE-PLAN-NO-BG (WS-BILLING-INDX)                 
                TO  WS-RATE-PLAN-NO-WQ                                  
                                                                        
              COMPUTE WS-START-POS                                      
                = WS-COMMENTS-LEN-WF (WS-BILL-WQ-INDX) + 1              
              MOVE WS-SUPPLEMENTAL-TXT-WQ                               
                TO WS-COMMENTS-TEXT-WF (WS-BILL-WQ-INDX) (WS-START-POS:)
              ADD WS-SUPPLEMENTAL-TXT-LEN-WQ                            
                TO WS-COMMENTS-LEN-WF (WS-BILL-WQ-INDX)                 
           END-IF.                                                      
                                                                        
           PERFORM 9999-BAIL-OUT THRU 9999-EXIT.                        
       9910-EXIT.                                                       
           EXIT.                                                        
      *                                                                 85000000
T24024 9920-CIA-PROCESS-ERROR.                                          
T24024*                                                                 85020000
T24024     IF LS-CURR-WQ-ITEM = 50                                      
T24024        DISPLAY 'WS-BILL-WQ-INDX GREATER THAN 50'                 
T24024        DISPLAY 'PROCESSING TERMINATED'                           
T24024        MOVE 16                       TO RETURN-CODE              
T24024     ELSE                                                         
T24024        ADD 1                         TO LS-CURR-WQ-ITEM          
T24024        SET WS-BILL-WQ-INDX           TO LS-CURR-WQ-ITEM          
T24024        MOVE WS-MISCELLANEOUS-MESSAGE TO                          
T24024             WS-BILLING-WQ-ITEMS-DATA-WF (WS-BILL-WQ-INDX)        
T24024     END-IF.                                                      
T24024     PERFORM 9999-BAIL-OUT            THRU 9999-EXIT.             
T24024                                                                  
T24024 9920-EXIT.                                                       
T24024     EXIT.                                                        
      *                                                                         
       9999-BAIL-OUT.                                                   
           EXIT PROGRAM.                                                
                                                                        
       9999-EXIT.                                                       
           EXIT.                                                        
