View previous topic :: View next topic
|
Author |
Message |
ajit sahu
New User
Joined: 06 Aug 2013 Posts: 3 Location: india
|
|
|
|
HI,
I want to copy different GDG version to a PS file. I tried givin GDG base alone in the input file, so that it can read all GDG version availables( AS i dont know How many versions will be present).
The real problem , I am facing is , it is copying GDG starting from +0 till -10 ( latest first and oldest last), But I want to copy Oldest (V-10) to lates +0 version..
IS it possible by any utility to copy from Oldest version to latest version by giving Base alone , Or i need to manually specify the GDG ?
This is what I am coding:
Exec PGM = SORT/IEBCOPY ( I tried with both)
file in = GDG base
Fiel out = PS file:
Expected result:
GDG version copied
-2
-1
0
Actual result :
0
-1
-2
How i can get the expected oen?? is there any utility ?? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
No, there is no automagic utility.
This Has been asked recently and using the forum SEARCH you shoule be aboe to fine these discussions.
Basically, you need to get a list of these and generate JCL in the order you need.
Also, you are not using versions, but rather Generations. |
|
Back to top |
|
|
ajit sahu
New User
Joined: 06 Aug 2013 Posts: 3 Location: india
|
|
|
|
Thanks for the reply.
Yes, pls read it as generation instead of version. I was searching shortcut as i was not sure how many genrations will be present . But, I believe I need to code my JCL accordingly in absence of utility. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, you will need to create the needed JCL. It can be automated rather than doing it by hand every run. . .
The method has been posted before and if you look a bit, you should be able to get it. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
If you give GDG Base as input to a 'COPY operation', it will copy all the generations associated with it. However, the records are copied will be in last in, first out order (LIFO) as has been mentioned.
If you want the records copied in first in, first out order (FIFO), so that the records of the first generation will appear first, followed by the records of the second generation and so on, you can also use the smart DFSORT trick " Copy GDG records in first in, first out order" which is shown here www-01.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094 . |
|
Back to top |
|
|
ajit sahu
New User
Joined: 06 Aug 2013 Posts: 3 Location: india
|
|
|
|
Thanks Anuj.. it helped me a lot.. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Glad that we had been helpful. |
|
Back to top |
|
|
|