One-to-one copy of GDG generation files



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

One-to-one copy of GDG generation files

Postby Namrata_Singri » Tue Aug 02, 2016 5:22 pm

Hi,

I need to copy a GDG generation files into another new GDG generation files.

Like:
Say I have genarations for GDG base A as
A.1
A.2
A.3

I need to do one to one copy
like A.1 to B.1
A.2 to B.2
A.3 to B.3 where B is the another GDG base

Please suggest me.
Namrata_Singri
 
Posts: 13
Joined: Mon Jun 20, 2016 6:18 pm
Has thanked: 2 times
Been thanked: 0 time

Re: One-to-one copy of GDG generation files

Postby NicC » Tue Aug 02, 2016 5:47 pm

What is the problem that you are having? It seems a trivial IEBGENER/ICEGENER/DFSORT task - input:A.1(0) output B.1(+1) etc for each generation.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: One-to-one copy of GDG generation files

Postby Aki88 » Tue Aug 02, 2016 6:11 pm

Hello,

IMHO this is less DFSORT more of JCL/UTILITIES/VSAM question.
From DFSORT stand-point, use a simple SORT FIELDS=COPY to copy datasets.

Coming to A.1 to B.1 and so on, there are multiple ways of achieving it, depending on what you have; for instance:
a. In case both the GDG base (for A and B datasets) have same starting generation, then a simple +1, +2 and so on coupled with a 'NEW,CATLG' in your JCL would yield similar generation numbers
b. In case they are not same or can be different depending on how they were created, then it can require a bit of coding. Assuming that you can use REXX, do a LISTCAT on the GDG base of A, refer the 'Associations', use SUBSTR to get the GDG generation details from here. Append the generation name to B dataset name. Here you can use ALLOC to allocate the generation or even better, submit a JCL to INTRDR which would create the new GDG generation with the name you've just built, and then subsequently copy A to B in the next step.

A word of caution, how do you plan to ensure that the generations are always serialized, meaning - say two generations of A G0011V00 and G0016V00 are to be copied to B. Now basis the requirement A.G0011V00 is to be copied to B.G0011V00 and A.G0016V00 to B.G0016V00. Now, since A never had such a naming convention restriction, hence it'll have G0012 etc generations as well; how do you plan to control this for B?
Also, why go through this ordeal at all?
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: One-to-one copy of GDG generation files

Postby Namrata_Singri » Tue Aug 02, 2016 7:19 pm

Hi,

I apologize for posting here...

As suggested, if i consider instance a, i dont know how many generation A have,When i will be processing copy step i may have one or more than one A generations. So i cant give +1, +2 and so on.

can you suggest me without using REXX how can i achieve this
Namrata_Singri
 
Posts: 13
Joined: Mon Jun 20, 2016 6:18 pm
Has thanked: 2 times
Been thanked: 0 time

Re: One-to-one copy of GDG generation files

Postby Aki88 » Tue Aug 02, 2016 7:56 pm

Hello,

Okies; going with option- a, you can add the concepts of option- b and drive the results. Basically, perform a LISTCAT, route the output of the same to a DS (use ALLOC/EXECIO/DISKW), use EXECIO/DISKR to read the LISTCAT output, filter out data under 'ASSOCIATIONS' using a DO-WHILE loop. Now you'll have the generation names which you need to build.
After this you can use QUEUE command to tailor/build your JCL in the REXX.
Use the aforementioned keywords to search the forum and the web to understand their usage, build a logic around it, test it with TRACE option. If you're stuck, share it here and we can guide you further.

Hope this helps.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: One-to-one copy of GDG generation files

Postby Robert Sample » Tue Aug 02, 2016 8:26 pm

can you suggest me without using REXX how can i achieve this
Write a program in the language of your choice (REXX doesn't have to be the choice) to parse the output of a LISTCAT, generating JCL to be submitted via the internal reader to copy each generation from A to B. Or, use dynamic allocation to copy them inside the program without submitting a job. But if you are looking for a solution that can copy an unknown number of generations, one at a time, you MUST either submit another job or use dynamic allocation -- period.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: One-to-one copy of GDG generation files

Postby enrico-sorichetti » Tue Aug 02, 2016 10:45 pm

if gdg B is empty why not use a plain simple DFDSS COPY RENAME
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: One-to-one copy of GDG generation files

Postby Namrata_Singri » Wed Aug 03, 2016 12:47 pm

yea.. gdg B is empty.. because after the completion of the process i am deleting gdg generations.
Namrata_Singri
 
Posts: 13
Joined: Mon Jun 20, 2016 6:18 pm
Has thanked: 2 times
Been thanked: 0 time

Re: One-to-one copy of GDG generation files

Postby BillyBoyo » Wed Aug 03, 2016 4:20 pm

So, a rename is much faster than a copy/delete.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post