Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8686
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 Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts Xpediter: STEP OVER cobol section Auryn Compuware & Other Tools 0 Thu Feb 22, 2018 9:30 pm
No new posts Image copy after Online reorganization. lind sh IMS DB/DC 0 Tue Jan 30, 2018 9:58 pm
No new posts Copy Specific Groups V S Amarendra Reddy SYNCSORT 10 Thu Jan 11, 2018 1:16 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us