How to list members of a PDS in REXX



IBM's Command List programming language & Restructured Extended Executor

How to list members of a PDS in REXX

Postby fazillatheef » Wed Jun 18, 2008 2:56 pm

Hi
Is there a function in REXX to get the names of the members in a PDS?
Thanks in advance.
fazillatheef
 
Posts: 18
Joined: Mon Feb 25, 2008 12:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to list members of a PDS in REXX

Postby MrSpock » Wed Jun 18, 2008 7:00 pm

No, there isn't. However, see this previous topic for some suggestions.
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: How to list members of a PDS in REXX

Postby Chaitnya » Thu Jun 19, 2008 6:22 am

fazillatheef wrote:Is there a function in REXX to get the names of the members in a PDS?


No there is no direct function in rexx but you may try this logic. It's working correctly for me and will get member name on the screen one by one as there is say statement, The member name is stored in the STEM MEMS. :ugeek:

/*REXX*/                                       
INPUT  = ' YOUR PDS NAME '                   
            X = OUTTRAP(MEMS.)                 
 /* TO GET THE MEMBER LIST FROM THE INPUT PDS */
            "LISTDS '"INPUT"' MEM"             
            X = OUTTRAP(OFF)                   
DO I=7 TO MEMS.0                               
      MEMS.I = STRIP(MEMS.I)                   
       SAY 'MEMBER:'MEMS.I                     
END                                           
EXIT 
Chaitnya
 
Posts: 18
Joined: Wed Mar 26, 2008 1:04 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post