PROGRAM Make_Unformatted_Index_File
! Program to create unformatted index file

  INTEGER :: ItemNumber
  CHARACTER(20) ::  IndexFile
 
  PRINT *, "Name of unformatted index file to be created?"
  READ *, IndexFile
  
  OPEN(UNIT = 10, FILE = IndexFile, FORM = "UNFORMATTED", &
       STATUS = "NEW", ACTION = "WRITE")
  DO
    PRINT *, "Item number (0 to stop):"
    READ *, ItemNumber
    IF (ItemNumber == 0) EXIT
    WRITE (UNIT = 10) ItemNumber
  END DO

END PROGRAM Make_Unformatted_Index_File
