If you can depend on ISPF statistics, you can sort a member list by lines and manually select the members to copy. Or you could write a small program that does LMINIT, LMOPEN, LMMLIST loop, STATS(YES), LMCOPY, ...
But be aware that ISPF statistics are only as good as the program that created them and most programs don't create them at all.
You could, however, modify the above to try to read a record and only do the copy if the record can be read. I seem to remember ISPF services doing odd things if you try to mix reading and writing in the same "dataid" but it might work.
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
you can update ISPF statistics (line count is one) thru ispf option 3.5,
then you can follow MBabu's suggestion; as you access the STATS you can skip the zero line members.