FUNCTION readright,lines ; If the 3rd-last line contains the phrase "NOVASTOR TRAILER BLK" ; then the tape read was successful, and processing of the tape ; data can continue. Otherwise, the end of the tape was not read, ; and we should stop here. n=N_ELEMENTS(lines) PRINT,'n=',n found=0B FOR i=n-5,n-1 DO BEGIN found=found OR (STRPOS(lines(i),'NOVASTOR TRAILER BLK') NE -1) PRINT,found,' ',lines(i) ENDFOR IF found THEN putfile,'/jasper/cnsr3_data1/scripts/goodread',['Y'] RETURN,found END