IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the creation date of a GDG latest verison file.


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sampath786

New User


Joined: 03 Oct 2011
Posts: 6
Location: India

PostPosted: Fri Jun 15, 2012 5:16 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jun 15, 2012 5:25 pm
Reply with quote

The REXX LISTDSI function should give you what you want for a dataset that's on DASD.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jun 15, 2012 6:48 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Jun 15, 2012 6:54 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 15, 2012 8:24 pm
Reply with quote

Quote:
the moderators should be able to give "marks of shame" to querents ...
And the folks who "need a JCL to . . . ." icon_wink.gif

and . . .

d
Back to top
View user's profile Send private message
sampath786

New User


Joined: 03 Oct 2011
Posts: 6
Location: India

PostPosted: Mon Jun 18, 2012 11:48 am
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jun 18, 2012 11:52 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 18, 2012 11:59 am
Reply with quote

BPXWDYN accepts a relative GDG specification and the RTDSN clause return the <real> DSNAME!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jun 18, 2012 3:13 pm
Reply with quote

These are some previous threads on a similar topic:

ibmmainframes.com/about48027.html
ibmmainframes.com/about57893.html
ibmmainframes.com/about56153.html
ibmmainframes.com/about47243.html
ibmmainframes.com/about16234.html
ibmmainframes.com/about47243.html
ibmmainframes.com/about48027.html
ibmmainframes.com/about42664.html
ibmmainframes.com/about55355.html
www.ibmmainframes.com/viewtopic.php?t=44607
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top