Retrieving Membernames

Hi Experts

I need to retrieve membernames on date sequence, how can I get this.
The start member is variable, and last member I need depends on the member creationdate

I tried the following:

Member  and date
A - 20060201
B - 20060203
C - 20060101
D - 20060103
E - 20060104

So the date sequence is actualy
C - 20060101
D - 20060103
E - 20060104
A - 20060201
B - 20060203


To get the first membername I  use RTVMBRD  FILE(&FLIB/&FILE) MBR(&MBR) RTNMBR(&MBR)
&MBR containc *First, so the return value is 'C'

In the process loop I use:
RTVMBRD    FILE(&FLIB/&FILE) MBR(&MBR *NEXT) RTNMBR(&MBR)
So member is 'C' and will be changed to 'D'.

The problem is that after processing members 'C','D' and 'E', the process ends, I understand why.

_T_h_e__q_u_e_s_t_i_o_n_:
Is there a way to get the next member on date sequense with an referenced member name?

Regards,
Murph

PS Yes i know that I can use DSPFD TYPE(*MBRLIST) to get a file, but that is to slow.













LVL 17
MurpheyApplication ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

daveslaterCommented:
Hi
the commnad will retrieve in name order.
you can use the api to load into a multi occurance DS then use qsort to sort it. That will be very fast.

do you need an example.

dave
0
daveslaterCommented:
Hi
the best API is
QUSLMBRusing format MBRL0200
this load in to a user space, qsort can be used to sort this space then retrieve it.

I have a program that does most of the user space stuff - including sorting -  at

http://www.ironmandave.com/ee/eeCode.html

Dave
0
_b_hCommented:
Is it possible to change the program that adds the member name to include a constant prefix and the creation date?
Then the member list would look like:
M20060101
M20060103
M20060104
M20060201
M20060203
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

ShadowProgrammerCommented:
I never noticed this CATCH22 before...

but if you specify *FIRST it is first in date order, then *NEXT/*PREVIOUS is in name order...

CATCH22 - how are you supposed to retrieve all the members !!!

Tony
0
MurpheyApplication ConsultantAuthor Commented:
Hi Experts, all nice ideas,

but all your answers are right I think, "It seems not be possible to use the standard CM commands"
I will wait for some more ideas, and split the points.

regards,
Murph
0
tliottaCommented:
Murph:

One detail seems odd... Why is DSPFD *MBRLIST "too slow"? How would that be significantly slower than RTVMBRD in a loop? I can see where it's likely that QUSLMBR to a *usrspc could be a bit faster, but it's hard to see it being _significantly_ faster. Either way, every individual member object will be queried and data formatted and written to a permanent disk object.

Why the need for split-second speed improvements?

Large number of files with large number of members?

Tom
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MurpheyApplication ConsultantAuthor Commented:
Hi Tom, I didn't messure it, but RTVMBRD will start the archining program within seconds.
while DSPFD for some files takes over 20 minutes...
Yep some files have over 30.000 members, that's why I like to archive them.
1) the maximum number members is near.
2) the backup over 40GB is taking 4 hours, while some other backups wil do 100GB/h

Regards,
Murph
0
tliottaCommented:
Murph:

That many members causes numerous issues. Note that authority for example is actually implemented at the member level for files. That means the authority check takes places 30,000 times just for access when handling the file as a whole.

And any authority check on an individual member means a lookup in the member directory in order to access the member object to get data authority. This may be an issue during normal access during the working day. It simply adds overhead.

I would be seriously looking at any way to reduce the number of members.

Tom


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.