000100 IDENTIFICATION DIVISION.                                         
       PROGRAM-ID.    CSR02212.                                         
COB303 DATE-WRITTEN.      AUGUST 17, 1994.                              
000400 DATE-COMPILED.                                                   
000500                                                                  
CVT000******************************************************************00000100
CVT000*     - - - - - >   R P C   C O N V E R S I O N   < - - - - -    *00000200
CVT000*         S212 CONVERTED TO DB2 SP CSR02212 ON 07/20/2005        *00000300
CVT000*             -NOTE: AUTOMATED CONVERSION PROGRAM USED           *00000400
CVT000*                                                                *00000500
CVT000*                    CVT000 - CONVERTED CODE                     *00000501
CVT000*                    CVT004 - NEEDED REVIEW                      *00000502
CVT000*                    CVT999 - COMMENTED OUT CODE THAT CAN        *00000503
CVT000*                             POTENTIALLY BE DELETED             *00000510
CVT000*                                                                *00000520
CVT000******************************************************************00000600
000600******************************************************************00060000
000700*                SOUTH CAROLINA ELECTRIC & GAS                   *00070000
000800*                                                                *00080000
000900*  THIS PROGRAM IS EXECUTED VIA A REMOTE PROCEDURE CALL (RPC).   *00090000
001000*                                                                *00100000
001100*  TRANID:        S212                                           *00110000
001200*  PROGRAM:       S212                                           *00120000
001300*  CALLING SP:    PA_212                                         *00130000
001400*                                                                *00140000
001500******************************************************************00150000
001600*                 P R O G R A M  S U M M A R Y                   *00160000
001700*                                                                *00170000
001800*  THIS PROGRAM IS A REMOTE PROCEDURE CALL MADE FROM             *00180000
001900*  DESKTOP 2000 VIA THE SYBASE NETGATEWAY.                       *00190000
002000*                                                                *00200000
002100*  THIS PROGRAM INSERTS, DELETES, OR UPDATES THE                 *00210000
002200*  CSS_CONTACT_PHONE TABLE BASED ON THE ACTION IN THE FIELD      *00220000
002300*  PARM-PHONE-ACTION (I, U, OR D).                               *00230000
002400*                                                                *00240000
002500******************************************************************00250000
002600*                                                                *00260000
002700*                     PROGRAM MODIFICATION LOG                   *00270000
002800*                                                                *00280000
002900*    DATE    INITIALS   COMMENTS                                 *00290000
003000*  --------  --------   ---------------------------------------  *00300000
003100*  08/17/94    MLR      CREATED.                                 *00310000
003200*  03/29/95    RCW      ADD TRANS COMMENTS.                      *00320000
003300*  08/22/95    TCB      CHANGED PARM-PHONE-TYPE FROM X(20) TO    *00330000
003400*                       X(2).                                    *00340000
003500*  08/22/95    TCB      CHANGED TRANSACTION HISTORY TO CONFORM   *00350001
003600*                       TO COOKBOOK AND ALSO UPDATE MI-TABLE-ID. *00360001
003900*  12/19/95    PP       PANEL434:CONTACT PHONE MAINTENANCE       *        
004000*                       RESPONSE WINDOW FOR PANEL262             *        
003700*                                                                *00370000
CBSI  *  10/29/98   CBSI      ABEND LOG MODIFIED TO INCLUDE ALL THE    *        
CBSI  *             MADRAS    ABEND PARAMETERS                         *        
T28938*                                                                *        
T28938*  05/15/03   DD        CORRECTED PHONE UPDATE.  INFO WAS NOT    *        
T28938*                       SAVING AT TIMES.                         *        
REARCH*  07/21/05   CVNS      RPC TO COBOL DB2 SP CONVERSION.          *        
REARCH*             CHENNAI                                            *        
003800******************************************************************00380000
003900******************************************************************00390000
004000*                                                                *00400000
004100*                ---- BASIC SEQUENCE STRUCTURE ----              *00410000
004200*                                                                *00420000
004300*  0000 - 0999  MAIN CONTROL PATH AND INITIALIZATION             *00430000
004400*  1000 - 1999  INPUT PROCESSING CONTROL PATH                    *00440000
004500*  2000 - 2999  OUTPUT PROCESSING CONTROL PATH                   *00450000
004600*  3000 - 4999  NOT USED                                         *00460000
004700*  5000 - 5999  COMMON PROGRAM MODULES                           *00470000
004800*  6000 - 6999  COMMON SYSTEM MODULES                            *00480000
004900*  7000 - 7999  INPUT MODULES                                    *00490000
005000*  8000 - 8999  OUTPUT MODULES                                   *00500000
005100*  9000 - 9999  TERMINATION,ABEND, MESSAGING MODULES             *00510000
005200*                                                                *00520000
005300******************************************************************00530000
005400                                                                  
005500 ENVIRONMENT DIVISION.                                            
005600 DATA DIVISION.                                                   
005700 WORKING-STORAGE SECTION.                                         

MSQ002  01 MFA-CSRERLOG.
MSQ002    05 ARG-5 PIC X(255).
MSQ002    05 ARG-6 PIC X(255).
MSQ002    05 ARG-7 PIC X(447).

