View previous topic :: View next topic |
Author |
Message |
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Wed Nov 30, 2005 10:31 pm Post subject: TSO Command to find the present version of GDG !! |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Nov 30, 2005 11:36 pm Post subject: |
|
|
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 |
|
|
|
|