View previous topic :: View next topic
|
Author |
Message |
prabs2006
Active User
Joined: 12 Jan 2006 Posts: 103
|
|
|
|
Hi,
I have 20 files of a base GDG A.
I want to copy all the files to another set of 20 files in one step which will also be the GDGs
FILEA(0)
FILEA(-1)
FILEA(-2)
.
.
FILEA(-19)
to
FILEB(0)
FILEB(-1)
FILEB(-2)
.
,
FILEB(-19)
Please let me know if any solution is available
T & R
Prabs |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Prabs,
This can help you .
Code: |
//STEP010 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY -
DATASET( -
INCLUDE( -
T.SOURCE** - =>SOURCE GDG
) -
) -
RENUNC(T.SOURCE**, - =>SOURCE GDG
T.RESULT.**) - => RESULT GDG,
CATALOG TGTGDS(ACTIVE)
/*
//SYSOUT DD SYSOUT=* |
|
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Just use gdg base ( dont provide (0) or (-1) etc....) in the sortin statement. It copies all the available generations.
Code: |
//copygdg exec pgm=sort
//sysout dd sysout=*
//SORTIN DD DSN=your.gdg.base,disp=....
//sortout dd dsn=your.output.file,disp=.....
//sysin dd *
sort fields=copy
/* |
|
|
Back to top |
|
|
prabs2006
Active User
Joined: 12 Jan 2006 Posts: 103
|
|
|
|
Got it.Thanks all |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
Hello
Murmokh,
the solution that u have provided will copy all the generation of the input file to the LATEST GENERATION of the OUTPUT file.
That was not what was required i guess.
Corrections are welcome... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
I want to copy all the files to another set of 20 files in one step which will also be the GDGs |
Looks to me as if Raak is perfectly correct in his/her point above. |
|
Back to top |
|
|
|