× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Member sequence for *FIRST and *LAST is not specified in the command
help text. However, for *FIRSTMBR and *LASTMBR, the sequence is
specified as member-name order. My guess is *FIRST/*LAST are
first-added and last-added. If suspect if you modify your routine to
use *LASTMBR to to find your ending member name, *FIRSTMBR to fetch
the first, and (current-member-name *NEXT) to get the next member,
you will process all members in the file.



On 8/12/07, Robert Munday <RWMunday@xxxxxxxxxxxxx> wrote:
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.