c======================================================================
c existf05                                                             
c  2006.08.03 Version 1.0 Sakane, Genta                                
c     ( Department of Chemistry, Okayama University of Science, Japan )
c======================================================================
      program existf05
      character*4 key,see11,see12,see21,see22,see31,see32
      open (unit=20, form='formatted', status='old',
     &      access='sequential', file='F05')
      open (unit=30, form='formatted', status='unknown',
     &      access='sequential', file='existf05.bat')
      key='QGRN'
      read(20,1000,err=600) see11,see12
      read(20,1000,err=600) see21,see22
      read(20,1000,err=600) see31,see32
      if(see32.eq.key) go to 100
      go to 200
  100 write(30,2000)
  200 continue
      go to 700
  600 write(*,900)
  700 continue
      stop
  900 format('*** Read Error ***')
 1000 format(2a4)
 2000 format('copy F05 F05exist.txt')
      end
