Page 1 of 1

Issue with getting correct member information from a PDS

PostPosted: Fri Jun 20, 2014 7:35 pm
by seshadri27
Hi,

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'


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

Re: Issue with getting correct member information from a PDS

PostPosted: Fri Jun 20, 2014 11:42 pm
by Pedro
I cannot tell if it is a rexx problem or a LISTDS problem. The manual says that the default for OUTTRAP is 999,999,999 , but you can specify a larger number. I was able to capture 199999 lines with no problem. But I do not have a PDS with that many members so I cannot test LISTDS. Try issuing the same LISTDS command in a batch job so that the command response is captured in the SYSTSPRT file.