C*******************************************************************************
C      Program ISAM
C
C      Reads any edited file prepared for GSAS and writes the content into an
C      ISAM (Indexed Sequential Access Method) files, which is what GSAS
C      requires.
C
C      G. Artioli - March
C*******************************************************************************

      CHARACTER LIN*80,FIL*30

      NW = 0

      TYPE 10
   10 FORMAT ($,' INPUT FILE  : ')
      ACCEPT 11, FIL
   11 FORMAT (A30)
      OPEN (UNIT=5,NAME=FIL,TYPE='OLD')
      TYPE 20
   20 FORMAT ($,' OUTPUT FILE : ')
      ACCEPT 11, FIL
      OPEN (UNIT=6,NAME=FIL,ACCESS='direct',RECORDTYPE='fixed',
     $RECORDSIZE=80,FORM='FORMATTED',TYPE='NEW')

   30 READ  (5,31,END=50) LIN
      NW = NW+1
      WRITE (6'NW,31) LIN
   31 FORMAT (A80)
      GO TO 30

   50 TYPE 51, NW
   51 FORMAT (//,1X,I4,' records written ! bye bye !!',//)

      END

