C******************** START FILE UFEMSG.FOR ; GROUP UFILS0 ******************
C--------------------------------------------------------------------
C  UFEMSG
C   SET ERROR MESSAGE OUTPUT LEVEL
C    =-LUN  *NEW FEB 1986*  IF A NEGATIVE NUMBER IS SPECIFIED,
C      IT IS ASSUMED TO BE THE LUN FOR A FILE TO RECEIVE ALL UFILES
C      INFORMATIONAL AND ERROR MESSAGES; UPAUST CALL IS TURNED OFF
C      ALL MESSAGES ARE TURNED ON
C      *CALLER RESPONSIBILITY TO OPEN A FILE ON UNIT LUN*
C
C    =0:  TURN OFF SWITCHABLE ERROR MESSAGES *** USER BEWARE
C       NOTE, ONLY "FILE NOT FOUND" AND "SHOT NO. INCORRECT" ARE
C       SWITCHABLE.
C    =1:  ALL MESSAGES ** BUT NO UPAUST CALL
C    =2: (DEFAULT) ALL MESSAGES, AND UPAUST REQUIRING TTY INPUT
C        TO ACKNOWLEDGE ERROR, IF JOB IS RUNNING AT A TTY.
C
C
      SUBROUTINE UFEMSG(IARG)
C
      USE UFILES
C
      CALL UFINIT
C
      IF(IARG.GE.0) THEN
        ILEV=IARG
C
C  ONES DIGIT OF UFILEV IS INFORMATIONAL MESSAGE FLAG
C  TENS DIGIT OF UFILEV IS ERROR MESSAGE FLAG
C
C  SET TENS DIGIT
C
        UFILEV=UFILEV - 10*(UFILEV/10) + 10*ILEV
C
      ELSE
        UFILEV=11
        UFELUN=-IARG
      ENDIF
C
      RETURN
      END
C******************** END FILE UFEMSG.FOR ; GROUP UFILS0 ******************
