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 

Archving 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
devpal
Beginner


Joined: 06 Jul 2004
Posts: 14
Topics: 8

PostPosted: Tue Jan 11, 2005 4:53 pm    Post subject: Archving the GDG Reply with quote

Hi,

Currently I am taking a backup of all my sequential files on the mainframe in a GDG. But the GDG has a limit of only 255 files. Is there anyway in which this GDG is archived thru a Job after storing the maximum limit of files and then the new versions of the same GDG start again during execution?

Thanks,
Devpal.
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: Tue Jan 11, 2005 5:03 pm    Post subject: Reply with quote

Devpal,

Create a monthly version of the gdg which runs at the end of every month and copies all the daily versions into a single version.

Similary have a yearly version of the gdg which runs at the end of every year and copies all the monthly versions into a single version.

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


Joined: 06 Jul 2004
Posts: 14
Topics: 8

PostPosted: Tue Jan 11, 2005 5:50 pm    Post subject: Reply with quote

Hi Kolusu,

This idea definitely helps. But I have a few clarifications around this. If I create a monthly version, this would be separate job to be scheduled every month. Similarly with the case of the yearly version. My query is -will I need to add a different step in the JCL of these jobs so that the daily versions restart from current day generation, or if I set the GDG limit to 30 versions, will it start renumbering the versions automatically? . Please can you give me the technical help with the JCL steps for this to be done?

Many Thanks,
Pallavi.
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: Tue Jan 11, 2005 8:09 pm    Post subject: Reply with quote

Quote:

Please can you give me the technical help with the JCL steps for this to be done?



Devpal,

It is a quite simple exercise .You should have 3 gdg bases respectively.
Code:

HLQ.LLQ.GDG.DAILY    ==> DAILY FILE GDG BASE
HLQ.LLQ.GDG.MONTHLY  ==> MONTHLY FILE GDG BASE
HLQ.LLQ.GDG.YEARLY   ==> YEARLY FILE GDG BASE


So everyday you will back your files to a gdg version using the following JCl

Code:

//STEP0100  EXEC PGM=SORT                 
//SYSOUT    DD SYSOUT=*                   
//SORTIN    DD DSN=YOUR FILE TO BE BACKED,       
//             DISP=SHR
//SORTOUT   DD DSN=HLQ.LLQ.GDG.DAILY(+1),
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,             
//             SPACE=(CYL,(X,Y),RLSE)
//SYSIN     DD *                       
  SORT FIELDS=COPY                   
/*       

On the month end you will use this jcl to copy all your daily versions into a single Monthly gdg version

Code:

//STEP0100  EXEC PGM=SORT                 
//SYSOUT    DD SYSOUT=*                   
//SORTIN    DD DSN=HLQ.LLQ.GDG.DAILY,       
//             DISP=(OLD,DELETE,KEEP)     
//SORTOUT   DD DSN=HLQ.LLQ.GDG.MONTHLY(+1),
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,             
//             SPACE=(CYL,(X,Y),RLSE)
//SYSIN     DD *                       
  SORT FIELDS=COPY                         
/*


Note the disp parameter on the sortin in the above step. After successfully copying all the daily version , the Job deletes all the gdg versions, so that your daily job can once again start creating from gen1 once again.

On the year end you will use this jcl to copy all your monthly versions into a single yearly gdg version

Code:

//STEP0100  EXEC PGM=SORT                 
//SYSOUT    DD SYSOUT=*                   
//SORTIN    DD DSN=HLQ.LLQ.GDG.MONTHLY,       
//             DISP=(OLD,DELETE,KEEP)     
//SORTOUT   DD DSN=HLQ.LLQ.GDG.YEARLY(+1),
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,             
//             SPACE=(CYL,(X,Y),RLSE)
//SYSIN     DD *                       
 SORT FIELDS=COPY                         
/*


All the monthly versions are deleted once again with the disp parameter after successful copy of the data.

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


Joined: 06 Jul 2004
Posts: 14
Topics: 8

PostPosted: Wed Jan 12, 2005 11:38 am    Post subject: Reply with quote

Thank you very much Kolusu. Somehow, I had ignored the usage of the DISP parameter. This definitely solves my problem.
Back to top
View user's profile Send private message
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