      PROGRAM UERREP2T                                                          
C                                                                               
C                                                                               
C     Initialise.                                                               
C                                                                               
      CALL UERSET('TESTING','I','E','F')                                        
      CALL UERLU(7)                                                             
C                                                                               
C     TEST(1):CALL UERREP WITH UERENO=0                                         
C     *********************************                                         
C                                                                               
      CALL RITE(1)                                                              
      CALL UERERR('UERERR2',1,0,0,'E')                                          
      CALL UERREP('UERTREP2',1,.FALSE.)                                         
C                                                                               
C                                                                               
C     TEST(2):CALL UERREP WITH LEN(PACKGE)=0                                    
C     **************************************                                    
C                                                                               
C     CALL RITE(2)                                                              
C     CALL UERERR('UERERR2',2,1,0,'E')                                          
C     CALL UERREP('',2,.FALSE.)                                                 
C     CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(3):CALL UERREP WITH LEN(PACKGE)>8                                    
C     **************************************                                    
C                                                                               
      CALL RITE(3)                                                              
      CALL UERERR('UERERR2',3,2,0,'E')                                          
      CALL UERREP('UERTREP2X',3,.FALSE.)                                        
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(4):CALL UERREP WITH PACKGE ALL SPACES                                
C     ******************************************                                
C                                                                               
      CALL RITE(4)                                                              
      CALL UERERR('UERERR2',4,3,0,'E')                                          
      CALL UERREP('       ',4,.FALSE.)                                          
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(5):CALL UERREP WITH PACKGE CORRECT                                   
C     ***************************************                                   
C                                                                               
      CALL RITE(5)                                                              
      CALL UERERR('UERERR2',5,4,0,'E')                                          
      CALL UERREP('UERTREP2',5,.FALSE.)                                         
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(6):CALL UERREP WITH FILE THAT DOES NOT EXIST                         
C     *************************************************                         
C                                                                               
      CALL RITE(6)                                                              
      CALL UERERR('UERERR2',6,5,0,'E')                                          
      CALL UERREP('NOEXIST',6,.FALSE.)                                          
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(7):CALL UERREP-ASK FOR SHORT MESSAGE                                 
C     *****************************************                                 
C                                                                               
      CALL RITE(7)                                                              
      CALL UERERR('UERERR2',7,6,0,'I')                                          
      CALL UERREP('UERTREP2',7,.FALSE.)                                         
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(8):CALL UERREP-ASK FOR SHORT MESSAGE-NOEXIST FILE                    
C     ******************************************************                    
C                                                                               
      CALL RITE(8)                                                              
      CALL UERERR('UERERR2',8,7,0,'I')                                          
      CALL UERREP('NOEXIST',8,.FALSE.)                                          
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(9):CALL UERREP-ASK FOR FULL MESSAGE-NO EXIST FILE                    
C     ******************************************************                    
C                                                                               
      CALL RITE(9)                                                              
      CALL UERERR('UERERR2',9,8,0,'E')                                          
      CALL UERREP('NOEXIST',9,.FALSE.)                                          
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(10):CALL UERREP,LU=-1,REPORT USING CONMSG                            
C     **********************************************                            
C                                                                               
      CALL RITE(10)                                                             
      CALL UERLU(-1)                                                            
      CALL UERERR('UERERR2',10,9,0,'E')                                         
      CALL UERREP('UERTREP2',10,.FALSE.)                                        
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(11):CALL UERREP-USING UNASSIGNED LU                                  
C     ****************************************                                  
C                                                                               
      CALL RITE(11)                                                             
      CALL UERLU(10)                                                            
      CALL UERERR('UERERR2',11,10,0,'E')                                        
      CALL UERREP('UERTREP2',11,.FALSE.)                                        
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(12):CALL UERREP-FULL MESSAGE-CORRECTLY                               
C     *******************************************                               
C                                                                               
      CALL RITE(12)                                                             
      CALL UERLU(7)                                                             
      CALL UERERR('UERERR2',12,11,0,'E')                                        
      CALL UERREP('UERTREP2',12,.FALSE.)                                        
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(13):CALL UERREP REPEATEDLY                                           
C     *******************************                                           
C                                                                               
      CALL RITE(13)                                                             
      CALL UERERR('UERERR2',13,12,0,'E')                                        
      DO 1400 J=1,5                                                             
          CALL UERREP('UERTREP2',13,.FALSE.)                                    
1400  CONTINUE                                                                  
      CALL UERCLR                                                               
C                                                                               
C                                                                               
C     TEST(14):CALL UERREP CHECK ABORT                                          
C     ********************************                                          
C                                                                               
      CALL RITE(14)                                                             
      CALL UERERR('UERERR2',14,13,0,'F')                                        
      CALL UERREP('UERTREP2',14,.TRUE.)                                         
C                                                                               
C                                                                               
      STOP                                                                      
      END                                                                       
C                                                                               
C                                                                               
      SUBROUTINE RITE(I)                                                        
C                                                                               
      INTEGER*4  I                                                              
C                                                                               
      WRITE(6,200)                                                              
      WRITE(7,200)                                                              
      WRITE(6,300)I                                                             
      WRITE(7,300)I                                                             
      WRITE(6,100)                                                              
      WRITE(7,100)                                                              
C                                                                               
100   FORMAT(/)                                                                 
200   FORMAT(//)                                                                
300   FORMAT(3X,'TEST(',I2,')')                                                 
C                                                                               
      RETURN                                                                    
      END                                                                       
