      SUBROUTINE XSETUN (LUN)
C
C THIS ROUTINE RESETS THE LOGICAL UNIT NUMBER FOR MESSAGES.
C
      INTEGER LUN, MESFLG, LUNIT
      COMMON /EH0001/ MESFLG, LUNIT
C
      IF (LUN .GT. 0) LUNIT = LUN
      RETURN
C----------------------- END OF SUBROUTINE XSETUN ----------------------
      END
