IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

list pds members name starting with xyz


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Wed Oct 19, 2022 10:57 am
Reply with quote

Hi all.
First of all - I'm a TOTAL newbie to this whole "z/os" thing, so my sincere apologies, in advance. (Like, srsly. day 3. at best.)
Second - If its already answered, I've missed it, and not on account of lack-of-trying, so again - sorry

I'm looking for the most efficient way to get a list of all members,
in a pds, thats NAME starts with wxyz.

Basically, I'm looking for the best way to "REXX serch wxyz* members".

Please and thank you,
RazVorox.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1319
Location: Bamberg, Germany

PostPosted: Wed Oct 19, 2022 11:09 am
Reply with quote

You can use IEBCOPY CP with Wildcards to get what's needed. Besides that, TSO command LISTDS <pds> MEMBERS will give a list of all Members in a PDS[E]. Apply some filters and that's it.
There are certainly more options than these samples.

PS: Also see the Beginners Forum at https://www.ibmmainframeforum.com
Back to top
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Wed Oct 19, 2022 11:48 am
Reply with quote

icon_eek.gif There is a Begginers forum icon_eek.gif
~Running to sign up~

Thanks !!

P.S.
Interestingly enough, it didn't surface on the google searches.
-This- one, did.
:wonder:
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1319
Location: Bamberg, Germany

PostPosted: Wed Oct 19, 2022 11:53 am
Reply with quote

What are you planning to do with the list of members?
Back to top
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Wed Oct 19, 2022 12:00 pm
Reply with quote

Create an Index.
Basically, they are cbl progs listed by user prefix.
so, for example, mine would be rzvx0001, rzvx0002 etc.
I'm gonna parse them, then grab the "description" section from each,
and than create a basic index.
i.e.
rzvn0001 - Hello world
rzvn0002 - call time subroutine
..
etc.
its meant as an exercise in REXX to better familiarize myself with it.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1319
Location: Bamberg, Germany

PostPosted: Wed Oct 19, 2022 12:11 pm
Reply with quote

Have a look at ISRSUPC using REXX (there was a discussion recently here). This makes it much easier as you get Member Name and Search String as result. Good luck.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 728
Location: Denmark

PostPosted: Wed Oct 19, 2022 1:09 pm
Reply with quote

Quick-and-dirty, if you only have a few members:
ISPF 3.2, enter dsname like LIB.CNTL(A*)
Then cut the list.
Back to top
View user's profile Send private message
RazVorox

New User


Joined: 19 Oct 2022
Posts: 32
Location: Israel

PostPosted: Wed Oct 19, 2022 1:16 pm
Reply with quote

Thanks a lot Joerg!
Seems like I've got my starting point.
Gonna do some research/homework on the
IEBCOPY ; LISTDS ; ISRSUPC

Will(y) also try to rexx the 3.2 with the (*) member.

:-)
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 728
Location: Denmark

PostPosted: Wed Oct 19, 2022 3:13 pm
Reply with quote

you can also use wildcard in ISPF 3.4, i.e. to browse you enter
b /(*list*)
in the line command
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1319
Location: Bamberg, Germany

PostPosted: Wed Oct 19, 2022 5:19 pm
Reply with quote

For the desired purpose, I would go with ISRSUPC. The only thing left is to apply some kind of filter for the member name.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 728
Location: Denmark

PostPosted: Wed Oct 19, 2022 7:32 pm
Reply with quote

Well, if you are going to use some kind of programming, then the ISPF library services can do he trick. Here is a small demo REXX:
Code:
/* rexx */                                                           
 mslmbr=''                                                           
 address ispexec                                                     
 "lminit dataid(did1) dataset('xxxx.lib.data') enq(shrw)"             
 if rc<>0 then say 'lminit rc' rc                                   
 else do                                                             
   "lmopen dataid("did1") option(input)"                             
   if rc<>0 then say 'lmopen rc' rc 'did' did1                       
   else do forever                                                   
     "lmmlist dataid("did1") member(mslmbr) option(list) stats(no)" 
     if rc<>0 then leave                                             
     if left(mslmbr,4)='TEST' then say  ' 'strip(mslmbr)             
   end                                                               
   "lmmlist dataid("did1") option(free)"                             
   "lmclose dataid("did1")"                                         
 end                                                                 
 "lmfree  dataid("did1")"                                           
 
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2589
Location: Silicon Valley

PostPosted: Wed Oct 19, 2022 8:13 pm
Reply with quote

You can skip over earlier member names by starting with the name you want.
Code:

mslmbr = 'TEST"
. . .
    "lmmlist dataid("did1") member(mslmbr) option(list) stats(no)"
. . .


This works for RazVorox because the search is for the prefix of the name.

From the ISPF services guide:
Quote:
When you invoke LMMLIST for the first time, member-var is used for selecting a starting position within the member list
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Starting a PROC with parameters from ... CLIST & REXX 6
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts List of quiesced jobs JCL & VSAM 3
Search our Forums:

Back to Top