We help IT Professionals succeed at work.

Retrieving Membernames

Theo Kouwenhoven
on
Medium Priority
374 Views
Last Modified: 2008-02-01
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.













Comment
Watch Question

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
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Barry HarperConsultant
CERTIFIED EXPERT

Commented:
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
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
Theo KouwenhovenApplication Consultant
CERTIFIED EXPERT

Author

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
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
Theo KouwenhovenApplication Consultant
CERTIFIED EXPERT

Author

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
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


Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.