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 

TSO Command to find the present version of GDG !!

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


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Wed Nov 30, 2005 10:31 pm    Post subject: TSO Command to find the present version of GDG !! Reply with quote

Hey Techfundoos, my shop's production automation tool does not support TSO/External functions.

So is there a way to find out the present version of a particular GDG ??

If it was JCL it was easy to point to 0th version and then do processing, but apart from that is there any other way.

All suggestions are most welcome.

Thanks,
Amit Joshi.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Wed Nov 30, 2005 10:41 pm    Post subject: Reply with quote

amit4u79,

You can try

Code:

TSO LISTC ENT('GDG BASE NAME')


Do you want to process the current generation in REXX? or do you want to get just the name of the current gen?

Rexx solution

http://www.mvsforums.com/helpboards/viewtopic.php?p=14690#14690

JCL solution:

http://www.mvsforums.com/helpboards/viewtopic.php?p=621#621

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Nov 30, 2005 11:36 pm    Post subject: Reply with quote

You can find out the current (or any other) version of a GDG by using the LOCATE macro in assembler (SVC 26). This is the same service that is used by ISPF option 3.4, so you can just type the (0) level name, or any other level, even if it does not exist yet, into the dslist level field and it will show you the 'goovoo' name.

Or, from Rexx, you can use a combination of ISPF's LMINIT and REXX's LISTDSI()"
Code:
/* REXX */                                                 
Address ispexec                                             
"LMINIT DATAID(ABC) DATASET('NADEL.GDGBASE(0)') ENQ(SHR)"   
If rc = 0 Then                                             
  Do                                                       
    'LMQUERY DATAID(&ABC) DDNAME(DD) DATASET(DS)'           
    call listdsi dd 'FILE'                                 
    Say 'The real name for 'strip(ds)' is ' sysdsname       
    'LMFREE DATAID(&ABC)'                                   
  End                                                       


Unfortunately, LISTDSI by itself does not take a GDG generation(?) name as input, and the TSO ALLOC command doesn't either; hence the use of LMINIT to create a DD name, and LMQUERY to find out what that name is.

If you want a Rexx function that just invokes SVC 26 and returns the name in a variable, see the REALNAME function at the z/OS toys page
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