IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to copy all the GDG versions into another GDG


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Wed Sep 12, 2007 9:32 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Sep 12, 2007 9:38 pm
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: 91
Location: Hyderabad

PostPosted: Wed Sep 12, 2007 9:40 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Sep 12, 2007 9:48 pm
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: 91
Location: Hyderabad

PostPosted: Wed Sep 12, 2007 10:02 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Sep 12, 2007 10:04 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Sep 14, 2007 1:06 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top