MSQ017 01 MFA-PROGRAM-ID PIC X(8) VALUE 'CSR02212'.
MSQ017     COPY MFASQLM.
005800                                                                  
005900 01  WS-START                                   PIC X(40) VALUE   
REARCH     'WORKING STORAGE FOR CSR02212 STARTS HERE'.                  
006100                                                                  
006200                                                                  
006300******************************************************************00630000
006400*    DB2 INCLUDES                                                *00640000
006500******************************************************************00650000
006600                                                                  
006700     EXEC SQL                                                     00670000
006800        INCLUDE SQLCA                                             00680000
006900     END-EXEC.                                                    00690000
007000                                                                  
007100                                                                  
007200     EXEC SQL                                                     00720000
007300        INCLUDE TBCNTPHN                                          00730000
007400     END-EXEC.                                                    00740000
007500                                                                  
007600* ADDED THE FOLLOWING TABLE INCLUDES FOR JOURNALING               00760000
007700                                                                  
007800     EXEC SQL                                                     00780000
007900        INCLUDE TBMNHIST                                          00790000
008000     END-EXEC.                                                    00800000
008100                                                                  
008200     EXEC SQL                                                     00820000
008300        INCLUDE TBMNHDT                                           00830000
008400     END-EXEC.                                                    00840000
008500                                                                  
008600     EXEC SQL                                                     00860000
008700        INCLUDE TBMODEL                                           00870000
008800     END-EXEC.                                                    00880000
008900                                                                  
009000     EXEC SQL                                                     00900000
009100        INCLUDE TBRSAREA                                          00910000
009200     END-EXEC.                                                    00920000
009300                                                                  
009400                                                                  
009500******************************************************************00950000
009600*    COBOL WORKING STORAGE COPY BOOKS                            *00960000
009700******************************************************************00970000
009800                                                                  
CVT999*    COPY SYGWCOB.                                                00990000
CVT999*    COPY SYDBCOB.                                                01000000
010100     COPY CCA00001.                                               01010000
CVT999*    COPY CWS00010.                                               01020000
010300     COPY CWS00027.                                               01030000
010400     COPY CWS00303.                                               01040000
010500                                                                  
010600     EXEC SQL                                                     01060000
010700        INCLUDE CWS00013                                          01070000
010800     END-EXEC.                                                    01080000
010900                                                                  
011000******************************************************************01100000
011100*    WORK AREAS                                                  *01110000
011200******************************************************************01120000
011300                                                                  
REARCH*01  GW-LIB-MISC-FIELDS.                                          01140000
CVT999*    05  GWL-PROC                POINTER.                         01150000
CVT999*    05  GWL-INIT-HANDLE         POINTER.                         01160000
CVT999*    05  GWL-RC                  PIC S9(9) COMP.                  01170000
CVT999*    05  GWL-STATUS-NR           PIC S9(9) COMP.                  01180000
CVT999*    05  GWL-STATUS-DONE         PIC S9(9) COMP.                  01190000
CVT999*    05  GWL-STATUS-COUNT        PIC S9(9) COMP.                  01200000
CVT999*    05  GWL-STATUS-COMM         PIC S9(9) COMP.                  01210000
CVT999*    05  GWL-STATUS-RETURN-CODE  PIC S9(9) COMP.                  01220000
REARCH*    05  GWL-STATUS-SUBCODE      PIC S9(9) COMP.                  01230000
012400                                                                  
012500 01  PARM-FIELDS.                                                 
012600     05  PARM-L                  PIC S9(9) COMP.                  
CVT999*    05  PARM-ID1                PIC S9(9) COMP VALUE 1.          01270000
012800     05  PARM-CONTACT-ENTITY-IND PIC X(01)  VALUE SPACES.         
012900     05  PARM-ACCOUNT-NO         PIC X(13)  VALUE SPACES.         
013000     05  PARM-ACCOUNT-NO-RED     REDEFINES PARM-ACCOUNT-NO        
013100                                 PIC 9(13).                       
013200     05  PARM-CUSTOMER-NO        PIC X(10)  VALUE SPACES.         
013300     05  PARM-CUSTOMER-NO-RED    REDEFINES PARM-CUSTOMER-NO       
013400                                 PIC 9(10).                       
013500     05  PARM-PREMISE-NO         PIC X(10)  VALUE SPACES.         
013600     05  PARM-PREMISE-NO-RED     REDEFINES PARM-PREMISE-NO        
013700                                 PIC 9(10).                       
013800     05  PARM-CONTACT-ID         PIC X(10)  VALUE SPACES.         
013900     05  PARM-PHONE-ACTION       PIC X(01)  VALUE SPACES.         
014000     05  PARM-OLD-PHONE-NO       PIC X(10)  VALUE SPACES.         
014100     05  PARM-PHONE-NO           PIC X(10)  VALUE SPACES.         
014200     05  PARM-OLD-EXTENSION-NO   PIC X(06)  VALUE SPACES.         
014300     05  PARM-EXTENSION-NO       PIC X(06)  VALUE SPACES.         
014400     05  PARM-OLD-PHONE-TYPE     PIC X(02)  VALUE SPACES.         
014500     05  PARM-PHONE-TYPE         PIC X(02)  VALUE SPACES.         
014600     05  PARM-USER-ID            PIC X(07)  VALUE SPACES.         
014700     05  PARM-RESP-AREA-ID       PIC X(03)  VALUE SPACES.         
014800     05  PARM-COMMENT-LEN        PIC X(04)  VALUE SPACES.         
014900     05  PARM-COMMENT-TEXT       PIC X(210) VALUE SPACES.         
015000                                                                  
015100                                                                  
015200 01  SNA-FIELDS.                                                  
015300     05  SNA-SUBC                PIC S9(9) COMP.                  
CVT999*    05  SNA-CONNECTION-NAME     PIC X(8)  VALUE SPACES.          01540000
015500                                                                  
015600 01  COUNTER-FIELDS.                                              
CVT999*    05  CTR-COLUMN              PIC S9(9) COMP VALUE 1.          01570000
015800     05  CTR-ROWS                PIC S9(9) COMP VALUE 0.          
015900     05  WS-ROW-COUNT            PIC S9(9) COMP VALUE 0.          
016000                                                                  
016100 01  WORK-FIELDS.                                                 
CVT999*    05  MAX-LENGTH-PARM         PIC S9(9) COMP.                  01620000
CVT999*    05  WRKLEN1                 PIC S9(9) COMP.                  01630000
CVT999*    05  WRKLEN2                 PIC S9(9) COMP.                  01640000
016500     05  WRK-DONE-STATUS         PIC S9(9) COMP.                  
016600                                                                  
016700 01  WS-MISC.                                                     
REARCH     05  PROGRAM-NAME            PIC X(08) VALUE 'CSR02212'.      
016900     05  WS-ACCOUNT-NO           PIC 9(13) VALUE ZERO.            
017000     05  WS-ACCOUNT-NO-NUM       PIC S9(13) COMP-3 VALUE ZERO.    
017100     05  WS-CUSTOMER-NO          PIC 9(10) VALUE ZERO.            
017200     05  WS-CUSTOMER-NO-NUM      PIC S9(10) COMP-3 VALUE ZERO.    
017300     05  WS-PREMISE-NO           PIC 9(10) VALUE ZERO.            
017400     05  WS-PREMISE-NO-NUM   PIC S9(10) COMP-3 VALUE ZERO.        
017500     05  WS-CONTACT-ID-NO        PIC X(10) VALUE SPACES.          
017600     05  WS-CONTACT-ID-NO-NUM REDEFINES                           
017700                WS-CONTACT-ID-NO PIC 9(10).                       
017800     05  WS-CONTACT-ID-COMP3 PIC S9(10)V COMP-3 VALUE ZERO.       
017900     05  WS-MAX-CONTACT-ID       PIC S9(04) COMP VALUE ZERO.      
018000     05  WS-CONTACT-ID           PIC 9(10).                       
018100     05  WS-CONTACT-ID-CHAR      PIC X(10).                       
018200     05  WS-TRAN-APPL-NO         PIC S9(04) COMP VALUE +0.        
018300     05  WS-COMMENT-TEXT         PIC X(210) VALUE SPACES.         
018400     05  WS-EDIT-STYLE-ID        PIC X(02) VALUE '51'.            
018500     05  WS-PHONE-NO-FORMATTED.                                   
018600         10 FILLER                   PIC X(01) VALUE '('.         
018700         10 WS-AREA-CODE             PIC X(03) VALUE SPACES.      
018800         10 FILLER                   PIC X(01) VALUE ')'.         
018900         10 WS-PHONE-PREFIX          PIC X(03) VALUE SPACES.      
019000         10 FILLER                   PIC X(01) VALUE '-'.         
019100         10 WS-PHONE-SUFFIX          PIC X(04) VALUE SPACES.      
019200     05  WS-TABLE-1              PIC X(16) VALUE SPACES.          
019300     05  WS-TABLE-ELEMENT-1      PIC X(11) VALUE SPACES.          
019400     05  WS-HOSTVAR-ELEMENT-1 PIC S9(13)V COMP-3 VALUE ZERO.      
T28938     05  WS-CONTACT-PHONE-EXISTS     PIC S9(2) COMP VALUE 0.      
019500                                                                  
019600 01  WS-LENGTH-OF-COMMENTS.                                       
019700     05  WS-COMMENT-LEN          PIC X(04) VALUE SPACES.          
019800     05  WS-COMMENT-LEN-NUM REDEFINES WS-COMMENT-LEN PIC 9(04).   
019900                                                                  
020000 01  WS-FLAG-VALUES.                                              
020100     05  WS-YES                  PIC X(01) VALUE 'Y'.             
020200     05  WS-NO                   PIC X(01) VALUE 'N'.             
020300     05  WS-ACTIVE-CODE          PIC X(01) VALUE 'A'.             
020400                                                                  
020500 01  FILLER  PIC X(32) VALUE 'THIS IS THE ROW RETURN AREA.'.      
020600 01  GTT-RETURN-FIELDS.                                           
020700     05  RS-RETURN-CODE          PIC S9(9) COMP VALUE 0.          
020800                                                                  
CVT999*01  CNS-COLUMN-NAMES.                                            02090000
CVT999*    05  CNS-RETURN-CODE         PIC X(11) VALUE                  02100000
CVT999*                                        'RETURN_CODE'.           02110000
CVT999*                                                                 02120000
021300 01  SWITCHES.                                                    
021400     05  ALL-DONE-SW             PIC X(01) VALUE 'N'.             
021500         88 NOT-ALL-DONE                   VALUE 'N'.             
021600         88 ALL-DONE                       VALUE 'Y'.             
021700     05  SEND-DONE-SW            PIC X(01) VALUE 'Y'.             
021800         88 SEND-DONE-ERROR                VALUE 'N'.             
021900         88 SEND-DONE-OK                   VALUE 'Y'.             
022000                                                                  
022100                                                                  
HPCCDM*EJECT                                                            02220000
CVT000     EXEC SQL                                                     00000010
CVT000         INCLUDE CWSX0010                                         00000020
CVT000     END-EXEC.                                                    00000030
CVT000                                                                  
CVT000 01  CSRERLOG-P.                                                  
CVT000     10  S-SP-NAME                 PIC X(18) VALUE SPACES.        
CVT000     10  S-SQLCODE                 PIC S9(9) COMP VALUE 0.        
CVT000     10  S-SQLSTATE                PIC X(5)  VALUE ' '.           
CVT000     10  S-TABLE-NAME              PIC X(18) VALUE SPACES.        
CVT000     10  S-HOST-VARIABLES.                                        
CVT000         49  S-HOST-VARIABLES-L    PIC S9(4) USAGE COMP.          
CVT000         49  S-HOST-VARIABLES-V    PIC X(255).                    
CVT000     10  S-SQL-STATEMENT.                                         
CVT000         49  S-SQL-STATEMENT-L     PIC S9(4) USAGE COMP.          
CVT000         49  S-SQL-STATEMENT-V     PIC X(255).                    
CVT000     10  S-SQL-DESCRIPTION.                                       
CVT000         49  S-SQL-DESCRIPTION-L   PIC S9(4) USAGE COMP.          
CVT000         49  S-SQL-DESCRIPTION-V   PIC X(255).                    
CVT000     10  WS-ABEND-SQLERRMC.                                       
CVT000         49  WS-ABEND-SQLERRMC-L   PIC S9(4) USAGE COMP.          
CVT000         49  WS-ABEND-SQLERRMC-V   PIC X(255).                    
CVT000     10  S-RETURN-CODE             PIC S9(9) COMP VALUE 0.        
CVT000     10  WS-SQLSTATE               PIC X(05) VALUE SPACES.        
CVT000                                                                  
CVT000                                                                  
CVT000                                                                  
CVT000 LINKAGE SECTION.                                                 
CVT000 01  LINK-CONTACT-ENTITY-IND  PIC X(01).                          
CVT000 01  LINK-ACCOUNT-NO          PIC X(13).                          
CVT000 01  LINK-ACCOUNT-NO-RED      PIC 9(13).                          
CVT000 01  LINK-CUSTOMER-NO         PIC X(10).                          
CVT000 01  LINK-CUSTOMER-NO-RED     PIC 9(10).                          
CVT000 01  LINK-PREMISE-NO          PIC X(10).                          
CVT000 01  LINK-PREMISE-NO-RED      PIC 9(10).                          
CVT000 01  LINK-CONTACT-ID          PIC X(10).                          
CVT000 01  LINK-PHONE-ACTION        PIC X(01).                          
CVT000 01  LINK-OLD-PHONE-NO        PIC X(10).                          
CVT000 01  LINK-PHONE-NO            PIC X(10).                          
CVT000 01  LINK-OLD-EXTENSION-NO    PIC X(06).                          
CVT000 01  LINK-EXTENSION-NO        PIC X(06).                          
CVT000 01  LINK-OLD-PHONE-TYPE      PIC X(02).                          
CVT000 01  LINK-PHONE-TYPE          PIC X(02).                          
CVT000 01  LINK-USER-ID             PIC X(07).                          
CVT000 01  LINK-RESP-AREA-ID        PIC X(03).                          
CVT000 01  LINK-COMMENT-LEN         PIC X(04).                          
CVT000 01  LINK-COMMENT-TEXT        PIC X(210).                         
                                                                        
