      PROGRAM UERMES2T                                                          
C                                                                               
C                                                                               
C     TEST (1):TEST OF UERMES                                                   
C     ***********************                                                   
C                                                                               
      WRITE(7,'(20X,A)')'TEST (1)'                                              
      CALL UERLU(7)                                                             
      CALL UERSET('UERTEST','I','E','N')                                        
      CALL UERERR('UERMES2T',4,6,2,'E')                                         
      CALL UERMES('TEST (1)',1,'TEST (1) OF UERMES',.FALSE.)                    
      CALL DMPUER(7,'TEST (1) OF UERMES-USING UERLU')                           
C                                                                               
C                                                                               
C     TEST (2):TEST OF UERMES-USING CONMSG                                      
C     ************************************                                      
C                                                                               
      WRITE(7,'(20X,A)')'TEST (2)'                                              
      CALL UERLU(-1)                                                            
      CALL UERSET('UERTEST','I','E','N')                                        
      CALL UERERR('UERMES2T',4,6,2,'E')                                         
      CALL UERMES('TEST (2)',1,'TEST (2) OF UERMES',.FALSE.)                    
      CALL DMPUER(7,'TEST (2) OF UERMES-USING CONMSG')                          
C                                                                               
C                                                                               
C     TEST (3):TEST OF UERMES WITH UNALLOCATED LOGICAL UNIT.                    
C     ******************************************************                    
C                                                                               
      WRITE(7,'(20X,A)')'TEST (3)'                                              
      CALL UERLU(10)                                                            
      CALL UERSET('UERTEST','I','E','N')                                        
      CALL UERERR('UERMES2T',4,6,2,'E')                                         
      CALL UERMES('TEST(3)',1,'TEST(3):UERMES-DEFAULT CONMSG',.FALSE.)          
      CALL DMPUER(7,'TEST (3) OF UERMES-USING DEFAULT CONMSG')                  
C                                                                               
C                                                                               
C     TEST (4):TEST OF UERMES WITH TERMINATION.                                 
C     *****************************************                                 
C                                                                               
      WRITE(7,'(20X,A)')'TEST (4)'                                              
      CALL UERLU(6)                                                             
      CALL UERSET('UERTEST','I','E','I')                                        
      CALL UERERR('UERMES2T',1,0,0,'E')                                         
      CALL UERMES('TEST (4)',1,'TEST(4) OF UERMES',.TRUE.)                      
C                                                                               
      STOP                                                                      
      END                                                                       
