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 

Check for the First version of the GDG

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Sat Aug 27, 2005 9:28 am    Post subject: Check for the First version of the GDG Reply with quote

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
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sat Aug 27, 2005 11:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Sun Aug 28, 2005 11:13 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sun Aug 28, 2005 11:59 am    Post subject: Reply with quote

tattva,

Please search before posting. This has been discussed earlier. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=138&highlight=endrec+gdg

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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