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 

Copy all GDG generation(s) to one GDG generation

 
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
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Fri Jul 22, 2005 10:16 am    Post subject: Copy all GDG generation(s) to one GDG generation Reply with quote

Hi,
Can someone enlighten me on how to do the following in JCL using IEBGENER, IDCAMS , FILE AID ..which ever is best or that you know of.

(a)
Copy following GDGs (number of available versions will vary):
WLF5.ACN025FH.TEST5
WLF5.ACN025FH.TEST5.G0001V00
WLF5.ACN025FH.TEST5.G0002V00
.
.
WLF5.ACN025FH.TEST5........

To GDG:
WLFA.METS.TEST5

(b)
Delete all generations of source GDG after copy step, retain base alone.
WLF5.ACN025FH.TEST5

P.S: A search did not fetch desired results ,possible ,there are then I missed.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jul 22, 2005 10:28 am    Post subject: Reply with quote

For a., a simple IEBGENER will work:
Code:

//COPY     EXEC PGM=IEBGENER
//SYSUT1   DD   DISP=SHR,DSN=WLF5.ACN025FH.TEST5
//SYSUT2   DD   DSN=WLFA.METS.TEST5(+1),DISP=(MOD,CATLG,DELETE),
//         UNIT=SYSDA,SPACE=(.......)
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   DUMMY
//*
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jul 22, 2005 10:32 am    Post subject: Reply with quote

For b., you could just repeat the logic of a., except that the output is DD DUMMY instead of a GDG:
Code:

//COPY     EXEC PGM=IEBGENER
//SYSUT1   DD   DISP=(OLD,DELETE,DELETE),DSN=WLF5.ACN025FH.TEST5
//SYSUT2   DD   DUMMY
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   DUMMY
//*

leaving just the base entry.
Back to top
View user's profile Send private message
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Fri Jul 22, 2005 2:15 pm    Post subject: Reply with quote

Simple and works like a charm !!! Just what I was looking for !!! 8)
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Mon Jul 25, 2005 4:05 pm    Post subject: Reply with quote

Why not use DISP=(OLD,DELETE,KEEP) on STEP A? By separating steps A and B all the records must be read twice!
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Thu Jul 28, 2005 11:09 am    Post subject: Reply with quote

What Bill has suggested would be perfect if there was no intermediate Step between Steps A & B and no dependencies thereof.
However , what was shown here as Step B is actually Step C in the Job.
The requirement is to Delete the source GDG only after successful completion of Step B (executes a db2/cobol batch program).
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