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 

GDG Version CHecker

 
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
Guru_80
Beginner


Joined: 08 Jan 2006
Posts: 6
Topics: 3

PostPosted: Wed Jan 18, 2006 3:13 am    Post subject: GDG Version CHecker Reply with quote

Hi,

Here's is a problem which i have not been to crack. I would really appreciate if any one can help me out with this:

Description:-

1) There is a COB prog which creates a flat file as its out put
2) This flat file will be saved on to GDG so as to increase its retention period. (Max ver 255)

Now the problem here is:-

I need to check if the Max version has reached. If yes, then I need to write out the file to a diff GDG base.

Below Ex depicts the same:-

File: - TEST.GDGBASE.G00922V00

Check if this is the 255th version; if yes write it out to another base.

Appreciate your help!!

Thanks,
Guru_80
Back to top
View user's profile Send private message
MikeBaker
Beginner


Joined: 04 May 2004
Posts: 96
Topics: 9

PostPosted: Wed Jan 18, 2006 3:34 am    Post subject: Reply with quote

Guru_80,

This is the wrong approach to solve your problem. You say, "... so as to increase its retention period." You can control the retention period on any file whatsoever. What about (perhaps) making the HLQ of the dsn equal to the date that the file can be safely deleted?

Your solution is workable, but its hardly ideal. Seeing as the retention thing is a big deal, why not make things dead easy for all who happen to even gaze upon your files? ie: include a expiry date in the dsn, and also on the file itself, so the file will automatically be deleted on the due date. Who needs GDGs??

Have a look on the board, because there are almost certainly examples of how to write a date in the dsn, and how to set expiry dates for files. Otherwise you might end up juggling many different GDG bases, and it is unlikely to please anyone who has to maintain it further down line. Neutral
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jan 18, 2006 5:13 am    Post subject: Reply with quote

Quote:

Check if this is the 255th version; if yes write it out to another base.


Are you dynamically creating the GDG versions in cobol? If so then Call IDCAMS from the COBOL program and then parse the output to see if you have indeed created 255 versions.

Here is a Sort solution also. check this link

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

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
Guru_80
Beginner


Joined: 08 Jan 2006
Posts: 6
Topics: 3

PostPosted: Thu Jan 19, 2006 6:19 am    Post subject: Reply with quote

Hi,

I searched the forum for setting expiry dates on datasets, but couldn't find any posts.

Can any one let me know how do i set expiry dates on data sets ( which are going to reside on DASD and NOT on tape)?

The file will be created by COBOL program.

Thanks,
Guru_80
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jan 19, 2006 8:43 am    Post subject: Reply with quote

Guru_80,

Check this link which explains about the EXPDT parameter in detail

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/12.26?DT=20030423085347

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
Guru_80
Beginner


Joined: 08 Jan 2006
Posts: 6
Topics: 3

PostPosted: Sun Jan 22, 2006 11:06 am    Post subject: Reply with quote

Hi,

Thanks a lot for the help !!! am creating a flat with timestamp and datestamp. But there is something more which i need to do :-

I need to run a job monthly which will concantenate all the flat file created ( with the time stamp & datestamp ) into a single GDG file.

Say i have 5 file created on ( D1, D2,D3,D4,D5) respectively.

then if i run the job on D6 it should concatinate all files except for D5.

Is there any way i can compare the datestamps?

Appreciate all your help !!

Thanks,
Guru_80
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sun Jan 22, 2006 7:15 pm    Post subject: Reply with quote

Quote:

am creating a flat with timestamp and datestamp. But there is something more which i need to do :-

I need to run a job monthly which will concantenate all the flat file created ( with the time stamp & datestamp ) into a single GDG file.



Nope can't do.

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