CVT000 PROCEDURE DIVISION USING                                         
CVT000          LINK-CONTACT-ENTITY-IND                                 
CVT000         ,LINK-ACCOUNT-NO                                         
CVT000         ,LINK-CUSTOMER-NO                                        
CVT000         ,LINK-PREMISE-NO                                         
CVT000         ,LINK-CONTACT-ID                                         
CVT000         ,LINK-PHONE-ACTION                                       
CVT000         ,LINK-OLD-PHONE-NO                                       
CVT000         ,LINK-PHONE-NO                                           
CVT000         ,LINK-OLD-EXTENSION-NO                                   
CVT000         ,LINK-EXTENSION-NO                                       
CVT000         ,LINK-OLD-PHONE-TYPE                                     
CVT000         ,LINK-PHONE-TYPE                                         
CVT000         ,LINK-USER-ID                                            
CVT000         ,LINK-RESP-AREA-ID                                       
CVT000         ,LINK-COMMENT-LEN                                        
CVT000         ,LINK-COMMENT-TEXT                                       
CVT000         .                                                        
CVT000     EXEC SQL                                                     
CVT000         WHENEVER SQLWARNING                                      
CVT000             CONTINUE                                             
CVT000     END-EXEC.                                                    
CVT000                                                                  
CVT000     EXEC SQL                                                     
CVT000         WHENEVER SQLERROR                                        
CVT000             CONTINUE                                             
CVT000     END-EXEC.                                                    
CVT000                                                                  
CVT000     EXEC SQL                                                     
CVT000         WHENEVER NOT FOUND                                       
CVT000             CONTINUE                                             
CVT000     END-EXEC.                                                    
CVT999*PROCEDURE DIVISION.                                              02230000
022400                                                                  
022500******************************************************************02250000
022600* 0000-MAINLINE                                                  *02260000
022700*     CONTROLS THE MAIN PATH OF THE PROGRAM                      *02270000
022800******************************************************************02280000
022900                                                                  
023000 0000-MAINLINE.                                                   
023100                                                                  
023200     PERFORM 0100-INITIALIZE     THRU 0100-EXIT.                  
023300     PERFORM 1000-PROCESS-INPUT  THRU 1000-EXIT.                  
023400     PERFORM 2000-PROCESS-OUTPUT THRU 2000-EXIT.                  
023500     PERFORM 9999-END-PROGRAM    THRU 9999-EXIT.                  
023600                                                                  
023700 0000-EXIT.                                                       
023800     EXIT.                                                        
023900                                                                  
024000******************************************************************02400000
024100* 0100-INITIALIZE                                                *02410000
024200*                                                                *02420000
024300*     1. RESET DB2 ERROR HANDLERS                                *02430000
024400*     2. ESTABLISH GATEWAY ENVIRONMENT (TDINIT)                  *02440000
024500*     3. ACCEPT CLIENT REQUEST/ESTABLISH SNA HANDLE (TDACCEPT)   *02450000
024600*     4. DETERMINE IF CLIENT HAS SENT AN RPC PARAMETER (TDRESULT)*02460000
024700*                                                                *02470000
024800******************************************************************02480000
024900                                                                  
025000 0100-INITIALIZE.                                                 
025100                                                                  
CVT999*    EXEC SQL WHENEVER SQLWARNING CONTINUE END-EXEC.              02520000
CVT999*    EXEC SQL WHENEVER SQLERROR   CONTINUE END-EXEC.              02530000
CVT999*    EXEC SQL WHENEVER NOT FOUND  CONTINUE END-EXEC.              02540000
CVT999*    CALL 'TDINIT'   USING DFHEIBLK, GWL-RC, GWL-INIT-HANDLE.     02550000
025600                                                                  
CVT999*    CALL 'TDACCEPT' USING GWL-PROC, GWL-RC, GWL-INIT-HANDLE,     02570000
CVT999*                          SNA-CONNECTION-NAME, SNA-SUBC.         02580000
025900                                                                  
CVT999*    CALL 'TDRESULT' USING GWL-PROC, GWL-RC.                      02600000
026100                                                                  
CVT999*    IF GWL-RC NOT = TDS-PARM-PRESENT                             02620000
CVT999*       MOVE PROGRAM-NAME    TO ABEND-PROGRAM                     02630000
CVT999*       MOVE '0100'          TO ACTIVE-PARAGRAPH                  02640000
CVT999*       MOVE 'TDRESULT - NO RPC PARM SENT' TO ABEND-FUNCTION      02650000
CVT999*       MOVE 'CICS TRANSACTION'   TO TABLE-1                      02660000
CVT999*       MOVE GWL-RC               TO WS-ACTIVE-RETURN-CODE        02670000
CVT999*       PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT            02680000
CVT999*       PERFORM 9900-SQL-ERROR-ROUTINE  THRU 9900-EXIT            02690000
CVT999*    END-IF.                                                      02700000
027100                                                                  
CVT000     EXEC SQL                                                     
CVT000       DECLARE C1 CURSOR  FOR                          
CVT000       SELECT                                                     
CVT000        :RS-RETURN-CODE              AS    RETURN_CODE            
CVT000          FROM CIS.SYSDUMMY1                                   
CVT000     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ027
MFA-TR*    EXEC SQL                                                             
MFA-TR*      DECLARE C1 CURSOR WITH RETURN FOR                                  
MFA-TR*      SELECT                                                             
MFA-TR*       :RS-RETURN-CODE              AS    RETURN_CODE                    
MFA-TR*         FROM SYSIBM.SYSDUMMY1                                           
MFA-TR*    END-EXEC.                                                            
CVT000     MOVE LINK-CONTACT-ENTITY-IND   TO PARM-CONTACT-ENTITY-IND  . 
CVT000     MOVE LINK-ACCOUNT-NO           TO PARM-ACCOUNT-NO          . 
CVT000     MOVE LINK-CUSTOMER-NO          TO PARM-CUSTOMER-NO         . 
CVT000     MOVE LINK-PREMISE-NO           TO PARM-PREMISE-NO          . 
CVT000     MOVE LINK-CONTACT-ID           TO PARM-CONTACT-ID          . 
CVT000     MOVE LINK-PHONE-ACTION         TO PARM-PHONE-ACTION        . 
CVT000     MOVE LINK-OLD-PHONE-NO         TO PARM-OLD-PHONE-NO        . 
CVT000     MOVE LINK-PHONE-NO             TO PARM-PHONE-NO            . 
CVT000     MOVE LINK-OLD-EXTENSION-NO     TO PARM-OLD-EXTENSION-NO    . 
CVT000     MOVE LINK-EXTENSION-NO         TO PARM-EXTENSION-NO        . 
CVT000     MOVE LINK-OLD-PHONE-TYPE       TO PARM-OLD-PHONE-TYPE      . 
CVT000     MOVE LINK-PHONE-TYPE           TO PARM-PHONE-TYPE          . 
CVT000     MOVE LINK-USER-ID              TO PARM-USER-ID             . 
CVT000     MOVE LINK-RESP-AREA-ID         TO PARM-RESP-AREA-ID        . 
CVT000     MOVE LINK-COMMENT-LEN          TO PARM-COMMENT-LEN         . 
CVT000     MOVE LINK-COMMENT-TEXT         TO PARM-COMMENT-TEXT        . 
027200 0100-EXIT.                                                       
027300     EXIT.                                                        
027400                                                                  
027500******************************************************************02750000
027600* 1000-PROCESS-INPUT                                             *02760000
027700*                                                                *02770000
027800*     1. RECEIVE PARMS.                                          *02780000
027900*                                                                *02790000
028000******************************************************************02800000
028100                                                                  
028200 1000-PROCESS-INPUT.                                              
028300                                                                  
028400     PERFORM 1100-RECEIVE-PARMS     THRU 1100-EXIT.               
028500     MOVE PARM-ACCOUNT-NO-RED       TO WS-ACCOUNT-NO.             
028600     MOVE WS-ACCOUNT-NO             TO WS-ACCOUNT-NO-NUM.         
028700     MOVE PARM-CUSTOMER-NO-RED      TO WS-CUSTOMER-NO.            
028800     MOVE WS-CUSTOMER-NO            TO WS-CUSTOMER-NO-NUM.        
028900     MOVE PARM-PREMISE-NO-RED       TO WS-PREMISE-NO.             
029000     MOVE WS-PREMISE-NO             TO WS-PREMISE-NO-NUM.         
029100     MOVE PARM-CONTACT-ID           TO WS-CONTACT-ID-NO.          
029200     MOVE WS-CONTACT-ID-NO-NUM      TO WS-CONTACT-ID-COMP3.       
029300     MOVE PARM-COMMENT-TEXT         TO WS-COMMENT-TEXT.           
029400     MOVE PARM-COMMENT-LEN          TO WS-COMMENT-LEN.            
029500     MOVE WS-COMMENT-LEN-NUM        TO MH-TRAN-COMMENT-LEN.       
029600                                                                  
029700 1000-EXIT.                                                       
029800     EXIT.                                                        
029900                                                                  
030000 1100-RECEIVE-PARMS.                                              
CVT999*    MOVE 1                          TO PARM-ID1.                 03010000
CVT999*    MOVE LENGTH OF PARM-CONTACT-ENTITY-IND TO MAX-LENGTH-PARM.   03020000
030300                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03040000
CVT999*                          GWL-RC,                                03050000
CVT999*                          PARM-ID1,                              03060000
CVT999*                          PARM-CONTACT-ENTITY-IND,               03070000
CVT999*                          TDSCHAR,                               03080000
CVT999*                          MAX-LENGTH-PARM,                       03090000
CVT999*                          PARM-L.                                03100000
031100                                                                  
CVT999*    ADD  1                          TO PARM-ID1.                 03120000
CVT999*    MOVE LENGTH OF PARM-ACCOUNT-NO  TO MAX-LENGTH-PARM.          03130001
031400                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03150000
CVT999*                          GWL-RC,                                03160000
CVT999*                          PARM-ID1,                              03170000
CVT999*                          PARM-ACCOUNT-NO,                       03180000
CVT999*                          TDSCHAR,                               03190000
CVT999*                          MAX-LENGTH-PARM,                       03200000
CVT999*                          PARM-L.                                03210000
032200                                                                  
CVT999*    ADD  1                          TO PARM-ID1.                 03230000
CVT999*    MOVE LENGTH OF PARM-CUSTOMER-NO TO MAX-LENGTH-PARM.          03240000
032500                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03260000
CVT999*                          GWL-RC,                                03270000
CVT999*                          PARM-ID1,                              03280000
CVT999*                          PARM-CUSTOMER-NO,                      03290000
CVT999*                          TDSCHAR,                               03300000
CVT999*                          MAX-LENGTH-PARM,                       03310000
CVT999*                          PARM-L.                                03320000
033300                                                                  
CVT999*    ADD  1                          TO PARM-ID1.                 03340000
CVT999*    MOVE LENGTH OF PARM-PREMISE-NO  TO MAX-LENGTH-PARM.          03350000
033600                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03370000
CVT999*                          GWL-RC,                                03380000
CVT999*                          PARM-ID1,                              03390000
CVT999*                          PARM-PREMISE-NO,                       03400000
CVT999*                          TDSCHAR,                               03410000
CVT999*                          MAX-LENGTH-PARM,                       03420000
CVT999*                          PARM-L.                                03430000
034400                                                                  
CVT999*    ADD  1                          TO PARM-ID1.                 03450000
CVT999*    MOVE LENGTH OF PARM-CONTACT-ID  TO MAX-LENGTH-PARM.          03460000
034700                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03480000
CVT999*                          GWL-RC,                                03490000
CVT999*                          PARM-ID1,                              03500000
CVT999*                          PARM-CONTACT-ID,                       03510000
CVT999*                          TDSCHAR,                               03520000
CVT999*                          MAX-LENGTH-PARM,                       03530000
CVT999*                          PARM-L.                                03540000
035500                                                                  
CVT999*    ADD  1                           TO PARM-ID1.                03560000
CVT999*    MOVE LENGTH OF PARM-PHONE-ACTION TO MAX-LENGTH-PARM.         03570000
035800                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03590000
CVT999*                          GWL-RC,                                03600000
CVT999*                          PARM-ID1,                              03610000
CVT999*                          PARM-PHONE-ACTION,                     03620000
CVT999*                          TDSCHAR,                               03630000
CVT999*                          MAX-LENGTH-PARM,                       03640000
CVT999*                          PARM-L.                                03650000
036600                                                                  
CVT999*    ADD  1                               TO PARM-ID1.            03670005
CVT999*    MOVE LENGTH OF PARM-OLD-PHONE-NO     TO MAX-LENGTH-PARM.     03680005
036900                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03700005
CVT999*                          GWL-RC,                                03710005
CVT999*                          PARM-ID1,                              03720005
CVT999*                          PARM-OLD-PHONE-NO,                     03730005
CVT999*                          TDSCHAR,                               03740005
CVT999*                          MAX-LENGTH-PARM,                       03750005
CVT999*                          PARM-L.                                03760005
037700                                                                  
CVT999*    ADD  1                           TO PARM-ID1.                03780000
CVT999*    MOVE LENGTH OF PARM-PHONE-NO     TO MAX-LENGTH-PARM.         03790000
038000                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03810000
CVT999*                          GWL-RC,                                03820000
CVT999*                          PARM-ID1,                              03830000
CVT999*                          PARM-PHONE-NO,                         03840000
CVT999*                          TDSCHAR,                               03850000
CVT999*                          MAX-LENGTH-PARM,                       03860000
CVT999*                          PARM-L.                                03870000
038800                                                                  
CVT999*    ADD  1                               TO PARM-ID1.            03890005
CVT999*    MOVE LENGTH OF PARM-OLD-EXTENSION-NO TO MAX-LENGTH-PARM.     03900005
039100                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              03920005
CVT999*                          GWL-RC,                                03930005
CVT999*                          PARM-ID1,                              03940005
CVT999*                          PARM-OLD-EXTENSION-NO,                 03950005
CVT999*                          TDSCHAR,                               03960005
CVT999*                          MAX-LENGTH-PARM,                       03970005
CVT999*                          PARM-L.                                03980005
039900                                                                  
040000                                                                  
CVT999*    ADD  1                           TO PARM-ID1.                04010005
CVT999*    MOVE LENGTH OF PARM-EXTENSION-NO TO MAX-LENGTH-PARM.         04020005
040300                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              04040002
CVT999*                          GWL-RC,                                04050002
CVT999*                          PARM-ID1,                              04060002
CVT999*                          PARM-EXTENSION-NO,                     04070002
CVT999*                          TDSCHAR,                               04080002
CVT999*                          MAX-LENGTH-PARM,                       04090002
CVT999*                          PARM-L.                                04100002
041100                                                                  
CVT999*    ADD  1                             TO PARM-ID1.              04120005
CVT999*    MOVE LENGTH OF PARM-OLD-PHONE-TYPE TO MAX-LENGTH-PARM.       04130005
041400                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              04150005
CVT999*                          GWL-RC,                                04160005
CVT999*                          PARM-ID1,                              04170005
CVT999*                          PARM-OLD-PHONE-TYPE,                   04180005
CVT999*                          TDSCHAR,                               04190005
CVT999*                          MAX-LENGTH-PARM,                       04200005
CVT999*                          PARM-L.                                04210005
042200                                                                  
CVT999*    ADD  1                             TO PARM-ID1.              04230000
CVT999*    MOVE LENGTH OF PARM-PHONE-TYPE     TO MAX-LENGTH-PARM.       04240000
042500                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              04260000
CVT999*                          GWL-RC,                                04270000
CVT999*                          PARM-ID1,                              04280000
CVT999*                          PARM-PHONE-TYPE,                       04290000
CVT999*                          TDSCHAR,                               04300000
CVT999*                          MAX-LENGTH-PARM,                       04310000
CVT999*                          PARM-L.                                04320000
043300                                                                  
CVT999*    ADD  1                            TO PARM-ID1.               04340000
CVT999*    MOVE LENGTH OF PARM-USER-ID       TO MAX-LENGTH-PARM.        04350000
043600                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              04370000
CVT999*                          GWL-RC,                                04380000
CVT999*                          PARM-ID1,                              04390000
CVT999*                          PARM-USER-ID,                          04400000
CVT999*                          TDSCHAR,                               04410000
CVT999*                          MAX-LENGTH-PARM,                       04420000
CVT999*                          PARM-L.                                04430000
044400                                                                  
CVT999*    ADD  1                            TO PARM-ID1.               04450000
CVT999*    MOVE LENGTH OF PARM-RESP-AREA-ID  TO MAX-LENGTH-PARM.        04460000
044700                                                                  
CVT999*    CALL 'TDRCVPRM' USING GWL-PROC,                              04480000
CVT999*                          GWL-RC,                                04490000
CVT999*                          PARM-ID1,                              04500000
CVT999*                          PARM-RESP-AREA-ID,                     04510000
CVT999*                          TDSCHAR,                               04520000
CVT999*                          MAX-LENGTH-PARM,                       04530000
CVT999*                          PARM-L.                                04540000
045500                                                                  
CVT999*     ADD 1                    TO PARM-ID1.                       04560000
CVT999*     MOVE LENGTH OF PARM-COMMENT-LEN TO MAX-LENGTH-PARM,         04570000
CVT999*     CALL 'TDRCVPRM' USING GWL-PROC,                             04580000
CVT999*                           GWL-RC,                               04590000
CVT999*                           PARM-ID1,                             04600000
CVT999*                           PARM-COMMENT-LEN,                     04610000
CVT999*                           TDSCHAR,                              04620000
CVT999*                           MAX-LENGTH-PARM,                      04630000
CVT999*                           PARM-L.                               04640000
046500                                                                  
CVT999*     ADD 1                    TO PARM-ID1.                       04660000
CVT999*     MOVE LENGTH OF PARM-COMMENT-TEXT TO MAX-LENGTH-PARM,        04670000
CVT999*     CALL 'TDRCVPRM' USING GWL-PROC,                             04680000
CVT999*                           GWL-RC,                               04690000
CVT999*                           PARM-ID1,                             04700000
CVT999*                           PARM-COMMENT-TEXT,                    04710000
CVT999*                           TDSCHAR,                              04720000
CVT999*                           MAX-LENGTH-PARM,                      04730000
CVT999*                           PARM-L.                               04740000
047500                                                                  
047600 1100-EXIT.                                                       
047700     EXIT.                                                        
047800                                                                  
047900******************************************************************04790000
048000* 2000-PROCESS-OUTPUT.                                           *04800000
048100******************************************************************04810000
048200 2000-PROCESS-OUTPUT.                                             
048300                                                                  
048400     PERFORM 2100-DESCRIBE-RESULT THRU 2100-EXIT.                 
048500     PERFORM 5000-UPDATE           THRU 5000-EXIT.                
048600                                                                  
048700 2000-EXIT.                                                       
048800     EXIT.                                                        
048900                                                                  
049000******************************************************************04900000
049100* 2100-DESCRIBE-RESULT                                           *04910000
049200******************************************************************04920000
049300                                                                  
049400 2100-DESCRIBE-RESULT.                                            
049500        MOVE '2100'          TO ACTIVE-PARAGRAPH.                 
049600                                                                  
CVT999*       MOVE 1       TO CTR-COLUMN.                               04970000
CVT999*       MOVE TDSINT4 TO DB-HOST-TYPE.                             04980000
CVT999*       MOVE TDSINT4 TO DB-CLIENT-TYPE.                           04990000
CVT999*       MOVE LENGTH OF RS-RETURN-CODE      TO WRKLEN1.            05000000
CVT999*       MOVE LENGTH OF CNS-RETURN-CODE     TO WRKLEN2.            05010000
050200                                                                  
CVT999*       CALL 'TDESCRIB' USING GWL-PROC,                           05030000
CVT999*                             GWL-RC,                             05040000
CVT999*                             CTR-COLUMN,                         05050000
CVT999*                             DB-HOST-TYPE,                       05060000
CVT999*                             WRKLEN1,                            05070000
CVT999*                             RS-RETURN-CODE,                     05080000
CVT999*                             DB-NULL-INDICATOR,                  05090000
CVT999*                             TDS-FALSE,                          05100000
CVT999*                             DB-CLIENT-TYPE,                     05110000
CVT999*                             WRKLEN1,                            05120000
CVT999*                             CNS-RETURN-CODE,                    05130000
CVT999*                             WRKLEN2.                            05140000
051500                                                                  
CVT999*        PERFORM 9100-CHECK-ERROR THRU 9100-EXIT.                 05160000
051700                                                                  
051800 2100-EXIT.                                                       
051900     EXIT.                                                        
052000                                                                  
052100                                                                  
052200******************************************************************05220000
052300* 5000-UPDATE                                                    *05230000
052400******************************************************************05240000
052500 5000-UPDATE.                                                     
052600                                                                  
052700     IF PARM-PHONE-ACTION      = 'I'                              
052800        PERFORM 5100-MOVE-TRAN-HEAD THRU 5100-EXIT                
052900        PERFORM 5200-MOVE-TRAN-DET  THRU 5200-EXIT                
053000        MOVE WS-CONTACT-ID-COMP3  TO LP-CONTACT-ID                
053100        MOVE PARM-PHONE-NO        TO LP-PHONE-NO                  
053200        MOVE PARM-EXTENSION-NO    TO LP-EXTENSION-NO              
053300        MOVE PARM-PHONE-TYPE      TO LP-PHONE-TYPE                
053400        PERFORM 7120-INSERT-PHONE   THRU 7120-EXIT                
053500     ELSE IF PARM-PHONE-ACTION = 'D'                              
053600*       PERFORM 7110-SELECT-PHONE   THRU 7110-EXIT                05360005
053700        PERFORM 5100-MOVE-TRAN-HEAD THRU 5100-EXIT                
053800        PERFORM 5200-MOVE-TRAN-DET  THRU 5200-EXIT                
053900        MOVE WS-CONTACT-ID-COMP3  TO LP-CONTACT-ID                
054000        MOVE PARM-OLD-PHONE-TYPE  TO LP-PHONE-TYPE                
054100        PERFORM 7130-DELETE-PHONE   THRU 7130-EXIT                
054200        MOVE SPACES                 TO PARM-PHONE-NO              
054300        MOVE SPACES                 TO PARM-PHONE-TYPE            
054400     ELSE IF PARM-PHONE-ACTION = 'U'                              
054500*       PERFORM 7110-SELECT-PHONE   THRU 7110-EXIT                05450005
054600        PERFORM 5100-MOVE-TRAN-HEAD THRU 5100-EXIT                
054700        PERFORM 5200-MOVE-TRAN-DET  THRU 5200-EXIT                
054800        MOVE WS-CONTACT-ID-COMP3  TO LP-CONTACT-ID                
054900        MOVE PARM-PHONE-NO        TO LP-PHONE-NO                  
055000        MOVE PARM-EXTENSION-NO    TO LP-EXTENSION-NO              
055100        IF PARM-PHONE-TYPE = PARM-OLD-PHONE-TYPE                  
055200          MOVE PARM-PHONE-TYPE      TO LP-PHONE-TYPE              
055300          PERFORM 7140-UPDATE-PHONE THRU 7140-EXIT                
055400        ELSE                                                      
T28938          IF PARM-OLD-PHONE-TYPE EQUAL SPACES                     
T28938             MOVE PARM-PHONE-TYPE      TO LP-PHONE-TYPE           
T28938             PERFORM 7120-INSERT-PHONE THRU 7120-EXIT             
T28938          ELSE                                                    
055500            MOVE PARM-OLD-PHONE-TYPE TO LP-PHONE-TYPE             
T28938            PERFORM 7150-CHECK-FOR-OLD-PHONE THRU 7150-EXIT       
T28938            IF WS-CONTACT-PHONE-EXISTS = 0 THEN                   
T28938              NEXT SENTENCE                                       
T28938            ELSE                                                  
T28938              PERFORM 7130-DELETE-PHONE THRU 7130-EXIT            
T28938            END-IF                                                
055700            MOVE PARM-PHONE-TYPE    TO LP-PHONE-TYPE              
055800            PERFORM 7120-INSERT-PHONE THRU 7120-EXIT              
T28938          END-IF                                                  
055900        END-IF                                                    
056000     ELSE                                                         
056100        MOVE PROGRAM-NAME    TO ABEND-PROGRAM                     
056200        MOVE '5000'          TO ACTIVE-PARAGRAPH                  
056300        MOVE 'BAD PARM-ACTION'    TO ABEND-FUNCTION               
056400        MOVE 'PROGRAMMER LOGIC'   TO TABLE-1                      
056500        MOVE 'PARM-PHONE-ACTION'  TO TABLE-ELEMENT-1              
056600        MOVE  PARM-PHONE-ACTION   TO HOSTVAR-ELEMENT-1            
056700        PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT            
056800        PERFORM 9900-SQL-ERROR-ROUTINE  THRU 9900-EXIT            
056900     END-IF
                END-IF
           END-IF.                                                      
