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 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 Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts RFE: Additional compound operators fo... prino PL/I & Assembler 1 Wed Jun 08, 2016 3:31 pm
No new posts To read from Zeke scheduler p.anbuselvan CLIST & REXX 5 Thu Mar 31, 2016 1:13 am


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