Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to read all GDG versions in reverse order in a JCL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to read all GDG versions in reverse order in a JCL?
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: 356
Location: New York

PostPosted: Fri Aug 03, 2007 4:08 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Aug 03, 2007 4:20 pm    Post subject: Re: How to read all GDG versions in reverse order in a JCL?
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: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 03, 2007 4:38 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us