Hi All,
If memory serves, and that's becoming more problematic every day

, there are 2 kinds of "empty".
1) There is no data in the file and it hasn't been closed at least once.
2) There is no data and the file has been closed.
For example, a closed PS file has a file or tape mark in it. A VSAM file has a high RBA (I think) in it. Note that most say "initialized" instead of "closed". Is there a difference? Don't know, but the idea is the same.
But the important thing to infer from this is that IDCAMS,
will return a 12 if a type 2 "empty" exists in the file or doesn't exist at all, or return a 4 if a type 1 is in effect.
I'm not sure of what effect Indhu's IDCAMS cntl cards will have on this, I usually use:
PRINT dsname COUNT(1)
I haven't tested this against PDS members.
The important thing to come away with from this is that it's not as straightforward as one might think. So, test thoroughly before you put it into production.
HTH, Jack.