Copying gdg versions



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Copying gdg versions

Postby ykreddy » Fri Dec 17, 2010 9:49 am

Hi,


I have a gdg base USER.SHARE.TRAINEE.TESTGDG
verisions with 1 to 100
I want to copy first 50 gdsversions into a sing flat file and also
i want to copy alternate gdg versions into a single flat file

IN A SINGLE STEP WITHOUT DATASET CONCATENATION.



Can U tel is it possible
If possible hw it possible


Thanks
Ykreddy
Thanks & Regards,

YK Reddy
ykreddy
 
Posts: 6
Joined: Mon Sep 20, 2010 5:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Copying gdg versions

 

Re: Copying gdg versions

Postby NicC » Fri Dec 17, 2010 10:47 am

You cannot have versions 1- 100 as the version part of the name (gxxxxVYY) only has 2 digits (YY) so you can hold 01 to 99 (99 versions) or 00 to 99 (100 versions)
If you mean you have 100 generations eg G0001V00 - G0100V00 then we can do something.

In Rexx:
1 - list the generations using one of the many methods
2 - extract the names to stem variables - the first 50 to one stem and the alternates (odd or even?) to another
3 - allocate an output dataset
4 - loop through the first stem allocating the dataset and copying it to the output and deallocating after the copy
5 - deallocate the output dataset
6 - repeat steps 3, 4, 5 for the other stem

Now it is up to you unless someone posts an alternative.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Copying gdg versions

Postby enrico-sorichetti » Fri Dec 17, 2010 11:06 am

IN A SINGLE STEP WITHOUT DATASET CONCATENATION.

have the job done by the idiot who set the silly requirement!
he should tell!

anybody with a bit of brains who had to do the task would not certainly care about concatenation or number of steps!
the ball is in somebody' s else park now :D
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: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Copying gdg versions

Postby steve-myers » Fri Dec 17, 2010 12:02 pm

I'm thinking this is some sort of interview question to separate people that really understand GDG from the common variety of people that sort of know something about GDG.

First of all, the terminology is wrong. Some of us have translated "version" to generation, but if "version" is really correct, you will never, ever, find 50 "versions" in a single generation data group unless the excess "versions" belong to many different generations. Second, assuming the translation of "version" to "generation" is correct, does he mean to start with the 50 most recent generations, or start with the 50 oldest generations? What order is the copying to be accomplished? What if the GDG base does not have 50 generations cataloged in it? I would not propose solutions until i understand the problem statement much better! I can't imagine something as stupid as this coming up in the real world anyway. Finally, a problem like this cannot be accomplished using JCL. As NicC notes, the solution has to involve some sort of programming, whether it's in Rexx or some other language.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Copying gdg versions

Postby ykreddy » Fri Dec 17, 2010 12:16 pm

Hi,

SORRY FOR INCONVENIENCE.

I have a gdg base USER.SHARE.TRAINEE.TESTGDG
with GENERATIONS 1 to 100
I want to copy first 50 GENERATIONS into a sing flat file and also
i want to copy alternate GENERATIONS into a single flat file

IN A SINGLE STEP WITHOUT DATA SET CONCATENATION.



Can U tel is it possible
If possible hw it possible
Thanks & Regards,

YK Reddy
ykreddy
 
Posts: 6
Joined: Mon Sep 20, 2010 5:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Copying gdg versions

Postby enrico-sorichetti » Fri Dec 17, 2010 12:59 pm

SORRY FOR INCONVENIENCE.
just horse manure
You already got some replies, no reason to repost the same question with the same wording
anyway as already noted, the question is so badly posed, and the issue has so little sense
that most certainly You will not get the replies You expect!
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: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Copying gdg versions

Postby enrico-sorichetti » Fri Dec 17, 2010 1:22 pm

You corrected Your wording, to make it agree with what everybody had understood?

remember... replying to forum questions is
on our own time
our own equipment
free of charge
based on our experience and common best practices

so it is unreasonable to expect answers based on Your desires,
You will have to be happy with what we tell! :D
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: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Copying gdg versions

Postby dick scherrer » Sat Dec 18, 2010 3:13 am

Hello,

First - this is not a JCL question.

I want to copy first 50 GENERATIONS into a sing flat file and also
i want to copy alternate GENERATIONS into a single flat file

IN A SINGLE STEP WITHOUT DATA SET CONCATENATION.

Yes, this can be done (if i understand the "requirement") - but most likely not by someone with limited experience. . .

This could be done in a single "step" using rexx or assembler or even cobol or a combination of these. . .

This would require that all files be dynamically allocated. Which generations to copy to which output would also be determined dynamically.

To provide useful replies, the question needs to be quite clear to everyone participating.

If some interviewer asked if this can be done with JCL, the answer is No, it cannot. Possibly the interviewer needs to learn that JCL does nothing execpt execute "things". . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post