057000                                                                  
057100     MOVE WS-ACTIVE-RETURN-CODE TO RS-RETURN-CODE.                
057200     MOVE '5000'          TO ACTIVE-PARAGRAPH                     
057300     PERFORM 8100-SEND-RESULT      THRU 8100-EXIT.                
057400                                                                  
057500 5000-EXIT.                                                       
057600     EXIT.                                                        
057700                                                                  
057800***************************************************************   05780000
057900* MOVE FIELDS TO THE MAINTENANCE TRANSACTION HEADER AND       *   05790000
058000* CALL COMMON PARAGRAPH FOR WRITING A ROW.                    *   05800000
058100***************************************************************   05810000
058200 5100-MOVE-TRAN-HEAD.                                             
058300                                                                  
058400     EXEC SQL                                                     
058500        SELECT
              REPLACE(REPLACE(CONVERT(CHAR(26), CIS.CURRENT$TIMESTAMP()
           , 121), ' ', '-'), ':', '.')
            INTO
              :MH-TRANS-HIST-SEQ-NO           
058600     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ006
MFA-TR* MSQ028
MFA-TR* MSQ061
MFA-TR*    EXEC SQL                                                             
MFA-TR*       SET   :MH-TRANS-HIST-SEQ-NO = CURRENT TIMESTAMP                   
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

