View previous topic :: View next topic
|
Author |
Message |
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Use DFdss - documentation readily available at the IBM website if you don't have access to it at your shop. |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Use the COPY parameter of DFdss in conjunction with RENAME |
|
Back to top |
|
|
tchen40
New User
Joined: 12 Sep 2007 Posts: 30 Location: Los Angeles, Ca
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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 |
|
|
|