       IDENTIFICATION DIVISION.                                         
       PROGRAM-ID.     SCSCA444.                                        
       AUTHOR.         GOPI DUGGIRALA.                                  
       DATE-WRITTEN.   MAR 03, 2016.                                    
      ****************************************************************          
      **              SOUTH CAROLINA ELECTRIC & GAS                 **          
      **                                                            **          
      ****************************************************************          
      **                  P R O G R A M S U M M A R Y               **          
      **                                                            **          
      **  PURPOSE:VALIDATE & APPLY CSC DISCOUNT(S)                  **          
      **  SET ELIGIBILITY/RECEIVING/PROMOTE FLAGS                   **          
      **  ADD/EXPIRE/DELETE CSC DISCOUNTS BASED ON ELIGIBILITY      **          
      **                                                            **          
      ****************************************************************          
      **                                                            **          
      **              PROGRAM  MODIFICATION  LOG                    **          
      **                                                            **          
      **   DATE     INITIALS   REASON                               **          
      ** --------   --------   ---------------------------------    **          
P805CS** 03/03/16   GD43988    NEW PROGRAM.                         **          
      ****************************************************************          
      *                                                                         
       DATA DIVISION.                                                   
      *                                                                         
       WORKING-STORAGE SECTION.                                         

MSQ017 01 MFA-PROGRAM-ID PIC X(8) VALUE 'SCSCA444'.
MSQ017     COPY MFASQLM.
      *                                                                         
       01  WS-START                   PIC X(40)                         
              VALUE 'WORKING STORAGE FOR SCSCA444 STARTS HERE'.         
      *                                                                         
      *** DCLGEN/DB2 COPYBOOKS                                                  
      *                                                                         
      ***  DB2 INCLUDES                                                         
           EXEC SQL                                                             
              INCLUDE SQLCA                                                     
           END-EXEC.                                                            
      *                                                                         
      *** CSS_JOB_PARM, G6                                                      
           EXEC SQL                                                             
              INCLUDE TBJBPARM                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_DELINQUENCY, C8                                                   
           EXEC SQL                                                             
              INCLUDE TBDELQ                                                    
           END-EXEC.                                                            
      *                                                                         
      *** CSS_BILL_WINDOW, BN                                                   
           EXEC SQL                                                             
              INCLUDE TBBILWDW                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_ACCOUNT, AT                                                       
           EXEC SQL                                                             
              INCLUDE TBACCT                                                    
           END-EXEC.                                                            
      *                                                                         
      *** CSS_UTIL_ENVRNMT, UT                                                  
           EXEC SQL                                                             
              INCLUDE TBUTLENV                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_ACCT_RTPK_AGR, DF                                                 
           EXEC SQL                                                             
              INCLUDE TBACCTRG                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_ACCT_MKT_TIER, DD                                                 
           EXEC SQL                                                             
              INCLUDE TBMKTIER                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CRM_RT_PKG_OPTION, FI                                                 
           EXEC SQL                                                             
              INCLUDE TBRTPKGO                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_FIXED_FCTR, FF                                                    
           EXEC SQL                                                             
              INCLUDE TBFXDFCT                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_ACCT_ATTRIBUTE, YP                                                
           EXEC SQL                                                             
              INCLUDE TBACTATT                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_EDI_ACCT_DEST, NF                                                 
           EXEC SQL                                                             
              INCLUDE TBACDEST                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_BUSINESS_DAYS, 1G                                                 
           EXEC SQL                                                             
              INCLUDE TBBUSDAY                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_MNT_TRANS_HIST, MH                                                
           EXEC SQL                                                             
              INCLUDE TBMNHIST                                                  
           END-EXEC.                                                            
      *                                                                         
      *** CSS_MT_TRN_HST_DET, MI                                                
           EXEC SQL                                                             
              INCLUDE TBMNHDT                                                   
           END-EXEC.                                                            
      *                                                                         
       01  WS-SCSCA444-LITERALS.                                        
           05 PROGRAM-NAME            PIC X(08) VALUE 'SCSCA444'.       
           05 WS-PGRMNAME             PIC X(08) VALUE 'SCSCA444'.       
      *                                                                         
      *** WORKING STORAGE/PROCEDURE DIVISION COPYBOOKS                          
      *                                                                         
      *** CODES DATA PRESENT LAYOUT                                             
      *                                                                         
           COPY CWS00056.                                                       
      *                                                                         
      *** COPY BOOK TO GET THERM PRICE AND CSC                          00725901
      *                                                                         
           EXEC SQL                                                             
              INCLUDE CWS00063                                                  
           END-EXEC.                                                            
      *                                                                         
      *** COPY BOOK TO CREATE WQ                                        00725901
      *                                                                         
           EXEC SQL                                                             
              INCLUDE CWS00077                                                  
           END-EXEC.                                                            
      *                                                                         
      *** MAIN PRORAM COPYBOOK(S)                                       00725901
      *                                                                         
           EXEC SQL                                                             
              INCLUDE CWS0444E                                                  
           END-EXEC.                                                            
      *                                                                         
           EXEC SQL                                                             
              INCLUDE CPD00444                                                  
           END-EXEC.                                                            
      *                                                                         
      ******************************************************************PCS03340
      ** 6000-CPD444-CSC-DISCOUNT-ELIG THRU 6000-CPD44-EXIT           **PCS03320
      ******************************************************************PCS03340
      *                                                                         
           EXEC SQL                                                             
              INCLUDE CPD0444E                                                  
           END-EXEC.                                                            
      *                                                                         
