Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need to find out if dataset is present in catalog.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Need to find out if dataset is present in catalog.
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

Site Director


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

PostPosted: Tue Oct 27, 2009 12:51 am    Post subject:
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: 401
Location: Mumbai

PostPosted: Tue Oct 27, 2009 8:02 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts Question about dataset sequence numbe... harisukumaran JCL & VSAM 23 Tue May 29, 2018 9:31 am
No new posts Temp dataset unusual behavior sheersh JCL & VSAM 5 Tue May 08, 2018 9:52 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts How could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us