View previous topic :: View next topic |
Author |
Message |
vini Intermediate
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
|
Posted: Fri Jul 22, 2005 10:16 am Post subject: Copy all GDG generation(s) to one GDG generation |
|
|
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 |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Jul 22, 2005 10:28 am Post subject: |
|
|
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 |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Jul 22, 2005 10:32 am Post subject: |
|
|
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 |
|
 |
vini Intermediate
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
|
Posted: Fri Jul 22, 2005 2:15 pm Post subject: |
|
|
Simple and works like a charm !!! Just what I was looking for !!! 8) |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Mon Jul 25, 2005 4:05 pm Post subject: |
|
|
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 |
|
 |
vini Intermediate
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
|
Posted: Thu Jul 28, 2005 11:09 am Post subject: |
|
|
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 |
|
 |
|
|