read into record2 from f2; if f2 empty, signify by setting flag to 2

if(fread(&record2,length,1,f2_ptr) == 0)

{

flag = 2;