C--------------------------------------------------------------------------
        subroutine ftinit(funit,fname,block,status)

C       open a new FITS file with write access
C
C       funit   i  Fortran I/O unit number
C       fname   c  name of file to be opened
C       block   i  input record length blocking factor
C       status  i  returned error status (0=ok)
C
C       written by Wm Pence, HEASARC/GSFC, June 1991

        integer funit,status,block
        character*(*) fname

        if (status .gt. 0)return

        if (fname .eq. ' ')then
                status=105
                return
        end if

C       call the machine dependent routine which actually creates the file
        call ftopnx(funit,fname,1,1,block,status)
        end