058700                                                                  
058800     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
058900                                                                  
059000     IF WS-ACTIVE-RETURN-CODE EQUAL SUCCESSFUL-CALL               
059100         NEXT SENTENCE                                            
059200     ELSE                                                         
059300         MOVE SPACES  TO ABEND-TABLES                             
059400         MOVE SPACES  TO ABEND-SQL-PREDICATES                     
059500         MOVE PROGRAM-NAME TO ABEND-PROGRAM                       
CBSI           MOVE '5100'              TO ACTIVE-PARAGRAPH             
CBSI           MOVE 'SET'               TO ABEND-FUNCTION               
CBSI           MOVE 'ACCOUNT_NO'        TO TABLE-ELEMENT-1              
CBSI           MOVE WS-ACCOUNT-NO-NUM   TO HOSTVAR-ELEMENT-1            
059700         PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT           
059800         PERFORM 9900-SQL-ERROR-ROUTINE THRU 9900-EXIT
           END-IF.           
059900                                                                  
060000     EXEC SQL                                                     
060100        SELECT
              CAST(SYSDATETIMEOFFSET() AS DATE)
            INTO
              :MH-DATE-TRANS                       
060200     END-EXEC.                                                    

MFA-TR* TRANSFORMATION LIST
MFA-TR* MSQ006
MFA-TR* MSQ028
MFA-TR*    EXEC SQL                                                             
MFA-TR*       SET   :MH-DATE-TRANS = CURRENT DATE                               
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

