I have a client requirement in which I will have to find out all the members in a PDS starting with "XXX" and then rename these members so that "XXX" is replaced by "YYY" using a REXX program.
The approach I took is to list all the members from the PDS using LISTDS command and store them in an array as shown below:
Call OUTTRAP 'Mbrs.'
"LISTD '"PDSName"' MEMBERS"
Call OUTTRAP 'OFF'
"LISTD '"PDSName"' MEMBERS"
Call OUTTRAP 'OFF'
where the PDS Name is stored in the variable PDSName. Then look for all the members starting with "XXX" in Mbrs. and rename them to start with "YYY".
The LISTDS works perfetcly fine as long as the total count of members in the PDS is less than 100000. For a PDS containing members more than 99999 I am not getting the correct information about the members.
I understand after the count reaches 99999 again it starts counting from 1.
I am unable to find out a solution that will list down the member names properly when the PDS conatins more than 99999 members. Any suggestion how to resolve this issue in REXX.
Thanks and regards,
Seshadri Mandal