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

Need to find out if dataset is present in catalog.


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
neelbiswas

New User


Joined: 19 Jan 2007
Posts: 3
Location: mumbai

PostPosted: Mon Oct 26, 2009 6:34 pm
Reply with quote

Hi all,

I have and Excel sheet with names of around 3000 datasets( different high level qualifiers). I need to find out if they exist. Could any one help me with this?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 27, 2009 12:51 am
Reply with quote

Hello,

Upload the list of dataset names to the mainframe and compare the list to the output of a LISTCAT. There are multiple examples of LISTCAT in the forum.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Oct 27, 2009 8:02 am
Reply with quote

If you upload the list and just put the data set name in col 1, then a small program like this will write what you need. Run this in batch and capture SYSTSPRT or make a minor alteration and write the output to a data set via EXECIO instead of Say.
Code:
/* Rexx */
"ALLOC F(IN) SHR DA('X123456.DS.DATASETS') REUSE"
"EXECIO * DISKR IN (STEM NAMES. FINIS" 
Do a=1 to names.0                                 
  Parse value names.a With dsname ' ' .           
  if "OK" == sysdsn("'"strip(dsname)"'") Then     
    Say dsname ' IS CATALOGED'                   
  else                                           
    Say dsname ' IS NOT CATALOGED'               
End                                               
"FREE F(IN" 

Change as needed.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top