      subroutine upper(string)
*
*  subroutine to lowercase a string for a unix filename
*
     character string*(*)
     in=index(string,' ')-1 
     do 10 i=1,in
         ic=ichar(string(i:i))
         if (ic.ge.97 .and. ic.le.122)  string(i:i)=char(ic-32)
 10   continue
      return
      end
