View previous topic :: View next topic
|
Author |
Message |
mudunuga
New User
Joined: 25 Jul 2008 Posts: 1 Location: Mumbai
|
|
|
|
My GDG has 3 generations,
test.gdg------------base
test.gdg.g0001v00
test.gdg.g0002v00
test.gdg.g0003v00
If I use below JCL then what will happen
exec pgm=iebgener
SYSUT1 DD DSN=TEST.GDG,DISP=SHR
SYSUT2 DD DSN=TEST.OUTPUT,DISP=(NEW,CATLG,CATLG)
Is that copy all 3 generations to the output dataset? |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
The best way to know it is to try it. No?
Remember Edison.... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
From the JCL reference manual, if you omit the generation number:
Quote: |
A DD DSNAME parameter that requests all members of a generation data group (GDG). The system retrieves the data-set-sequence-number from the catalog. |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
mudunuga wrote: |
If I use below JCL then what will happen
exec pgm=iebgener
SYSUT1 DD DSN=TEST.GDG,DISP=SHR
SYSUT2 DD DSN=TEST.OUTPUT,DISP=(NEW,CATLG,CATLG) |
You would probably get a few error messages for missing DD statements |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
just to add to what Robert said, the latest generation is read first.
Gerry |
|
Back to top |
|
|
krithikaj
New User
Joined: 10 Aug 2008 Posts: 45 Location: India
|
|
|
|
Hi,
If you are searching for the JCL, check this out.
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRNT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=TEST.GDG(0),DISP=SHR
// DD DSN=TEST.GDG(-1),DISP=SHR
// DD DSN=TEST.GDG(-2),DISP=SHR
//SORTOUT DD DSN=TEST.OUTPUT,
// DISP=(OLD,CATLG,KEEP),
// UNIT=SYSDA,
// SPACE=(CYL,(400,600),RLSE),
// DCB=(RECFM=FB)
//SYSIN DD *
SORT FIELDS=COPY
/*
Regards,
KJ |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
If you are searching for the JCL, check this out. |
Is there some reason you posted this jcl when the original jcl does what was required?
The original request was to copy all generations and the original jcl does this.
Also, please learn to use the "Code" tag as suggested. It will make your jcl, control statements, and data much easier to read. You can also use Preview to see how your post will appear to the forum (rather than how it looks in the Reply editor) before you Submit. After you Preview, make sure you click Submit or your post is lost (done that a few times ). |
|
Back to top |
|
|
|