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

How to read all GDG versions in reverse order in a JCL?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
haidude

New User


Joined: 11 May 2007
Posts: 10
Location: Mumbai

PostPosted: Fri Aug 03, 2007 3:37 pm
Reply with quote

How to read GDG versions in reverse order starting from the last generated version.
Suppose, If we want to search for a key value starting from the last generation. how can we do that in JCL?
Do we need to mention all the GDG versions of can we make use of Relative version numbers like -1, 0 , +1?

Please give me the answer and thanks in advance
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Fri Aug 03, 2007 4:08 pm
Reply with quote

If you know the exact number of versions, you can mention the version numbers like -3,-2,-1,0 etc.

There should be always same number of versions that you are mentioning in your JCL. e.g., If less number of versions exist than you have mentioned, gives error. If more number of versions exist than you have mentioned, ignores unnamed versions.

Hope this helps.
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 Aug 03, 2007 4:20 pm
Reply with quote

haidude wrote:
Suppose, If we want to search for a key value starting from the last generation. how can we do that in JCL?
Hi,

If you need to search some key, why don't use search option of ISPF. What difference will it make if you start reading from the most recent generation?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 03, 2007 4:38 pm
Reply with quote

If you only specify the GDG base name for the DD statement it will start reading from the newest to the oldest version.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Rotate partition-logical & physic... DB2 0
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top