View previous topic :: View next topic
|
Author |
Message |
tusharguptait
New User
Joined: 15 Feb 2006 Posts: 32
|
|
|
|
Hi
Do any of you have JCL to copy a GDG (all generations) to another GDG.
I have a GDG with 20 generations. I need to copy all the generations of this gdg to another GDG such that the second GDG will also have 20 generations.
I tried following step :
//STEP0010 EXEC PGM=ICEGENER
//SYSUT1 DD DISP=SHR,DSN=GDG.NAME1
//SYSUT2 DD DSN=GDG.NAME2(+1),
// DISP=(NEW,CATLG),
// SPACE=(CYL,(50,50),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
But this copied all the generations to one generation of new GDG. Can I have 20 generations in the second GDG?
I know of one approach using idcams but I will appreciate any other suggestions.
Thanks
TG |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm not sure exactly what you're looking for from the forum members. If you want to copy 20 generations to another 20 generations, then you will have to perform 20 copy operations. How you go about that is entirely up to you - do you want a single job step with 20 input and 20 output DD's, a single job with 20 job steps, or one job run 20 times with varying input/output designations?
If it were me, I would write a program that would:
- determine all current generations via LISTCAT
- DEFINE the new target GDG base
- Loop through the LISTCAT data and copy each current generation to the same generation on the target GDG, i.e. OLD.GDG.G0001V00 copy to NEW.GDG.G0001V00, OLD.GDG.G0002V00 copy to NEW.GDG.G0002V00, and so on. |
|
Back to top |
|
|
tusharguptait
New User
Joined: 15 Feb 2006 Posts: 32
|
|
|
|
Hi,
Perhaps I was not able to explain my problem clearly. I need to copy all the generations of old gdg to new gdg ( with one-to-one relationship between input and output versions ) in one job step, with one input dd and one output dd. Can it be done?
Thanks
TG |
|
Back to top |
|
|
yogesh
New User
Joined: 27 May 2005 Posts: 21
|
|
|
|
I Dont think there is any JCL for coping all generations of one GDG to other. |
|
Back to top |
|
|
ranga_subham
New User
Joined: 01 Jul 2005 Posts: 51
|
|
|
|
Post Removed, Complaint received...
Quote: |
Hi,
This is ***** from Pune, India. The post named below in your forum (ibmmainframes.com) has critical information related to me any my company.
JCL to copy a GDG (all generations) to another GDG
The posting was made by some of your member named ranga_subham. I am not sure how he came to know about this critical information.
Please remove the posting from the site, and also inform Mr. ranga_subham not to post any such critical info in future.
This is on top of the priority and I am getting into lot of trouble here. I am under a lot of presure here. Please get the same removed.
I am anxiously waiting for your reply. Please respond to me in case of any concerns
Thanks & Regards,
******. |
|
|
Back to top |
|
|
Bharanidharan
New User
Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
|
|
|
|
I tried the code but got RC=4, with no action taken on either source or target GDGs. Here is the message:
Code: |
COPY -
DATASET( -
INCLUDE( -
D09SE02.AAL.SCANEXT.C0K.** -
) -
) -
RENUNC(D09SE02.AAL.SCANEXT.C0K.**, -
D09SE02.AAL.SCANEXT.C0K1.**) -
CATALOG TGTGDS(ACTIVE)
ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'COPY '
ADR109I (R/I)-RI01 (01), 2006.131 00:47:06 INITIAL SCAN OF USER CONTROL STATEMENTS COMPLETED.
ADR016I (001)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK
ADR006I (001)-STEND(01), 2006.131 00:47:06 EXECUTION BEGINS
ADR470W (001)-DDDS (04), NO DATA SETS SELECTED FOR PROCESSING
ADR006I (001)-STEND(02), 2006.131 00:47:08 EXECUTION ENDS
ADR013I (001)-CLTSK(01), 2006.131 00:47:08 TASK COMPLETED WITH RETURN CODE 0004
ADR012I (SCH)-DSSU (01), 2006.131 00:47:08 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0004 FROM:
TASK 001
|
The source GDG has 2 gens & has data and target GDG has a base.
Am I forgetting something? |
|
Back to top |
|
|
ranga_subham
New User
Joined: 01 Jul 2005 Posts: 51
|
|
|
|
Hi,
Make sure that the input and output GDG base names are of the same length.
If you see the "D09SE02.AAL.SCANEXT.C0K.**" is different than output "D09SE02.AAL.SCANEXT.C0K1.**". So, make sure that both the GDG bases have the equal qualifiers. Pls try and let me know.
HTH. |
|
Back to top |
|
|
Bharanidharan
New User
Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
|
|
|
|
Actually length is not a problem, since it is unconditional renaming (RENUNC).
When I tried before, the gens were migrated. Usually, when migrated datasets are used in jobs, SMS would automatically receive a notification to bring them back to DASD. I assumed the same would happen with ADRDSSU, but regrettably it didn't. I manually HRECALLed them and submitted the same job again. This time I got the expected result.
Thanks!
Regards,
Bharani. |
|
Back to top |
|
|
tusharguptait
New User
Joined: 15 Feb 2006 Posts: 32
|
|
|
|
Hi,
I have a query regarding this jcl. Can we specify storage class of the gdg to be created. In the present jcl , the target versions are taking the storage class of source one .
Regards
TG |
|
Back to top |
|
|
tusharguptait
New User
Joined: 15 Feb 2006 Posts: 32
|
|
|
|
Hi All,
Can ADRDSSU be used to copy all the generations of gdg when the generations are residing on tape.
Regards
TG |
|
Back to top |
|
|
Bharanidharan
New User
Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
|
|
|
|
I am afraid we don't seem to be blessed with such privilege because the ADRDSSU options DUMP and COPYDUMP, which can work with both tapes and DASD at the same time, are not having the RENUNC option, neither are they able to dump (as such) all the GDG versions if given as input in any format. So you have to be content with DASD operations for this facility. |
|
Back to top |
|
|
bharath.gct
New User
Joined: 03 May 2007 Posts: 1 Location: Chennai
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
If the source and target absolute generation numbers differ then you will need to copy the source inputs one by one. One job, just submitted many times. |
|
Back to top |
|
|
binuraj_s
New User
Joined: 14 Sep 2005 Posts: 4
|
|
|
|
Not sure whether somebody would be reading this topic anymore.Anyways my question is related to this topic.
I need to copy from one GDG to another, but I need to copy only the latest versions created in one gdg to the other.
For eg:- if there are 3 versions created in the original GDG everytime a Job runs. I will start by copying these 3 versions to my backup GDG using the above method. The original GDG has a limit of 3 and backup GDG has a limit of 500.
Going forward, whenever a new set of versions gets created in the original GDG , I need to back these versions to my backup GDG.
I tried the above method, but the above method always overwrite the entire GDG in the target everytime. I don't want the older versions to be overwritten.
Please let me know if this can be achieved using ADRDSSU. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
but I need to copy only the latest versions created in one gdg to the other |
What defines "the latest versions"? Actually, they are most likely NOT versions, but rather generations. And yes there is a considerable difference.
If the copy is always to be 3, you could use DSNOLD(-2), DSNOLD(-1), and DSNOLD(0) as input to a copy and DSNNEW(+1), DSNNEW(+2), and DSNNEW(+3) as output from the copy.
Possibly, there is something i misunderstand. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Also
Quote: |
The original GDG has a limit of 3 and backup GDG has a limit of 500. |
How did you manage to achieve this ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
expat, dick's calculator is getting around .... |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
...just by defining two different GDG's, i think
Nce weekend |
|
Back to top |
|
|
binuraj_s
New User
Joined: 14 Sep 2005 Posts: 4
|
|
|
|
Well I should have understood that I should be careful while mixing facts and fakes :-)...That GDG limit of 500 was a random number that came to my mind when I posted this query. Lets keep it at 255 to keep the question realistic. I hope that answers "Expat's" question.
Coming to Dick's solution, your assumption about "generations" is correct.I would like to add another twist to the question. The limit of original GDG is not known. In other words I need to copy all the generations of the original GDG to backup GDG appending it rather than overwriting the existing generations in the backup GDG. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
You can take in all generations by specifying the base GDG name (no relative generation number). You may want to delete all generation so that they do not get taken in again next run. But how many output generations do you want from each run, 1 or the same number as the input generations read? |
|
Back to top |
|
|
binuraj_s
New User
Joined: 14 Sep 2005 Posts: 4
|
|
|
|
Hi Douglas,
I would want the O/P to have the same number of generations as in I/P.
Rgds,
Binu |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
One way to do what you want would be to do a listcat on the "input" gdg and use that to generate the appropriate number of copy and dd statements. |
|
Back to top |
|
|
|