      implicit none
      integer NFILE, NDAT
      parameter(NFILE=100, NDAT=3)
      real dat(NDAT)
      character*7 fn
      integer i,j,itmp,jtmp

      do i=1,NFILE
        write(fn,'(i3.3,a4)') i,'.dat'
        open(10,file=fn)
          do j=1,NDAT
            write(10,*) rand()
          end do
        close(10)
      end do

      stop
      end

