IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy all the 3 GDG generations to an output dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mudunuga

New User


Joined: 25 Jul 2008
Posts: 1
Location: Mumbai

PostPosted: Sun Aug 17, 2008 1:24 am
Reply with quote

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
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sun Aug 17, 2008 1:42 am
Reply with quote

The best way to know it is to try it. No?

Remember Edison....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sun Aug 17, 2008 1:44 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sun Aug 17, 2008 2:45 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sun Aug 17, 2008 3:10 pm
Reply with quote

Hi,

just to add to what Robert said, the latest generation is read first.


Gerry
Back to top
View user's profile Send private message
krithikaj

New User


Joined: 10 Aug 2008
Posts: 45
Location: India

PostPosted: Mon Aug 18, 2008 3:53 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 18, 2008 5:15 pm
Reply with quote

ibmmainframes.com/faq.php?mode=bbcode
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 18, 2008 8:27 pm
Reply with quote

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 icon_confused.gif ).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top