       IDENTIFICATION DIVISION.                                         
       PROGRAM-ID.    MCSCB068.                                         
       DATE-WRITTEN.  04/10/2000.                                       
       AUTHOR      .  CBSI.                                             
      *****************************************************************         
      **              SOUTH CAROLINA ELECTRIC & GAS                  **         
      **         COMPLETE BUSINESS SOLUTIONS INC., MAD               **         
      **                                                             **         
      *********         CUSTOMER SERVICE SYSTEM           *************         
      *********                DB2                        *************         
      *****************************************************************         
                                                                        
T19557**               !!! WARNING  !!!!                             **         
T19557**               -----------------                             **         
T19557** CPD00068 HAS BEEN CONVERTED INTO A PROGRAM.  THE NAME OF    **         
T19557** THIS PROGRAM IS:                                            **         
T19557**                 SCSCO068 - FOR ON-LINE COMPONENTS           **         
T19557**                 SCSCB068 - FOR BATCH COMPONENTS             **         
T19557** THESE PROGRAMS INCLUDE COPYBOOKS:                           **         
T19557** 1.  CWS00068 (WORKING STORAGE),                             **         
T19557** 2.  CPD00068 (PROCEDURE DIVISION LOGIC)                     **         
T19557** 3.  CWS0068L (LINKAGE SECTION)                              **         
T19557** PROGRAMS THAT INCLUDED CPD00068/CWS00068 NOW LINK TO        **         
T19557** SCSCO068/SCSCB068 AND INCLUDE COPYBOOK CWS0068L TO PASS     **         
T19557** INFORMATION BACK AND FORTH BETWEEN THE CALLING AND CALLED   **         
T19557** PROGRAMS.                                                   **         
T21964**               !!! BE CAREFUL !!!!                           **         
T21964**               -------------------                           **         
T21964** BE CAREFUL ABOUT THE FOLLOWING:                             **         
T21964** 1. THE LENGTH OF COPYBOOK CWS00068 MUST MATCH THE LENGTH OF **         
T21964**    FIELD WS-CWS68-FIELDS-LK FOUND IN COPYBOOK CWS0068L.     **         
T21964** 2. THE LENGTH OF COPYBOOK CWS0068L MUST MATCH THE LENGTH OF **         
T21964**    THE DFHCOMMAREA IN PROGRAM SCSCO068.                     **         
T21964** NOTE:                                                       **         
T21964**    THE FILLERS BELOW HAVE BEEN ADDED TO CWS00068 TO ALLOW   **         
T21964**    FOR FUTURE GROWTH.  PLEASE USE THESE FILLERS FIRST WHEN  **         
T21964**    ADDING NEW FIELDS TO CWS00068.  IF THE SIZE OF THIS      **         
T21964**    COPYBOOK NEEDS TO BE ENLARGED, ADJUST THE LENGTH OF THE  **         
T21964**    FIELDS SPECIFIED ABOVE.                                  **         
T21964**    THE FILLER FIELDS ARE:                                   **         
T21964**    05  WS-DATE-CREDIT-A-FILLER   PIC X(200).                **         
T21964**    05  WS-DATE-NOTICE-D-FILLER   PIC X(200).                **         
T21964**    05  WS-DATE-NOTICE-M-FILLER   PIC X(200).                **         
T21964**    05  WS-DATE-BILL-FILLER       PIC X(200).                **         
T21964**    05  WS-CODE-MESSAGE-T-FILLER  PIC X(100).                **         
T21964**    05  WS-CODE-SPECIAL-T-FILLER  PIC X(20).                 **         
T21964**    05  WS-AMT-NOTICE-FILLER      PIC (120).                 **         
T21964**    05  WS-ITEM-ID-FILLER         PIC X(80).                 **         
T21964**    05  WS-CODE-FRCST-CR-FILLER   PIC X(20).                 **         
T21964**    05  WS-FILLER-FOR-FUTURE-USE  PIC X(100).                **         
T23501** 3. COMPONENTS WHICH DON'T USE ANY OF THE DELINQUENCY VALUES **         
T23501** I.E WHERE THE WS-DELINQ-LOAD-FL IS ALREADY SET TO 'Y' BEFORE**         
T23501** CPD00068 IS CALLED SHOULD BE INCLUDED IN THE CHECK IN PARA  **         
T23501** 3300-CALCULATION.                                           **         
T23501** THE IF STATEMENT  SHOULD BE MODIFIED THIS WAY               **         
T23501**         IF PROGRAM-NAME EQUAL 'S201'                        **         
T23501**         OR PROGRAM-NAME EQUAL 'S443' OR                     **         
T23501**         OR PROGRAM-NAME EQUAL 'XXX'                         **         
T23501**                                                             **         
T23501**         WHERE 'XXX' IS THE NEW COMPONENT WHICH DOES NOT     **         
T23501**         NEED ANY DELINQUENCY VALUES.                        **         
T23501**         THE FLAG WS-DELINQ-LOAD-FL SHOULD BE SET TO         **         
T23501**         'Y' IN 'XXX' BEFORE CPD00068 IS CALLED.             **         
      *****************************************************************         
      **                                                             **         
      **                  PROGRAM MODIFICATION LOG                   **         
      **    DATE    INITIALS   REASON                                **         
      **    ____    ________   ______                                **         
      **                                                             **         
