The program I have written is simple open a file, read it line by line and display selected lines. The file opens and the first read works.
I have a perform read-file until EOF.
but instead of doing another read it falls out the bottom and gives me this error:
libcob: C:/Users/saugu/Documents/Gix/Projects/FirstTry/bin/debug/x64/FIRSTTRY.cbsql:92: warning: implicit CLOSE of calin ('C:\Users\Public\Desktop\CalWork.txt')
snippit:
evaluate true
when cal-filestatus = "35"
display "file not found"
when cal-filestatus = "00"
perform read-cal-file
until cal-eof
when other
display cal-filestatus, msg
end-evaluate.
read-cal-file.
read calin
at end
set cal-eof to true
close calin
not at end
perform check-line
end-read.
check-line.
if fdtstart = ldtstart
display cal-record
end-if
if fdtend = ldtend
display cal-record
end-if
if fsummary = lsummary
display cal-record
end-if.
display cal-read-status.
(instead of going back it closes the file and ends the run.
I can get it to continue to read the file and display the info if I put 'go to read-cal-file' at the end of the check-line routine.
Thanks Jim