060300                                                                  
060400     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
060500                                                                  
060600     IF WS-ACTIVE-RETURN-CODE EQUAL SUCCESSFUL-CALL               
060700         NEXT SENTENCE                                            
060800     ELSE                                                         
060900         MOVE SPACES  TO ABEND-TABLES                             
061000         MOVE SPACES  TO ABEND-SQL-PREDICATES                     
061100         MOVE PROGRAM-NAME TO ABEND-PROGRAM                       
CBSI           MOVE '5100'       TO ACTIVE-PARAGRAPH                    
CBSI           MOVE 'SET'        TO ABEND-FUNCTION                      
CBSI           MOVE 'ACCOUNT_NO'        TO TABLE-ELEMENT-1              
CBSI           MOVE WS-ACCOUNT-NO-NUM   TO HOSTVAR-ELEMENT-1            
061300         PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT           
061400         PERFORM 9900-SQL-ERROR-ROUTINE THRU 9900-EXIT
           END-IF.           
061500                                                                  
061600     MOVE 'F'                TO MH-CODE-TRAN-TYPE.                
061700     MOVE PARM-RESP-AREA-ID  TO MH-RESP-AREA-ID.                  
061800     IF PARM-CONTACT-ENTITY-IND = 'A'                             
061900       MOVE WS-ACCOUNT-NO-NUM  TO MH-ACCOUNT-NO                   
062000       MOVE ZEROES             TO MH-CUSTOMER-NO                  
062100       MOVE ZEROES             TO MH-PREMISE-NO                   
062200     ELSE IF PARM-CONTACT-ENTITY-IND = 'C'                        
062300       MOVE ZEROS              TO MH-ACCOUNT-NO                   
062400       MOVE WS-CUSTOMER-NO-NUM TO MH-CUSTOMER-NO                  
062500       MOVE ZEROES             TO MH-PREMISE-NO                   
062600     ELSE IF PARM-CONTACT-ENTITY-IND = 'P'                        
062700       MOVE ZEROS              TO MH-ACCOUNT-NO                   
062800       MOVE ZEROES             TO MH-CUSTOMER-NO                  
062900       MOVE WS-PREMISE-NO-NUM  TO MH-PREMISE-NO                   
063000     END-IF
                END-IF
           END-IF.                                                      
063100     MOVE PARM-USER-ID       TO MH-USER-ID.                       
063200     MOVE 'PANEL434'         TO MH-APPL-PROGRAM-ID.               
063300     MOVE PARM-COMMENT-LEN   TO WS-COMMENT-LEN.                   
063400     MOVE WS-COMMENT-LEN-NUM TO MH-TRAN-COMMENT-LEN.              
063500     MOVE PARM-COMMENT-TEXT  TO MH-TRAN-COMMENT-TEXT.             
063600                                                                  
063700 5100-EXIT.                                                       
063800     EXIT.                                                        
063900                                                                  
064000***************************************************************   06260000
064100* MOVE FIELDS TO THE MAINTENANCE TRANSACTION DETAIL AND       *   06270000
064200* CALL COMMON PARAGRAPH FOR WRITING A ROW.                    *   06280000
064300***************************************************************   06290000
064400   5200-MOVE-TRAN-DET.                                            
064500       MOVE '5200' TO ACTIVE-PARAGRAPH.                           
064600       MOVE MH-TRANS-HIST-SEQ-NO TO MI-TRANS-HIST-SEQ-NO.         
064700       MOVE 1 TO WS-TRAN-APPL-NO MI-TRAN-APPL-NO.                 
064800       IF PARM-PHONE-NO         NOT = PARM-OLD-PHONE-NO           
064900           MOVE +14 TO MI-PRV-COLUMN-VALUE-LEN                    
065000                       MI-CHG-COLUMN-VALUE-LEN                    
065100           MOVE SPACES TO MI-CHG-COLUMN-VALUE-TEXT                
065200           MOVE SPACES TO MI-PRV-COLUMN-VALUE-TEXT                
065300           IF PARM-PHONE-ACTION = 'D'                             
065400               MOVE '*DELETED*'       TO MI-CHG-COLUMN-VALUE-TEXT 
065500           ELSE                                                   
065600               MOVE PARM-PHONE-NO (1:3) TO WS-AREA-CODE           
065700               MOVE PARM-PHONE-NO (4:3) TO WS-PHONE-PREFIX        
065800               MOVE PARM-PHONE-NO (7:4) TO WS-PHONE-SUFFIX        
065900               MOVE WS-PHONE-NO-FORMATTED                         
066000                                      TO MI-CHG-COLUMN-VALUE-TEXT 
066100           END-IF                                                 
066200           IF PARM-PHONE-ACTION = 'I'                             
066300               MOVE '*NEW*'           TO MI-PRV-COLUMN-VALUE-TEXT 
066400           ELSE                                                   
066500               MOVE PARM-OLD-PHONE-NO (1:3) TO WS-AREA-CODE       
066600               MOVE PARM-OLD-PHONE-NO (4:3) TO WS-PHONE-PREFIX    
066700               MOVE PARM-OLD-PHONE-NO (7:4) TO WS-PHONE-SUFFIX    
066800               MOVE WS-PHONE-NO-FORMATTED                         
066900                                      TO MI-PRV-COLUMN-VALUE-TEXT 
067000           END-IF                                                 
067100           MOVE 'PHONE NO       ' TO MI-COLUMN-DESC               
067200           MOVE SPACES            TO MI-TABLE-ID                  
067300           PERFORM 6530-LOAD-MNT-TRANS-HIST THRU 6530-EXIT        
067400           ADD 1 TO WS-TRAN-APPL-NO                               
067500       END-IF.                                                    
067600                                                                  
067700       MOVE WS-TRAN-APPL-NO TO MI-TRAN-APPL-NO                    
067800       IF PARM-PHONE-TYPE   NOT = PARM-OLD-PHONE-TYPE             
067900           MOVE SPACES TO MI-CHG-COLUMN-VALUE-TEXT                
068000           MOVE SPACES TO MI-PRV-COLUMN-VALUE-TEXT                
068100           IF PARM-PHONE-ACTION = 'D'                             
068200               MOVE +9          TO MI-CHG-COLUMN-VALUE-LEN        
068300               MOVE '*DELETED*' TO MI-CHG-COLUMN-VALUE-TEXT       
068400           ELSE                                                   
068500               MOVE +2              TO MI-CHG-COLUMN-VALUE-LEN    
068600               MOVE PARM-PHONE-TYPE TO MI-CHG-COLUMN-VALUE-TEXT   
068700           END-IF                                                 
068800           IF PARM-PHONE-ACTION = 'I'                             
068900               MOVE +5      TO MI-PRV-COLUMN-VALUE-LEN            
069000               MOVE '*NEW*' TO MI-PRV-COLUMN-VALUE-TEXT           
069100           ELSE                                                   
069200               MOVE +2            TO MI-PRV-COLUMN-VALUE-LEN      
069300               MOVE PARM-OLD-PHONE-TYPE                           
069400                      TO  MI-PRV-COLUMN-VALUE-TEXT                
069500           END-IF                                                 
069600           MOVE 'PHONE TYPE     ' TO MI-COLUMN-DESC               
069700           MOVE WS-EDIT-STYLE-ID  TO MI-TABLE-ID                  
069800           PERFORM 6530-LOAD-MNT-TRANS-HIST THRU 6530-EXIT        
069900           ADD 1 TO WS-TRAN-APPL-NO                               
070000       END-IF.                                                    
070100                                                                  
070200       MOVE WS-TRAN-APPL-NO TO MI-TRAN-APPL-NO                    
070300       IF PARM-EXTENSION-NO   NOT = PARM-OLD-EXTENSION-NO         
070400           MOVE SPACES TO MI-CHG-COLUMN-VALUE-TEXT                
070500           MOVE SPACES TO MI-PRV-COLUMN-VALUE-TEXT                
070600           IF PARM-PHONE-ACTION = 'D'                             
070700               MOVE +9          TO MI-CHG-COLUMN-VALUE-LEN        
070800               MOVE '*DELETED*' TO MI-CHG-COLUMN-VALUE-TEXT       
070900           ELSE                                                   
071000               MOVE +6          TO MI-CHG-COLUMN-VALUE-LEN        
071100               MOVE PARM-EXTENSION-NO                             
071200                              TO MI-CHG-COLUMN-VALUE-TEXT         
071300           END-IF                                                 
071400           IF PARM-PHONE-ACTION = 'I'                             
071500               MOVE +5          TO MI-PRV-COLUMN-VALUE-LEN        
071600               MOVE '*NEW*'     TO MI-PRV-COLUMN-VALUE-TEXT       
071700           ELSE                                                   
071800               MOVE +6            TO MI-PRV-COLUMN-VALUE-LEN      
071900               MOVE PARM-OLD-EXTENSION-NO                         
072000                              TO MI-PRV-COLUMN-VALUE-TEXT         
072100           END-IF                                                 
072200           MOVE 'EXTENSION NO.  ' TO MI-COLUMN-DESC               
072300           MOVE SPACES            TO MI-TABLE-ID                  
072400           PERFORM 6530-LOAD-MNT-TRANS-HIST THRU 6530-EXIT        
072500           ADD 1 TO WS-TRAN-APPL-NO                               
072600       END-IF.                                                    
072700                                                                  
072800 5200-EXIT.                                                       
072900     EXIT.                                                        
073000                                                                  
073100                                                                  
073200     EXEC SQL                                                     07180000
073300        INCLUDE CPD00067                                          07190000
073400     END-EXEC.                                                    07200000
073500                                                                  
HPCCDM*EJECT                                                            07220000
073700                                                                  
073800                                                                  
073900******************************************************************07250000
074000* 7110-SELECT-PHONE                                              *07260000
074100******************************************************************07270000
074200 7110-SELECT-PHONE.                                               
074300                                                                  
074400     EXEC SQL                                                     
074500        SELECT PHONE_NO,                                          
074600               EXTENSION_NO                                       
074700        INTO   :LP-PHONE-NO,                                      
074800               :LP-EXTENSION-NO                                   
074900        FROM CSS_CONTACT_PHONE                                    
075000        WHERE  CONTACT_ID  = :LP-CONTACT-ID                       
075100        AND    PHONE_TYPE  = :LP-PHONE-TYPE                       
075200     END-EXEC.                                                    

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

