Hi Nina,
There are 2 reasons that I know of:
1) In most cases the first read EOF (or part of a file, e.g. start/readnext) is treated differently than an EOF at any other time. On 1st read eof you may want to end the pgm w/a user abend, or display a worning msg, or wirte a "no data to report this period" line to your report, or modify the porcessing path of your pgm or, well, you get the idea.
2) It facilitates control break logic. Example:
read at end display 'no data' goback end-read
perf proc-accts until ip-eof
perf end-it
goback
proc-accts.
blah, blah, blah
perf proc-invoices until acct-is-fin
blah, blah, blah.
proc-invoices.
blah, blah, blah
perf proc-trans until invoice-is-fin
blah, blah, blah.
proc-trans.
blah, blah, blah
perf read-ip.
blah, blah, blah.
read-ip.
move curr-key to prev-key
read ip-file into ws-curr-ip-rec at end
move hi-vals to ws-curr-ip-rec
set ip-eof to true
end-read
perf set-breaks.
You'll notice that there are no "IFs" in the -proc pgraphs. All the control break logic is done in the perfs. But you need an init read to do it that way. And that's why I like the init read. Some say it's a matter of tast, but have you ever seen that lady on the Drew Carey Show?
Regards, Jack.