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

How to use GDGROLL?


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

New User


Joined: 18 Dec 2006
Posts: 18
Location: bangalore

PostPosted: Thu Dec 13, 2007 2:35 pm
Reply with quote

Hi,
My requirement is that, everyday GDG generation will be created with different data's. By the end of the month i need to collect all the GDG generation data's in a single PDS with the help of GDG base. The data's should be in the sorted order in the output file. (i.e.) the first generation data's should be in the first of my output file.

Regard's
Ram
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 13, 2007 3:48 pm
Reply with quote

Hi,

These two statements are bit contradictory-
Quote:
The data's should be in the sorted order in the output file

Quote:
the first generation data's should be in the first of my output file...
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Dec 13, 2007 3:52 pm
Reply with quote

Ram,

Addition to Anuj's observation -
Quote:
need to collect all the GDG generation data's in a single PDS with the help of GDG base.

Which one do you have in mind. PDS or PS?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 13, 2007 3:57 pm
Reply with quote

Oh..I think you are not concerned about the data 'inside' the GDGs rather you are concerned about an output such as

First GDG Data
Second GDG Data
Third GDG Data...

right?
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Dec 13, 2007 6:50 pm
Reply with quote

why don't u just use the GDG base while copying to a different file??

this wil conactenate all the generations under it...
Back to top
View user's profile Send private message
ramvishwa
Warnings : 2

New User


Joined: 18 Dec 2006
Posts: 18
Location: bangalore

PostPosted: Thu Dec 13, 2007 7:16 pm
Reply with quote

Hi,
Sorry let me clearly explain my requirement.

Consider that my daily job will creates a new generation every day.
for ex: From Day 1 to 30 it will create 30 generation
(i.e.) AAAAA.BBBB.CCCCC.G0001V00
AAAAA.BBBB.CCCCC.G0002V00
AAAAA.BBBB.CCCCC.G0003V00
......
AAAAA.BBBB.CCCCC.G0030V00

By the end of the month, I need to collect all the 30 generation data's into a single generation with new version
(i.e.) AAAAA.BBBB.CCCCC.G0001V01

The same thing will be repeated for next month and i need the generation data's in new version like
AAAAA.BBBB.CCCCC.G0001V02

Sorry i don't know whether it is achievable or not. Any suggestion plz let me know.. Thnx.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Dec 13, 2007 7:46 pm
Reply with quote

I'm sure a storage specialist will have a better idea, but it seems to me to be pretty straight-forward, although you haven't mentioned if any of this needs to be more dynamic:

1. Concatenate the existing GDG's into a single dataset, in their original order:

//STEPAAAA EXEC PGM=IEBGENER
//SYSUT1 DD DSN=AAAAA.BBBB.CCCCC(-29),DISP=(OLD,DELETE,KEEP)
// DD DSN=AAAAA.BBBB.CCCCC(-28),DISP=(OLD,DELETE,KEEP)
...
// DD DSN=AAAAA.BBBB.CCCCC(0),DISP=(OLD,DELETE,KEEP)
//SYSUT2 DD DSN=NEW.SEQ,DISP=(,CATLG),...
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY

2. Copy to the single new version:

//STEPBBBB EXEC PGM=IEBGENER
//SYSUT1 DD DSN=NEW.SEQ,DISP=(OLD,DELETE,KEEP)
//SYSUT2 DD DSN=AAAAA.BBBB.CCCCC.G0001V01,DISP=(,CATLG,DELETE),...
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Dec 13, 2007 7:57 pm
Reply with quote

You need to be careful about mixing generations and versions they are not the same thing. When you create the monthly use a different GDG base.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sat Dec 15, 2007 2:04 pm
Reply with quote

As raak has said, use the gdg base as input dsn.

//SYSUT1 DD DSN=old.gdg.base,DISP=SHR
//SYSUT2 DD DSN=new.gdg.base(+1), blah blah blah

Unless you need the data in some specific order within the new GDG, this will work perfectly.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Sat Dec 15, 2007 3:11 pm
Reply with quote

Quote:
//SYSUT1 DD DSN=AAAAA.BBBB.CCCCC(-29),DISP=(OLD,DELETE,KEEP)
// DD DSN=AAAAA.BBBB.CCCCC(-28),DISP=(OLD,DELETE,KEEP)
...


Superk,
Why is it that u have mentioned all the GDG generations seperately instead of using just the GDG base??
Is there any specific idea/advantage behind doing so??
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Dec 15, 2007 9:43 pm
Reply with quote

raak wrote:
Why is it that u have mentioned all the GDG generations seperately instead of using just the GDG base??
Is there any specific idea/advantage behind doing so??


Only because the O/P stated that he wants the datasets processed in their original order (FIFO), not the normal order (LIFO).
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

 


Search our Forums:

Back to Top