C******************** START FILE UCSEND.FOR ; GROUP UFILES ******************
C-----------------------------------------
C  UCSEND
C    SEND COMMENTS FROM TEMPORARY TO PERMANENT FILE
C
      SUBROUTINE UCSEND(ILUNT,ILUNF)
C
C  ILUNT-- UFILES TEMPORARY FILE
C  ILUNF-- UFILES PERMANENT FILE
C
      USE UFILES
C
      CALL UFINIT
      CALL UFLCHK(ILUNF,'UCSEND    ',ICHANF,IER)
      IF(IER.NE.0) RETURN
C
      ICHANT=IUXCHA(ILUNT)
      IF(ICHANT.EQ.0) THEN
        IER=1
      ELSE IF(UFSTAT(ICHANT).NE.4) THEN
        IER=1
      ENDIF
C
      IF(IER.NE.0) THEN
        WRITE(UFELUN,9901) ILUNT
 9901 FORMAT(' ? UCSEND - TEMPORARY COMMENTS FILE LUN INCORRECT:',
     >    I6)
        CALL UFPAUS(1)
        RETURN
      ENDIF
C
      REWIND ILUNT
      CALL USPOOL(ILUNT,ILUNF)
C
      RETURN
      END
C******************** END FILE UCSEND.FOR ; GROUP UFILES ******************
