Theo Kouwenhoven
asked on
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.
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.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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
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
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
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
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
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
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
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