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

Lists the datasets starting with a particular qualifier


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

New User


Joined: 24 Jan 2007
Posts: 59
Location: Texas

PostPosted: Tue Oct 21, 2008 3:07 am
Reply with quote

Hi All,

I have a piece of code that lists the datasets starting with a particular high level qualifier:

Code:
/*rexx*/                                                               
FNAMES. = ""                                                           
cmdline. = ""                                                           
"EXECIO * DISKR CMDIN (STEM cmdline. FINIS"                             
parse var cmdline.1 var1 var2                                           
indd = strip(var1)                                                     
address tso                                                             
x = outtrap("save.","*")                                               
address tso                                                             
" LISTC NAME LEVEL('"||indd||"') "                                     
count = save.0                                                         
i = 1                                                                 
j = 1                                                                 
do until (count = 0)                                                   
  if POS('IN-CAT',save.i)== 0 then                                     
  do                                                                   
    FNAMES.j = substr(save.i,17)                                       
    j = j + 1                                                         
  end                                                                 
/*say 'member name ' i ' = ' save.i*/                                 
i = i + 1                                                             
count = count - 1                                                     
end                                                                   
if FNAMES.0 == 0 then                                                 
   FNAMES.1 = 'no dataset exists'                                     
FNAMES.J = ""                                                         
"EXECIO * DISKW MLISTD (STEM FNAMES. FINIS"                           
exit               


This code works fine and returns me the list of datasets without any trouble as long as i dont use wildcard characters.

For example: If I give DEVZS.ABS as input the code fetches all the datasets that have these 2 as high level qualifier.

But if I give DEVZS.AB* or DEVZS.AAB*.ABC then it doesnt work because of the presence of wildcard. Can any one help in changing the LISTC command or using any other command which would remove this limitation.

Thanks
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Oct 21, 2008 5:49 am
Reply with quote

Switch to the ISPF LMDLIST Service. Here's an example ...

which I just noticed has been suggested to you before.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Oct 21, 2008 8:39 am
Reply with quote

also 'sys1.samplib(iggcsirx)'
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Oct 21, 2008 11:13 am
Reply with quote

Posted a few wweks ago, also gives the options to either list or delete migrated datasets and tape datasets.

Also for dataset selection you can use any combination of the wildcard characters allowable by IBM.

Click HERE to see the thread.
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 Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
Search our Forums:

Back to Top