View previous topic :: View next topic |
Author |
Message |
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Sat Aug 27, 2005 9:28 am Post subject: Check for the First version of the GDG |
|
|
Hi All,
Here i go with one of my New found problem!!!
1) i'm creating a GDG vversion from one of my programs.
2) Now i need to check if the GDG file is the first version or not.
3) If its the first version and its not empty . i need to delete it
can any one please look into this and help me out ?
Thanks,
Tattva |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Sat Aug 27, 2005 11:45 pm Post subject: |
|
|
tattva,
You can do this in 2 steps.
1. IDCAMS Step - use LISTCAT entries on the GDG base and get the number of active generations.
2. Pass the output of IDCAMS (step 1) to your program which writes to the gdg file and based on the number of active generations you can decide whether to write data to it or not.
This will anyway create a first version but it will not be deleted, instead the contents will be empty. So that next time when the job runs, it will not have any trouble creating the second version.
Will this solve your problem ?
Thanks,
Phantom |
|
Back to top |
|
 |
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Sun Aug 28, 2005 11:13 am Post subject: |
|
|
Phatom,
i would like to know if it possible to get the version of the gdg file created using JCL ?
ex :-
say suppose the gdg file created is :- t33345.gdg.base.gv001
i would like to know if it possible to get (gv001) using jcl.
Thanks,
tattva |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|