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: 8619
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 Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 6 Fri Sep 22, 2017 7:08 am

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