MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Find if data set exists but using volume

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Apr 26, 2012 6:35 am    Post subject: Find if data set exists but using volume Reply with quote

Listdsi, Sysdsn both are great for inquiries wether a dat set exists, but this is only true for cataloged data sets. I need to check if a cataloged or a non cataloged (with volume) data set exists. My research leads me to believe that I will have to use either a TSO Alloc or a Ispexec LMINIT to find that out. Any suggestions or anybody know of a thread here?
I went with LMINIT unless somebody makes a better recommendation.
Back to top
View user's profile Send private message Visit poster's website
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Thu Apr 26, 2012 7:07 am    Post subject: Reply with quote

For the uncataloged scenario ......................

What about using IEHLIST to list the volume. The code below is a basic IEHLIST, and you could probably build in an ISPF edit macro to do a find on the dataset name.
Code:
/* REXX *** IEHLIST                                                  */
"ISPEXEC CONTROL ERRORS RETURN"
X = MSG('OFF')
ARG VOLSER .
SYSUID = SYSVAR(SYSUID)
"FREE  FI(SYSIN,SYSPRINT,DASDVOL)"
"DEL   '"SYSUID".SYSPRINT.IEHLIST'"
"DEL   '"SYSUID".SYSIN.IEHLIST'"
"ALLOC FI(SYSIN) NEW TRACKS SPACE(1 1) RECFM(F B) LRECL(80)"
"ALLOC FI(SYSPRINT) DA('"SYSUID".SYSPRINT.IEHLIST') NEW TRACKS
       SPACE(15 15) RECFM(F B) LRECL(121)"
PUSH " LISTVTOC VOL=3390="VOLSER
"EXECIO 1 DISKW SYSIN ( FINIS"
X=BPXWDYN('ALLOC DD('DASDVOL') SHR REUSE UNIT(3390) VOL('VOLSER')')
"IEHLIST"
X=BPXWDYN('FREE DD('DASDVOL')')
"FREE  FI(SYSIN,SYSPRINT)"
"ISPEXEC EDIT DATASET('"SYSUID".SYSPRINT.IEHLIST')"

_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Apr 26, 2012 7:34 am    Post subject: Reply with quote

Thanks expat, but I only need to find out about a specific dataset, and if it is not cataloged a volid has to be given on which I will search. I just about have it done already with lminit, but as usual, running into a few pit falls, you forget so much if you have not worked with it in a long time.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group