MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to list members of PDS?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
abhishek_snn
Beginner


Joined: 24 Aug 2006
Posts: 16
Topics: 5

PostPosted: Thu Aug 31, 2006 11:58 pm    Post subject: How to list members of PDS? Reply with quote

I want to list the members of a PDS in a Dataset.

Can this be done using LMMLIST or is there any other way? I am not supposed to use rexx or clist.

Any idea how this can be achieved?
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Sep 01, 2006 1:11 am    Post subject: Reply with quote

Yes, the ISPF LMMLIST service will work. So will TSO LISTDS 'pds' MEMBERS.
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Fri Sep 01, 2006 9:56 am    Post subject: Reply with quote

And how are you going to invoke LMMLIST?
________
buy scale


Last edited by coolman on Sat Feb 05, 2011 1:52 am; edited 1 time in total
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Sep 01, 2006 11:12 am    Post subject: Reply with quote

I presumed when there was the disclaimer "no REXX or CLIST" that the LMMLIST Service would be done via another development language.
Back to top
View user's profile Send private message
anbesivam
Beginner


Joined: 09 Aug 2006
Posts: 66
Topics: 14

PostPosted: Sat Sep 02, 2006 9:31 am    Post subject: Reply with quote

Hi Abishek_ssn,

We can use ISPLINK Services for LMMLIST to retrive member names.

Following is the sample code.


Code:
CALL ISPLINK ('VDEFINE ', '(VAR1)',                               
                  VAR1, 'CHAR    ' ,STG(VAR1));                     
  CALL ISPLINK ('LMINIT  ','VAR1  ',' ',' ',' ',' ',' ',' ',       
                 ' ',DDNAME,' ','SHR    ');                         

  IF PLIRETV() ^= 0 THEN DO;                                       
    PUT SKIP LIST('TSTPDS: LMINIT FAILED FOR VAR1 RC=',PLIRETV()); 
    PUT SKIP LIST('TSTPDS: TERMINATING');                           
    CALL PLIRETC(8);                                               
  RETURN;                                                           
END;                                                                 
CALL ISPLINK ('LMOPEN  ',VAR1);                                     
IF PLIRETV() ^= 0 THEN DO;                                           
  PUT SKIP LIST('TSTPDS: LMOPEN FAILED FOR VAR1 RC=',PLIRETV());     
  PUT SKIP LIST('TSTPDS: TERMINATING');                             
  CALL PLIRETC(8);                                                   
  RETURN;                                                           
END;                                                                 

CALL  ISPLINK ('VDEFINE ', '(MEMBER)',                               
                MEMBER, 'CHAR    ' ,STG(MEMBER));                   
MEMBER='';      /* FOR FIRST TIME */                                 

CALL ISPLINK ('LMMLIST ',VAR1,'LIST    ','MEMBER  ','YES     ');     
IF PLIRETV()^= 0                                                     
THEN DO;                                                             
      PUT SKIP LIST('TSTPDS: LMLIST FAILED FOR VAR1 RC=',PLIRETV());
      CALL ISPLINK ('LMMLIST ',VAR1,'FREE    ');
     END;                                       
ELSE DO;                                       
      PUT SKIP LIST('MEMBER NAME:',MEMBER);     
     END;                                       
  CALL ISPLINK ('LMCLOSE ',VAR1);
  CALL ISPLINK ('LMFREE  ',VAR1);



Hope this will give some idea for you...
Back to top
View user's profile Send private message
mrgthiru
Beginner


Joined: 16 Jan 2007
Posts: 6
Topics: 2
Location: INDIA

PostPosted: Tue Jan 16, 2007 10:38 am    Post subject: Reply with quote

Hi Abhisek,

Here is a REXX program try this....


Code:

 /*rexx*/                                                             
 SAY 'ENTER DATASET NAME'                                             
 PARSE UPPER PULL PDSNAME                                             
    PDSMSG = SYSDSN("'"PDSNAME"'")                                     
    IF PDSMSG <> 'OK' THEN DO                                         
       SAY "'"PDS"'   MESSAGE:" PDSMSG                                 
       RETURN                                                         
    END                                                               
 A = OUTTRAP('VAR.')                                                   
    "LISTDS '"PDSNAME"' MEMBERS"                                       
    DO I = 7 TO VAR.0  /*  PROCESS ALL MEMBERS OF SOURCE PDS */       
       MEMBER = VAR.I                                                 
       SAY MEMBER                                                     
    END                                                               

Try this easy & simple... Laughing

Thanks & Regards
Gthiru
_________________
My blood says B+ Smile
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Jan 16, 2007 10:54 am    Post subject: Reply with quote

Quote:
I want to list the members of a PDS in a Dataset.

Can this be done using LMMLIST or is there any other way? I am not supposed to use rexx or clist.


then write the ISPF dialog in COBOL using the functions provided in the REXX examples above.

or

you can use the 3.4 panel and enter either B,V, or E as a line command for the ds

or are you looking for a batch job solution: JCL?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
blitz
Beginner


Joined: 24 Dec 2002
Posts: 28
Topics: 4

PostPosted: Wed Jan 17, 2007 9:19 am    Post subject: Reply with quote

Code:

//JS10   EXEC PGM=IEHLIST
//SYSPRINT DD SYSOUT=*
//DDNAME1 DD UNIT=3390,VOL=SER=SYSRES,DISP=OLD
//SYSIN      DD *
  LISTPDS DSNAME=SYS1.LINKLIB,FORMAT,VOL=3390=SYSRES
/*


Use a IDCAMS LISTCAT if above doesn't work.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group