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 

merging GDG at end of month

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


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Wed Jun 14, 2006 9:30 am    Post subject: merging GDG at end of month Reply with quote

Hi gurus,
JOB1 run daily and it create a GDG verion daily. We need to write JCl which will merge all the version created in the particular month. This job will run at the end of the month.
How this can be achieved .
TIA
Ranjit
_________________
One should move lightly through the life, carrying no excess baggage.
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 Jun 14, 2006 9:41 am    Post subject: Reply with quote

ranjit5311,


Just give the base of GDG as input and code disp=(old,delete,keep). By doing so the daily base will have versions starting over from 1 after the monthly job.

Code:

//******************************************************************
//**** COPY DAILY FILES INTO MONTHLY BACK-UP FILE               ****
//******************************************************************
//STEP0100  EXEC PGM=FILEAID                                         
//SYSPRINT DD SYSOUT=*                                             
//DD01     DD DSN=YOUR DAILY GDG BASE,                             
//            DISP=(OLD,DELETE,KEEP)                               
//DD01O    DD DSN=YOUR MONTHLY GDG BASE(+1),         
//            DISP=(NEW,CATLG,DELETE),                             
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE),
//            DCB=(LRECL=NNN,RECFM=YY,BLKSZIE=0)
//SYSIN    DD *
$$DD01 COPY
/*


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


Joined: 27 Nov 2005
Posts: 27
Topics: 14

PostPosted: Wed Jun 14, 2006 10:26 am    Post subject: Reply with quote

Kolusu,
Nice to see ur promt reply.

According, to the soltuion above, If we run the JOB at the end of month feb then it will merge gdg vertion from JAN to Feb. But I want just the version of the feb month.

TIA
Ranjit
_________________
One should move lightly through the life, carrying no excess baggage.
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 Jun 14, 2006 10:50 am    Post subject: Reply with quote

Quote:

According, to the soltuion above, If we run the JOB at the end of month feb then it will merge gdg vertion from JAN to Feb. But I want just the version of the feb month.


ranjit5311,

Look carefully on the DISP parameter on this input GDG. I am Deleting all the versions which is explained clearly in my post. Sad

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
prasanth_thavva
Beginner


Joined: 14 May 2006
Posts: 40
Topics: 18

PostPosted: Sat Jun 17, 2006 12:00 am    Post subject: Reply with quote

Hi Kolusu,

i have query on the above jcl.

Code:
Code:

//******************************************************************
//**** COPY DAILY FILES INTO MONTHLY BACK-UP FILE               ****
//******************************************************************
//STEP0100  EXEC PGM=FILEAID                                         
//SYSPRINT DD SYSOUT=*                                             
//DD01     DD DSN=YOUR DAILY GDG BASE,                             
//            DISP=(OLD,DELETE,KEEP)                               
//DD01O    DD DSN=YOUR MONTHLY GDG BASE(+1),         
//            DISP=(NEW,CATLG,DELETE),                             
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE),
//            DCB=(LRECL=NNN,RECFM=YY,BLKSZIE=0)
//SYSIN    DD *
$$DD01 COPY
/*
 

according to his query he asked you to keep only last month backup...
if you look into jcl , jcl disposition refers to DISP=(OLD,DELETE,KEEP)..means you are deleting the existing version if it runs successfully if it not it keeps that dataset..
could you please explain me. in the JCL $$DD01 referring to first DD then what about the second DD... it automatically refers to the second DD?


one more doubt on KEEP, what is difference between KEEP and UNCATALOG..what is differences between PASS.
_________________
Thanks&Regards
Prasanth Thavva
Back to top
View user's profile Send private message Send e-mail
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