075300                                                                  
075400     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
075500                                                                  
075600     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL                   
075700        NEXT SENTENCE                                             
075800     ELSE                                                         
075900        MOVE PROGRAM-NAME    TO ABEND-PROGRAM                     
076000        MOVE '7110'          TO ACTIVE-PARAGRAPH                  
076100        MOVE 'SELECT'             TO ABEND-FUNCTION               
076200        MOVE 'CSS_CONTACT_PHONE'  TO TABLE-1                      
076300        MOVE 'CONTACT_ID'         TO TABLE-ELEMENT-2              
CBSI          MOVE 'PHONE_TYPE'         TO TABLE-ELEMENT-3              
076500        IF PARM-CONTACT-ENTITY-IND = 'A'                          
076600          MOVE 'ACCOUNT_NO'        TO TABLE-ELEMENT-1             
076700          MOVE WS-ACCOUNT-NO-NUM   TO HOSTVAR-ELEMENT-1           
076800        ELSE IF PARM-CONTACT-ENTITY-IND = 'C'                     
076900          MOVE 'CUSTOMER_NO'        TO TABLE-ELEMENT-1            
077000          MOVE WS-CUSTOMER-NO-NUM   TO HOSTVAR-ELEMENT-1          
077100        ELSE IF PARM-CONTACT-ENTITY-IND = 'P'                     
077200          MOVE 'PREMISE_NO'         TO TABLE-ELEMENT-1            
077300          MOVE WS-PREMISE-NO-NUM    TO HOSTVAR-ELEMENT-1          
077400        END-IF                                                    
077500        MOVE WS-CONTACT-ID-COMP3  TO HOSTVAR-ELEMENT-2            
CBSI          MOVE LP-PHONE-TYPE        TO HOSTVAR-ELEMENT-3            
077700        PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT            
077800        PERFORM 9900-SQL-ERROR-ROUTINE  THRU 9900-EXIT            
077900     END-IF
              END-IF
           END-IF.                                                      
078000                                                                  
078100 7110-EXIT.                                                       
078200     EXIT.                                                        
078300                                                                  
078400                                                                  
078500******************************************************************07710000
078600* 7120-INSERT-PHONE                                              *07720000
078700******************************************************************07730000
078800 7120-INSERT-PHONE.                                               
078900                                                                  
079000     EXEC SQL                                                     
079100        INSERT INTO CSS_CONTACT_PHONE                             
079200               (    CONTACT_ID        ,                           
079300                    PHONE_NO          ,                           
079400                    PHONE_TYPE        ,                           
079500                    EXTENSION_NO      )                           
079600        VALUES (:LP-CONTACT-ID        ,                           
079700                :LP-PHONE-NO          ,                           
079800                :LP-PHONE-TYPE        ,                           
079900                :LP-EXTENSION-NO      )                           
080000     END-EXEC.                                                    

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

080100                                                                  
080200     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
080300                                                                  
080400     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL                   
080500        NEXT SENTENCE                                             
080600     ELSE                                                         
080700        MOVE PROGRAM-NAME    TO ABEND-PROGRAM                     
080800        MOVE '7120'          TO ACTIVE-PARAGRAPH                  
080900        MOVE 'INSERT'             TO ABEND-FUNCTION               
081000        MOVE 'CSS_CONTACT_PHONE'  TO TABLE-1                      
081100        MOVE 'CONTACT_ID'         TO TABLE-ELEMENT-2              
081200        MOVE 'PHONE_NO'           TO TABLE-ELEMENT-3              
CBSI          MOVE 'PHONE_TYPE'         TO TABLE-ELEMENT-4              
081300        IF PARM-CONTACT-ENTITY-IND = 'A'                          
081400          MOVE 'ACCOUNT_NO'        TO TABLE-ELEMENT-1             
081500          MOVE WS-ACCOUNT-NO-NUM   TO HOSTVAR-ELEMENT-1           
081600        ELSE IF PARM-CONTACT-ENTITY-IND = 'C'                     
081700          MOVE 'CUSTOMER_NO'        TO TABLE-ELEMENT-1            
081800          MOVE WS-CUSTOMER-NO-NUM   TO HOSTVAR-ELEMENT-1          
081900        ELSE IF PARM-CONTACT-ENTITY-IND = 'P'                     
082000          MOVE 'PREMISE_NO'         TO TABLE-ELEMENT-1            
082100          MOVE WS-PREMISE-NO-NUM    TO HOSTVAR-ELEMENT-1          
082200        END-IF                                                    
082300        MOVE LP-CONTACT-ID        TO HOSTVAR-ELEMENT-2            
082400        MOVE LP-PHONE-NO          TO HOSTVAR-ELEMENT-3            
CBSI          MOVE LP-PHONE-TYPE        TO HOSTVAR-ELEMENT-4            
082500        PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT            
082600        PERFORM 9900-SQL-ERROR-ROUTINE  THRU 9900-EXIT            
082700     END-IF
              END-IF
           END-IF.                                                      
