View previous topic :: View next topic |
Author |
Message |
ranga_subham Intermediate

Joined: 31 Jan 2006 Posts: 255 Topics: 72
|
Posted: Thu May 29, 2008 12:49 pm Post subject: Using COBOL to determine latest generation of GDG |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu May 29, 2008 1:08 pm Post subject: |
|
|
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 |
|
 |
ranga_subham Intermediate

Joined: 31 Jan 2006 Posts: 255 Topics: 72
|
Posted: Thu May 29, 2008 1:32 pm Post subject: wow....... |
|
|
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 |
|
 |
|
|