This is the working code I have. Currently it reads in the first line of my events file (file=1) and then the first line of my stations file (file=2) and writes them out, performs a go to command and goes back and reads the next line in the stations file and then writes it all out again, and goes through that until it gets through the last line of the stations file.
What I need to is essentially "loop" back through this whole thing again, so that the second line of the events file (file=1) is now being read and written out, and then do that for all the lines in the events file.
I have tried to use another "go to" command but my output never changes from what it spits out with the current code.
Does anyone know how to add another go to command so that it loops through this stuff again?
program events
implicit none
character*40 aline
character*40 bline
open (1, file="event", status="old")
open (2, file="stations", status="old")
open (3, file="output", status="new")
read(1, '(a40)',end=60) aline
1 read(2, '(a40)',end=60) bline
write(3,*) aline, bline
go to 1
60 stop
end program events