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 

Checking GDG Base

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


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon Jul 28, 2003 12:48 am    Post subject: Checking GDG Base Reply with quote

In one REXX test at our shop, I was asked to write a REXX routine and would scan a PROC for GDGs and find out whether the GDG base has been created in a particular region or not.


I wrote the program but It had a problem in it. ie If only the GDG base is available in a region then the program would work fine. But if the GDG file contains some versions and if one or more of its versions are migrated the program fails to say whether it the GDG base is available or not.

I just used the SYSDSN command and I passed the GDG base name to it. But if one/more versions of the GDG are migrated then the SYSDSN command tries to recall the versions and also when I display the value returned by the SYSDSN command it says
Code:

ERROR PROCESSING REQUESTED DATASET


How do I resolve this issue in REXX. I tried to use LISTDSI function with NORECALL parameter. But it didn't work out when I passed the GDG base to it. It ended with a return code of 2 and reason code of 16.

I should be able to detect the presence of GDG base without recalling its migrated versions.

Please help me to resolve this issue
Thanks
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Mon Jul 28, 2003 10:51 am    Post subject: Reply with quote

try
LISTC ENT('your.gdg.base')
and parse the result looking for GDG BASE
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Mon Jul 28, 2003 5:22 pm    Post subject: Reply with quote

here's part of a routine that I use to create a GDG base if one doesn't exist, variable cds contains the GDG base name :-
Code:
x = OutTrap("lc.","*")                                         
ADDRESS TSO "LISTC ENTRY('"cds"') GDG"                         
x = OutTrap("OFF")                                             
Parse Var lc.1 m1 .                                           
If m1 = "GDG" Then Return 0                                   
Say "Creating GDG BASE "cds                                   
ADDRESS TSO "DEFINE GDG (NAME('"cds"') NEMP SCRATCH LIMIT(20)"

_________________
Regards,
Mike.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Jul 29, 2003 7:13 am    Post subject: Reply with quote

Thanks Mike and Taltyman,

Its working fine now.

Thanks a lot.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu Feb 12, 2004 8:46 am    Post subject: Reply with quote

Somebody asked me how to get latest version of GDG in REXX and a simple modification of Mike's code works -

Code:

/* REXX to get latest version of GDG   
*/                                     
gdg_base = 'GDG.ABC.DESTROY'           
x = outtrap('l.')                       
address TSO "LISTC ENT('"gdg_base"')"   
x = outtrap("OFF")                     
n = l.0 - 1                             
say word(translate(l.n,' ','-'),2)     
exit                                   
Back to top
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sat Feb 21, 2004 7:11 am    Post subject: Reply with quote

Thanks a lot dibakar. I was the one who asked that question longggggg back. Even I forgot about that. Thanks for helping me out...
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon Feb 23, 2004 12:34 am    Post subject: Reply with quote

Thanks Phantom, but I was referring to one of my colleague who asked me this question recently, through an email and not through this post.

Though I know neither him nor you, still I beleive you two are not same because then he would have posted the question here instead of asking me.
Back to top
View user's profile Send private message Send e-mail
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Mon Feb 23, 2004 2:46 pm    Post subject: Reply with quote

Phantom,
I hope you have considered these:

Quote:
SYSDSN does not directly support data that is on tape.


Quote:
LISTDSI does not directly support data that is on tape.

_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
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