Why would you want to create a file with no member? Without a member it cannot contain data I believe. It will give you an error if you try and write to it.
Actually you get the error when you try to open it. The reason would depend on the application. We use to have a sales data polling process that would add a member to an intermediary file for each store/day and remove them once processed. We knew all data was up-to-date when there were no members.
Another example is QxxxSRC files with one member per program, but you start with MBR(*NONE).
ToddN2000, I can think of a couple reasons. If the file is a reference file, there's no need for a member. If the file is going to contain multiple members there's no need for a member at the time of creation.
I forgot about the reference file not needing a member, Splat. Most likely because we only have one of those on our system. And true, you do not need a member that matches the file name. A matching member name will be created if you use the default compile options.
Discuss This Question: 4  Replies