T19557**  04/10/00  CBSI     COPY BOOK CPD00068 CHANGED TO SUB       **         
T19557**                     PROGRAM.                                **         
T22359**  06/23/00  ZB17046  MADE CHANGES TO KEEP IDENTITY OF PROGRAM**         
T22359**                     CALLING SCSCO068 OR SCSCB068.  THERE IS **         
T22359**                     SPECIFIC LOGIC IN CPD00068 FOR CERTAIN  **         
T22359**                     PROGRAMS WHICH WAS NOT BEING EXECUTED   **         
T22359**                     PROPERLY BECAUSE THE PROGRAM NAME WAS   **         
T22359**                     ALWAYS SCSCO068 OR SCSCB068.            **         
T22359**  06/23/00  ZB17046  MADE CHANGES TO KEEP IDENTITY OF PROGRAM**         
T22359**                     CALLING SCSCO068 OR SCSCB068.  THERE IS **         
T22359**                     SPECIFIC LOGIC IN CPD00068 FOR CERTAIN  **         
T22359**                     PROGRAMS WHICH WAS NOT BEING EXECUTED   **         
T22359**                     PROPERLY BECAUSE THE PROGRAM NAME WAS   **         
T22359**                     ALWAYS SCSCO068 OR SCSCB068.            **         
T21964**  07/10/00  ZB17046  NON-UTILITY PROJECT CHANGES:            **         
T21964**            1....    SPLIT OUT ARREARS INTO UTILITY AND      **         
T21964**                     NON-UTILITY FIELDS.                     **         
T21964**            2....    CHANGED MERGING LOGIC TO PLACE CORRECT  **         
T21964**                     AMOUNTS INTO CL FIELDS.                 **         
T21964**            3....    ADDED PROCESSING FOR NEW CL ROWS:       **         
T21964**                     P - UTILITY BILLED ROW                  **         
T21964**                     Q - NON-UTILITY BILLED ROW              **         
T21964**                     R - NON-UTILITY FIRST NOTICE            **         
T21964**                     S - NON-UTILITY SECOND NOTICE           **         
T21964**                     T - NON-UTILITY EXCEPTIONAL 1ST NOTICE  **         
T21964**                     U - NON-UTILITY EXCEPTIONAL 2ND NOTICE  **         
T21964**                     V - NON-UTILITY RETURNED CHECK AMOUNT   **         
T21964**                     W - UTILITY RETURNED CHECK AMOUNT       **         
T21964**                     X - NON-UTILITY EXCEPTIONAL WORK QUEUE  **         
T21964**            4....    ADDED CALCULATION FOR THE 45-DAYS-AGO   **         
T21964**                     DATE FOR SEB TO BE USED PRIOR TO        **         
T21964**                     GENERATING DNP FOR ATLANTA GAS LIGHT.   **         
T21964**            5....    ADDED UTIL AND NON-UTIL FULL BALANCE    **         
T21964**                     CALCULATION.                            **         
T21964**            6....    ADDED FIELDS:                           **         
T21964**                     WS-AMT-PAST-DUE-UTL                     **         
T21964**                     WS-AMT-PAST-DUE-NONUTL                  **         
T21964**                     WS-WO-BALANCE-UTL                       **         
T21964**                     WS-WO-BALANCE-NONUTL                    **         
T21964**                     WS-DT-45-DAYS-AGO                       **         
T21964**                     WS-AMT-FULL-BAL-UTL                     **         
T21964**                     WS-AMT-FULL-BAL-NONUTL                  **         
T21964**            7....    DELETED 3 FIELDS: WS-TOT-00-DAY-NSA-NSN **         
T21964**                                       WS-AMT-DNP-UTL        **         
T21964**                                       WS-AMT-UTL-MIN        **         
T21964**                     NOTE:  WS-TOT-00-DAY-NSA-NSN =          **         
T21964**                               (WS-AMT-00-DAY-NSA +          **         
T21964**                               WS-AMT-00-DAY-NSN).           **         
T21964**                            WS-AMT-UTL-MIN = 5               **         
T21964**            8....    BECAUSE OF FIELDS DELETED/ADDED TO      **         
T21964**                     COPYBOOK CWS00068, CHANGED LENGTH OF    **         
T21964**                     WS-CWS68-FIELDS-LK IN COPYBOOK CWS0068L **         
T21964**                     FROM 2359 TO 4143.  ALSO, CHANGED       **         
T21964**                     DFHCOMMAREA IN PROGRAM SCSCO068 FROM    **         
T21964**                     3624 TO 5408.                           **         
T23501**  04/03/01  SS82048  DELINQUENCY TABLE CHANGES TO SUPPORT    **         
      **                     MULTI-COMPANY/PSNC CONVERSION.          **         
