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
 
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 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

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