|
I am reading some multi-member archive files and deleting any members older
than six months.
I devised a scheme to RTVMBRD *LAST of the last member to determine when I
finish, then I read the *FIRST member. Once I finish with that member, I
check to see if the current member I am processing is equal to the last
member. If it is not, I RTVMBRD *N *NEXT to get the name of the next
member, then start the process over again. When the current member equals
the last member, then I know I have processed the last member in the file...
or so I thought. To test this, I copied 1000 members to a test file and ran
my process to delete each member. With my current scheme, 15% of the
members were not deleted. Logically, if I find the *FIRST and read until I
get to the *LAST, I should be processing all the members. I can rerun
against these remaining members and I eventully get them all. I need to get
them all in one pass, not multiple passes.
If I change the CL to RTVMBRD *FIRST, process it, then RTVMBRD *N *NEXT in a
loop until I error out (run out of members while reading in arrival
sequence), all members are deleted.
I can delete all of the members in this file by just reading them in arrival
sequence. When I read starting with the *FIRST and loop until I finish with
the *LAST member, my process is incomplete.
Why is that?
Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Nashville, TN
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.