
       program  pick_up_new_files
       implicit none
       integer  kkk,k,irec
       parameter (kkk=366*3)

       character  aa1*31,aa*18,bb1*36,bb(kkk)*18

c     ********************************************************
       open(8, file='jobfiles/new_files_list.dat',
     &         form='formatted')

       open(21,file='jobfiles/stat_files_list.dat',
     &         form='formatted')

       open(22,file='jobfiles/sohc_files_list.dat',
     &         form='formatted')
c     ********************************************************

       irec=1
 120   continue
       read(21,101,end=140) bb1,bb(irec)
       irec=irec+1
       goto 120
 140   continue

       irec=irec-1
c       print *, irec
 101   format(a36,a18)

c     ********************************************************
 220   continue
       read(22,103,end=240) aa1,aa

       do k=1,irec 
       if(aa.eq.bb(k)) goto 220
       enddo
       
       write(8,105) aa
       goto 220

 240   continue

 103   format(a31,a18)
c     ********************************************************
c       print *, "aa1   ", aa1
c       print *, "aa    ", aa
c       print *, "bb1   ", bb1
c       print *, "bb    ", bb(1)

 105   format(a18)
c     ********************************************************
       stop
       end