082800                                                                  
082900 7120-EXIT.                                                       
083000     EXIT.                                                        
083100                                                                  
083200                                                                  
083300******************************************************************08190000
083400* 7130-DELETE-PHONE                                              *08200000
083500******************************************************************08210000
083600 7130-DELETE-PHONE.                                               
083700                                                                  
083800     EXEC SQL                                                     
083900        DELETE FROM CSS_CONTACT_PHONE                             
084000         WHERE CONTACT_ID  = :LP-CONTACT-ID                       
084100           AND PHONE_TYPE  = :LP-PHONE-TYPE                       
084200     END-EXEC.                                                    

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

                                                                        
084400     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
084500                                                                  
084600     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL                   
084700        NEXT SENTENCE                                             
084800     ELSE                                                         
084900        MOVE PROGRAM-NAME    TO ABEND-PROGRAM                     
085000        MOVE '7130'          TO ACTIVE-PARAGRAPH                  
085100        MOVE 'DELETE'             TO ABEND-FUNCTION               
085200        MOVE 'CSS_CONTACT_PHONE'  TO TABLE-1                      
085300        MOVE 'CONTACT_ID'         TO TABLE-ELEMENT-2              
085400        MOVE 'PHONE_TYPE'         TO TABLE-ELEMENT-3              
085500        IF PARM-CONTACT-ENTITY-IND = 'A'                          
085600          MOVE 'ACCOUNT_NO'        TO TABLE-ELEMENT-1             
085700          MOVE WS-ACCOUNT-NO-NUM   TO HOSTVAR-ELEMENT-1           
085800        ELSE IF PARM-CONTACT-ENTITY-IND = 'C'                     
085900          MOVE 'CUSTOMER_NO'        TO TABLE-ELEMENT-1            
086000          MOVE WS-CUSTOMER-NO-NUM   TO HOSTVAR-ELEMENT-1          
086100        ELSE IF PARM-CONTACT-ENTITY-IND = 'P'                     
086200          MOVE 'PREMISE_NO'         TO TABLE-ELEMENT-1            
086300          MOVE WS-PREMISE-NO-NUM    TO HOSTVAR-ELEMENT-1          
086400        END-IF                                                    
086500        MOVE WS-CONTACT-ID-COMP3  TO HOSTVAR-ELEMENT-2            
086600        MOVE PARM-OLD-PHONE-TYPE  TO HOSTVAR-ELEMENT-3            
086700        PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT            
086800        PERFORM 9900-SQL-ERROR-ROUTINE  THRU 9900-EXIT            
086900     END-IF
              END-IF
           END-IF.                                                      
087000                                                                  
087100 7130-EXIT.                                                       
087200     EXIT.                                                        
087300                                                                  
087400******************************************************************08600000
087500* 7140-UPDATE-PHONE                                              *08610000
087600******************************************************************08620000
087700 7140-UPDATE-PHONE.                                               
087800                                                                  
087900     EXEC SQL                                                     
088000        UPDATE CSS_CONTACT_PHONE                                  
088100           SET PHONE_NO     = :LP-PHONE-NO    ,                   
088200               EXTENSION_NO = :LP-EXTENSION-NO                    
088300         WHERE CONTACT_ID  = :LP-CONTACT-ID                       
088400           AND PHONE_TYPE  = :LP-PHONE-TYPE                       
088500     END-EXEC.                                                    

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

088600                                                                  
088700     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
088800                                                                  
088900     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL OR -803           
089000        NEXT SENTENCE                                             
089100     ELSE                                                         
089200        MOVE PROGRAM-NAME    TO ABEND-PROGRAM                     
089300        MOVE '7140'          TO ACTIVE-PARAGRAPH                  
089400        MOVE 'UPDATE'             TO ABEND-FUNCTION               
089500        MOVE 'CSS_CONTACT_PHONE'  TO TABLE-1                      
089600        MOVE 'CONTACT_ID'         TO TABLE-ELEMENT-2              
089700        MOVE 'PHONE_TYPE'         TO TABLE-ELEMENT-3              
CBSI          MOVE 'PHONE_NO'           TO TABLE-ELEMENT-4              
089800        IF PARM-CONTACT-ENTITY-IND = 'A'                          
089900          MOVE 'ACCOUNT_NO'        TO TABLE-ELEMENT-1             
090000          MOVE WS-ACCOUNT-NO-NUM   TO HOSTVAR-ELEMENT-1           
090100        ELSE IF PARM-CONTACT-ENTITY-IND = 'C'                     
090200          MOVE 'CUSTOMER_NO'        TO TABLE-ELEMENT-1            
090300          MOVE WS-CUSTOMER-NO-NUM   TO HOSTVAR-ELEMENT-1          
090400        ELSE IF PARM-CONTACT-ENTITY-IND = 'P'                     
090500          MOVE 'PREMISE_NO'         TO TABLE-ELEMENT-1            
090600          MOVE WS-PREMISE-NO-NUM    TO HOSTVAR-ELEMENT-1          
090700        END-IF                                                    
090800        MOVE WS-CONTACT-ID-COMP3  TO HOSTVAR-ELEMENT-2            
090900        MOVE PARM-OLD-PHONE-TYPE  TO HOSTVAR-ELEMENT-3            
CBSI          MOVE LP-PHONE-NO          TO HOSTVAR-ELEMENT-4            
091000        PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT            
091100        PERFORM 9900-SQL-ERROR-ROUTINE  THRU 9900-EXIT            
091200     END-IF
              END-IF
           END-IF.                                                      
091300                                                                  
091400 7140-EXIT.                                                       
091500     EXIT.                                                        
091600                                                                  
083300******************************************************************08190000
083400* 7150-CHECK-FOR-OLD-PHONE                                       *08200000
083500******************************************************************08210000
083600 7150-CHECK-FOR-OLD-PHONE.                                        
083700                                                                  
T28938     EXEC SQL                                                     
T28938        SELECT COUNT(*)                                           
T28938        INTO :WS-CONTACT-PHONE-EXISTS                             
T28938        FROM CSS_CONTACT_PHONE                                    
T28938         WHERE CONTACT_ID  = :LP-CONTACT-ID                       
T28938           AND PHONE_TYPE  = :LP-PHONE-TYPE                       
T28938     END-EXEC.                                                    

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

                                                                        
084400     MOVE SQLCODE TO WS-ACTIVE-RETURN-CODE.                       
084500                                                                  
084600     IF WS-ACTIVE-RETURN-CODE = SUCCESSFUL-CALL                   
084700        NEXT SENTENCE                                             
084800     ELSE                                                         
084900        MOVE PROGRAM-NAME    TO ABEND-PROGRAM                     
085000        MOVE '7150'          TO ACTIVE-PARAGRAPH                  
085100        MOVE 'SELECT'             TO ABEND-FUNCTION               
085200        MOVE 'CSS_CONTACT_PHONE'  TO TABLE-1                      
085300        MOVE 'CONTACT_ID'         TO TABLE-ELEMENT-2              
085400        MOVE 'PHONE_TYPE'         TO TABLE-ELEMENT-3              
085500        IF PARM-CONTACT-ENTITY-IND = 'A'                          
085600          MOVE 'ACCOUNT_NO'        TO TABLE-ELEMENT-1             
085700          MOVE WS-ACCOUNT-NO-NUM   TO HOSTVAR-ELEMENT-1           
085800        ELSE IF PARM-CONTACT-ENTITY-IND = 'C'                     
085900          MOVE 'CUSTOMER_NO'        TO TABLE-ELEMENT-1            
086000          MOVE WS-CUSTOMER-NO-NUM   TO HOSTVAR-ELEMENT-1          
086100        ELSE IF PARM-CONTACT-ENTITY-IND = 'P'                     
086200          MOVE 'PREMISE_NO'         TO TABLE-ELEMENT-1            
086300          MOVE WS-PREMISE-NO-NUM    TO HOSTVAR-ELEMENT-1          
086400        END-IF                                                    
086500        MOVE WS-CONTACT-ID-COMP3  TO HOSTVAR-ELEMENT-2            
086600        MOVE PARM-OLD-PHONE-TYPE  TO HOSTVAR-ELEMENT-3            
086700        PERFORM 9000-SEND-ERROR-RESULT  THRU 9000-EXIT            
086800        PERFORM 9900-SQL-ERROR-ROUTINE  THRU 9900-EXIT            
086900     END-IF
              END-IF
           END-IF.                                                      
087000                                                                  
087100 7150-EXIT.                                                       
087200     EXIT.                                                        
087300                                                                  
091700******************************************************************09030000
091800* 9900- JOURNALING / ERROR HANDLING INCLUDE                      *09040000
091900******************************************************************09050000
092000     EXEC SQL                                                     09060000
092100        INCLUDE CPDSP300                                          09070000
092200     END-EXEC.                                                    09080000
092300                                                                  
092400******************************************************************09100000
092500*       END PROGRAM COPYLIB                                      *09110000
092600******************************************************************09120000
CVT999*    COPY CPD00302.                                               09130000
092800                                                                  
CVT000 8100-SEND-RESULT.                                                
CVT000       ADD 1 TO CTR-ROWS.                                         
CVT000 8100-EXIT.                                                       
CVT000        EXIT.                                                     
CVT000     EXEC SQL                                                     00000100
CVT000         INCLUDE CPD00321                                         00000200
CVT000     END-EXEC.                                                    00000300
