Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2134 Location: Phoenix, AZ
|
|
|
|
| Robert Sample wrote: |
| Dick: you're right -- sms-allocated files do not require the file be opened for output; I've learned something new today. And even in the old days the file did not have to have a record written -- merely opened for output and closed. However, I can't count the number of times programmers told me they did that when they merely used IEFBR14 (which doesn't open the file). |
My little experience says that it's far better to ensure that any file created has an EOF rather than try to figure this out later. Yup, one easy way to force an EOF is open the file for output, then close it without any write statements. You can also generate an EOF with IEBGENER or SORT.
In days past, simply cataloging a dataset caused the problem of no EOF which in turn caused abends (or running with incorrect data).
With SMS-managed data, an EOF is created automatically when the file is allocated. |
|