in reply to End Of File Marker

Perhaps eof() would help. Also, it might help if the relevant code was available.