C26954**  07/23/02  MDJ      ADDED DCLGEN TBREGPRF FOR CPD00068.     **         
C30169**  07/18/08  CVNS     ADDED DCLGEN TBFWACTN FOR CPD00068.     **         
C30169**            CHENNAI                                          **         
A05460**  05/04/16  MC95456  REMOVED DCLGEN CSS_MKT_CNTRL.           **         
ACT058**  03/08/17  MJ13663  REMOVED DCLGEN CSS_DNP. APPL5477        **         
      *****************************************************************         
                                                                        
       DATA DIVISION.                                                   
       FILE SECTION.                                                    
                                                                        
       WORKING-STORAGE SECTION.                                         

MSQ017 01 MFA-PROGRAM-ID PIC X(8) VALUE 'MCSCB068'.
MSQ017     COPY MFASQLM.
                                                                        
       01  WS-START                    PIC X(40)                        
           VALUE 'WORKING STORAGE FOR SCSCB068 STARTS HERE'.            
                                                                        
       01  WS-CALL-ENVIRONMENT         PIC X(01) VALUE 'B'.             
           88 ONLINE-CALL              VALUE 'O'.                       
           88 BATCH-CALL               VALUE 'B'.                       
       01  PROGRAM-NAME                PIC X(08) VALUE 'SCSCB068'.      
                                                                        
           COPY CWS00303.                                                       
                                                                        
      /*********** SQL DECLARATIONS ****************************        00003200
           EXEC SQL                                                     00003300
               INCLUDE SQLCA                                            00003400
           END-EXEC.                                                    00004000
AC   /* CSS_AR_CNTL                                                     00005000
           EXEC SQL                                                     00006000
               INCLUDE TBARCNTL                                         00007000
           END-EXEC.                                                    00008000
CL   /* CSS_CRED_COLL                                                   00005000
           EXEC SQL                                                     00006000
               INCLUDE TBCRCOLL                                         00007000
           END-EXEC.                                                    00008000
C26954*                                                                         
C26954***************************************************************   02010000
C26954* CSS_REG_PROF                                                *           
C26954***************************************************************   02030000
C26954     EXEC SQL                                                             
C26954         INCLUDE TBREGPRF                                                 
C26954     END-EXEC.                                                            
C26954*                                                                         
C28255*                                                                         
C28255******************************************************************        
C28255*   CSS_HOLIDAY                                                  *        
C28255******************************************************************        
C28255     EXEC SQL                                                             
C28255         INCLUDE TBHLDAY                                                  
C28255     END-EXEC.                                                            
C28255*                                                                         
C8   /* CSS_DELINQUENCY                                                 00005000
           EXEC SQL                                                     00006000
               INCLUDE TBDELQ                                           00007000
           END-EXEC.                                                    00008000
AR   /* CSS_AR_TRANS_HIST                                               00005000
           EXEC SQL                                                     00006000
               INCLUDE TBARHIST                                         00007000
           END-EXEC.                                                    00008000
DA   /* CSS_DFA_ACCT                                                    00005000
           EXEC SQL                                                     00006000
               INCLUDE TBDFAACT                                         00007000
           END-EXEC.                                                    00008000
NH   /* CSS_NSF_HIST                                                    00005000
           EXEC SQL                                                     00006000
               INCLUDE TBNSFHST                                         00007000
           END-EXEC.                                                    00008000
B1   /* CSS_LOCAL_OFFICE                                                00005000
           EXEC SQL                                                     00006000
               INCLUDE TBLOCOFC                                         00007000
           END-EXEC.                                                    00008000
CO   /* CSS_CHRG_OFF                                                    00005000
           EXEC SQL                                                     00006000
               INCLUDE TBCHGOFF                                         00007000
           END-EXEC.                                                    00008000
AU   /* CSS_AR_TRN_HST_DET                                              00005000
           EXEC SQL                                                     00006000
               INCLUDE TBARHDT                                          00007000
           END-EXEC.                                                    00008000
CA   /* CSS_CUST_ALERT                                                          
           EXEC SQL                                                     00006000
               INCLUDE TBCSTALT                                         00007000
           END-EXEC.                                                    00008000
C28788****************************************************************          
C28788* CSS_UTIL_ENVRNMT                                                        
C28788****************************************************************          
C28788     EXEC SQL                                                             
C28788         INCLUDE TBUTLENV                                                 
C28788     END-EXEC.                                                            
      *                                                                         
C30169****************************************************************          
C30169* KD-CSS_FIN_WO_ACTION                                                    
C30169****************************************************************          
C30169     EXEC SQL                                                             
C30169         INCLUDE TBFWACTN                                                 
C30169     END-EXEC.                                                            
      /*********** SQL DECLARATIONS  END************************        00003200
                                                                        
       LINKAGE SECTION.                                                 
                                                                        
           COPY CWS00010.                                                       
                                                                        
           EXEC SQL                                                     00006000
              INCLUDE CWS00068                                                  
           END-EXEC.                                                    00008000
                                                                        
           EXEC SQL                                                     00006000
              INCLUDE CWS00056                                                  
           END-EXEC.                                                    00008000
                                                                        
           EXEC SQL                                                     00006000
              INCLUDE TBACCT                                            00007000
           END-EXEC.                                                    00008000
                                                                        
C28255****** CWS00315 CONTAINS WS FOR FINDING NEXT BUSINESS DAY ****            
C28255*                                                                         
C28255     EXEC SQL                                                             
C28255         INCLUDE CWS00315                                                 
C28255     END-EXEC.                                                            
C28255*                                                                         
       01  RS-RETURN-CODE               PIC S9(04) COMP VALUE 0.        
                                                                        
       PROCEDURE DIVISION USING CWS00068-FIELDS,                        
                                WS-CODES-DATA-PRESENT,                  
                                DCLCSS-ACCOUNT,                         
                                ABEND-FILE,                             
                                RS-RETURN-CODE.                         
       0000-MAINLINE.                                                   
      *                                                                         
                                                                        
T22359      IF WS-CPD00068-CALLING-PGM > LOW-VALUES AND                 
T22359         WS-CPD00068-CALLING-PGM > SPACES                         
T22359          MOVE WS-CPD00068-CALLING-PGM TO PROGRAM-NAME            
T22359      END-IF.                                                     
                                                                        
           PERFORM 3300-CALCULATION    THRU 3300-CALCULATION-EXIT.      
           PERFORM 9999-SCSCB068-EXIT  THRU 9999-EXIT.                  
                                                                        
       0000-EXIT.                                                       
           EXIT.                                                        
                                                                        
           EXEC SQL                                                             
              INCLUDE CPD00068                                                  
           END-EXEC.                                                            
                                                                        
                                                                        
       9700-PROCESS-ABEND.                                              
                                                                        
           PERFORM 9999-SCSCB068-EXIT  THRU 9999-EXIT.                  
                                                                        
       9700-EXIT.                                                       
           EXIT.                                                        
                                                                        
       9999-SCSCB068-EXIT.                                              
                                                                        
REARCH*    EXIT PROGRAM.                                                        
           GOBACK.                                                      
                                                                        
       9999-EXIT.                                                       
           EXIT.                                                        
                                                                        
