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: 19243
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 All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Free space of a mulitvolume PS datase... TSO/ISPF 7
No new posts REXX to get all Dataset names from a ... CLIST & REXX 5
No new posts Avoid job abend on dataset held by us... JCL & VSAM 6
No new posts Identify Number of Multivolume Dataset All Other Mainframe Topics 5
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
Search our Forums:


Back to Top