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
 

 

How to copy all the GDG versions into another GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Wed Sep 12, 2007 9:32 pm    Post subject: How to copy all the GDG versions into another GDG
Reply with quote

Hi All,
I have a requirement as below.
Can it be written in JCL

I have a GDG say A.B.C
I want to create another GDG say X.Y.Z and copy all the versions of A.B.C in to X.Y.Z through a JCL code
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: Wed Sep 12, 2007 9:38 pm    Post subject:
Reply with quote

This has been asked and answered before - please use the search button at the top of this page.

Also, it is not clear if you want to copy the versions to corresponding versions, or all versions of A.B.C into one version of X.Y.Z
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Wed Sep 12, 2007 9:40 pm    Post subject:
Reply with quote

I have searched the entire page but not able to find an appropriate solution for the above.

I want to copy the versions to corresponding versions.
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: Wed Sep 12, 2007 9:48 pm    Post subject:
Reply with quote

Use DFdss - documentation readily available at the IBM website if you don't have access to it at your shop.
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Wed Sep 12, 2007 10:02 pm    Post subject:
Reply with quote

Hi Expat,
I am not able to figure out anything from DFDSS.
Can you please be brief in this so that it will be helpful for me.
or else it would be helpful for me if you can provide some links for this
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: Wed Sep 12, 2007 10:04 pm    Post subject:
Reply with quote

Use the COPY parameter of DFdss in conjunction with RENAME
Back to top
View user's profile Send private message
tchen40

New User


Joined: 12 Sep 2007
Posts: 30
Location: Los Angeles, Ca

PostPosted: Thu Sep 13, 2007 2:46 am    Post subject: Re: How to copy all the GDG versions into another GDG
Reply with quote

dp33770 wrote:
Hi All,
I have a requirement as below.
Can it be written in JCL

I have a GDG say A.B.C
I want to create another GDG say X.Y.Z and copy all the versions of A.B.C in to X.Y.Z through a JCL code


If I understand you correctly, you have:

A.B.C.G0001V00
A.B.C.G0002V00
A.B.C.G0003V00

You want to copy the contents of those 3 files into a single file ? If that's it. you just run an GENER job.

//SYSUT1 DD DSN=A.B.C,DISP=SHR
//SYSUIT2 DD DSN=X.Y.Z(+1)
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 Sep 14, 2007 1:06 am    Post subject:
Reply with quote

tchen40

The OP has stated that he wishes to do a one to one copy.

As I said using DFdss, or even creating a small proc to do it
Code:

//COPYPROC PROC GEN=
//COPYGDG  EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=input gdg base.&GEN.,DISP=SHR
//SYSUT2   DD DSN=output gdg base.&GEN.,DISP=(,CATLG,DELETE),
//            SPACE=(whatever)
//SYSIN    DD DUMMY
//COPYPROC PEND
//*
//COPY1    EXEC COPYPROC,GEN=G1234V00
//COPY2    EXEC COPYPROC,GEN=G1235V00
//COPY3    EXEC COPYPROC,GEN=G1236V00
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Fri Sep 14, 2007 10:05 pm    Post subject:
Reply with quote

tchen40 is correct....
If you leave off the gdg specification on your input, it will automatically bring in all versions. Or, if you need the last three - you could code the minus value 0, -1, -2 in a concatenated statement.

If this is TAPE and you want all gdg input on the same tape, let us know.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


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