View previous topic :: View next topic
|
Author |
Message |
sampath786
New User
Joined: 03 Oct 2011 Posts: 6 Location: India
|
|
|
|
I have 0% knowledge on REXX.
I am able to get the latest version of a GDG below is the code
Code: |
/*****REXX*****/
/*************************************/
/*************** PDS *****************/
GDG = 'XXXXX.XXX.XXX(0)'
RC = BPXWDYN("ALLOC DSN('"GDG"') SHR REUSE",
"RTDSN(THEDSN)")
SAY 'LATEST GDG:'
SAY RC THEDSN
CALL BPXWDYN("FREE DSN('"GDG"')")
EXIT 0
|
How can i get the creation date of the latest GDG ?
I am unable to use the LISTDST command as it is used for PDS. Can any one please help me out |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The REXX LISTDSI function should give you what you want for a dataset that's on DASD. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
And that's generation not version, It's been repeated so many time on this board that I seek a short-form for it now. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Maybe in addition to bannings and warnings, the moderators should be able to give "marks of shame" to querents who confuse "generation" and "version". |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
the moderators should be able to give "marks of shame" to querents ... |
And the folks who "need a JCL to . . . ."
and . . .
d |
|
Back to top |
|
|
sampath786
New User
Joined: 03 Oct 2011 Posts: 6 Location: India
|
|
|
|
I tried with LISTDSI .
Code: |
GDG = 'PGDG08.WORKCOMP.P41008AP(0)'
RC = BPXWDYN("ALLOC DSN('"GDG"') SHR REUSE",
"RTDSN(THEDSN)")
SAY 'LATEST GDG:'
SAY RC THEDSN
DSINFO = LISTDSI(THEDSN)
SAY DSINFO
CALL BPXWDYN("FREE DSN('"GDG"')")
|
The result for DSINFO is displayed as 16.
-------------------------
Thanks for correcting me @Anuj |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
So what does a return code of 16 from LISTDSI say when you read the manual? What does your trace say? Why are you using BPXWDYN? What is wrong with ALLOC and FREE? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
BPXWDYN accepts a relative GDG specification and the RTDSN clause return the <real> DSNAME! |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
|