Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Lists the datasets starting with a particular qualifier

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Lists the datasets starting with a particular qualifier
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

Moderator Team Head


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

PostPosted: Tue Oct 21, 2008 5:49 am    Post subject: Reply to: Dataset listing
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: 401
Location: Mumbai

PostPosted: Tue Oct 21, 2008 8:39 am    Post subject: Reply to: Dataset listing
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: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 21, 2008 11:13 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us