MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using COBOL to determine latest generation of GDG

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Thu May 29, 2008 12:49 pm    Post subject: Using COBOL to determine latest generation of GDG Reply with quote

Hi,

During an argument, a friend told me that it is possible to use COBOL to determine latest generation of a GDG.

Additional info:-

    * Using LISTCAT to get the list of available generations.
    * Supplying this list as input to COBOL program.
    * The output file will have the latest generation name to be used further.


I believe that using LISTCAT ENTRIES or LEVELS, we can get the non-vsam list of all generations under a GDG base. Again, we will have to use SORT to exclude the text part of the output and write only the dataset names to another file. Is my guess right?

Please share your thoughts.

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu May 29, 2008 1:08 pm    Post subject: Reply with quote

ranga_subham,

You can call IDCAMS which does the LISTCAT info from COBOL. Then read the contents of the output scanning the output for string "NONVSAM"

Check this link which has an example of Cobol calling IDCAMS.

http://www.mvsforums.com/helpboards/viewtopic.php?p=10515#10515

The input IDCAMS statement wud just be

Code:

LISTCAT ENT('your gdg base name') NAME
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Thu May 29, 2008 1:32 pm    Post subject: wow....... Reply with quote

Kolusu, Thanks for the COBOL program.

Let me try it out......will be doing it for first time.

I don't know whether I will succeed.

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group