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 GDGs to another in one step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copy all GDGs to another in one step
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: Chennai

PostPosted: Fri Mar 16, 2007 11:35 am    Post subject: Re: Copy all GDGs to another in one step
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: 1439
Location: Bangalore,India

PostPosted: Fri Mar 16, 2007 12:11 pm    Post subject:
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    Post subject: Re: Copy all GDGs to another in one step
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 16, 2007 5:59 pm    Post subject:
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    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 Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm


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