Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy all the 3 GDG generations to an output dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copy all the 3 GDG generations to an output dataset
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: 456
Location: Belgium

PostPosted: Sun Aug 17, 2008 1:42 am    Post subject:
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: 8119
Location: East Dubuque, Illinois, USA

PostPosted: Sun Aug 17, 2008 1:44 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sun Aug 17, 2008 2:45 pm    Post subject: Re: Copy all the 3 GDG generations to an output dataset
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: 1703
Location: Australia

PostPosted: Sun Aug 17, 2008 3:10 pm    Post subject:
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    Post subject: Copy all the 3 GDG generations to an output dataset
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: 6968
Location: porcelain throne

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

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

Site Director


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

PostPosted: Mon Aug 18, 2008 8:27 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us