Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to get the creation date of a GDG latest verison file.
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

Moderator Team Head


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

PostPosted: Fri Jun 15, 2012 5:25 pm    Post subject: Reply to: How to get the creation date of a GDG latest veris
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

Senior Member


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

PostPosted: Fri Jun 15, 2012 6:48 pm    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Fri Jun 15, 2012 6:54 pm    Post subject:
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

Site Director


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

PostPosted: Fri Jun 15, 2012 8:24 pm    Post subject: Reply to: How to get the creation date of a GDG latest veris
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    Post subject: How to get the creation date of a GDG latest veris
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: 1712
Location: UK

PostPosted: Mon Jun 18, 2012 11:52 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 18, 2012 11:59 am    Post subject: Reply to: How to get the creation date of a GDG latest veris
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

Senior Member


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

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

These are some previous threads on a similar topic:

http://ibmmainframes.com/about48027.html
http://ibmmainframes.com/about57893.html
http://ibmmainframes.com/about56153.html
http://ibmmainframes.com/about47243.html
http://ibmmainframes.com/about16234.html
http://ibmmainframes.com/about47243.html
http://ibmmainframes.com/about48027.html
http://ibmmainframes.com/about42664.html
http://ibmmainframes.com/about55355.html
http://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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us