Issue with getting correct member information from a PDS



IBM's Command List programming language & Restructured Extended Executor

Issue with getting correct member information from a PDS

Postby seshadri27 » Fri Jun 20, 2014 7:35 pm

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
seshadri27
 
Posts: 1
Joined: Fri Jun 20, 2014 7:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with getting correct member information from a PDS

Postby Pedro » Fri Jun 20, 2014 11:42 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post