View previous topic :: View next topic |
Author |
Message |
Guru_80 Beginner
Joined: 08 Jan 2006 Posts: 6 Topics: 3
|
Posted: Wed Jan 18, 2006 3:13 am Post subject: GDG Version CHecker |
|
|
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 |
|
|
MikeBaker Beginner
Joined: 04 May 2004 Posts: 96 Topics: 9
|
Posted: Wed Jan 18, 2006 3:34 am Post subject: |
|
|
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. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Jan 18, 2006 5:13 am Post subject: |
|
|
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 |
|
|
Guru_80 Beginner
Joined: 08 Jan 2006 Posts: 6 Topics: 3
|
Posted: Thu Jan 19, 2006 6:19 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Guru_80 Beginner
Joined: 08 Jan 2006 Posts: 6 Topics: 3
|
Posted: Sun Jan 22, 2006 11:06 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Sun Jan 22, 2006 7:15 pm Post subject: |
|
|
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 |
|
|
|
|