program main implicit none character(128) :: str open(11, file='file.dat', status='old') ! Read line 1 read(11, *) str ! Read line 2 read(11, *) str ! Now on line 3; go back to line 2 backspace(11) ! Read line 2 read(11, *) str ! Go back to head rewind(11) ! Read line 1 read(11, *) read(str) end program main