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

Copy all GDGs to another in one step


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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Mar 16, 2007 11:30 am
Reply with quote

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

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Fri Mar 16, 2007 11:35 am
Reply with quote

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

Senior Member


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

PostPosted: Fri Mar 16, 2007 12:11 pm
Reply with quote

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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Mar 16, 2007 2:17 pm
Reply with quote

Got it.Thanks all
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Fri Mar 16, 2007 4:04 pm
Reply with quote

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... icon_confused.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Mar 16, 2007 5:59 pm
Reply with quote

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
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top