MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GDG version reclaim
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Mon Sep 15, 2008 4:21 am    Post subject: GDG version reclaim Reply with quote

ALL,


Please look at the DD statement below


Code:

//OUT      DD DSN=XXXX.YYYY.ZZZZ(+1),   
//            DISP=(MOD,KEEP,KEEP),                       
//            DCB=(LRECL=391,RECFM=VB),               
//            DATACLAS=PRDDARTA                       


It is in the first step of the JCL. My understanding is it should create a new GDG version. But it uses the last GDG version present. Can any one explain why?

It shows following msg

Code:

IGD17356I GDG RECLAIM REQUEST WAS SUCCESSFULLY PROCESSED FOR DATA SET XXXX.YYYY.ZZZZ.G0001V00

Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Mon Sep 15, 2008 5:44 am    Post subject: Reply with quote

What does the message say in the book

What is your GDG definition

And the correct term is generation not version. The two terms are completely different, please use the correct one !
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Sep 15, 2008 7:30 am    Post subject: Reply with quote

using disp=mod will only create a new generation if no generation exists.

Since a generation existed, the system went and found it.

using DISP=NEW would have created a new generation.

Attention to Detail!
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
arvibala
Beginner


Joined: 12 Feb 2008
Posts: 142
Topics: 67

PostPosted: Mon Sep 15, 2008 3:29 pm    Post subject: Reply with quote

Additional Info :
To refer to a newly created Generation in the same JCL we can use (+1)
_________________
Arvind
"You can make a difference with your smile. Have that with you always"
Back to top
View user's profile Send private message Yahoo Messenger
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Tue Sep 16, 2008 3:25 am    Post subject: Reply with quote

arvibala wrote:
Additional Info :
To refer to a newly created Generation in the same JCL we can use (+1)


Well, if you take a look at the JCL posted you will see that the OP IS using +1.

Moreover, if you take a read of what Dick has written you will see the explanation of what the problem is, and how to correct it.

Dick Dinosaur - great piece of information. As the saying goes that you can't teach an old dog new tricks, well thanks mate, now having learnt that about DISP=MOD and a GDS, you have just proved that I'm not an old dog Laughing
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Tue Sep 16, 2008 8:33 am    Post subject: Reply with quote

dbzTHEdinosauer wrote:
using disp=mod will only create a new generation if no generation exists.

Since a generation existed, the system went and found it.

using DISP=NEW would have created a new generation.

Attention to Detail!


I doubt that, mainly because it makes +1 specified on the DSN useless.

Just to make sure I had run the JOB below

Code:


//JOBID11K JOB (8412,VCAT),'TEST,TEST',CLASS=A,         
//             MSGCLASS=6,NOTIFY=&SYSUID,               
//             REGION=8M,                               
//             MSGLEVEL=(1,1)                           
//ST02 EXEC PGM=IEBGENER                                 
//SYSPRINT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//SYSUT1   DD *                                         
   TEST L                                               
//SYSUT2   DD DISP=(MOD,CATLG),DSN=JOBID11.TEST.GDG(+1),
//        DATACLAS=DSD6TINY,LRECL=10,RECFM=FB           



it has created a new version of GDG every time i ran it.

I can understand this as MOD creates a file if it does not exist, but original issue remains a mystery to me.
Back to top
View user's profile Send private message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Tue Sep 16, 2008 8:56 am    Post subject: Reply with quote

expat wrote:
What does the message say in the book



It says something about "deferred roll-in generation data set".

I couldn't understand it. Can you throw some light on it please?
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Tue Sep 16, 2008 9:03 am    Post subject: Reply with quote

Yes, but you are using a different parameter in DISP aren't you.

I did ask you to provide info on the GDG base definition.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Tue Sep 16, 2008 10:53 am    Post subject: Reply with quote

I think I have the explanation. When you create the initial file with the DISP=(MOD,KEEP,KEEP), the dataset is in a deferred roll-in state. This term is briefly explained in Chapter 29, Processing Generation Data Groups in the DFSMS Using Datasets manual. If you check your allocation messages, you will not find the words 'ROLLED IN' with the IGD107I message. Also, a LISTCAT of the GDG base doesn't show the file. As long as the file is in this deferred roll-in state, the same file gets allocated every time you use the relative number +1. The game changes when you catalog the dataset. The file is rolled-in, and everything processes in the way we're all accustomed to.

I guess my question for the op would be, why do you want to do this? It looks like you just want to create a new generation. Why not just use the standard (NEW, CATLG,DELETE)? The interesting outcome I found was that even if you use DISP=(MOD,CATLG,DELETE) for the file in the deferred roll-in state, the data is writting over the same as if you used DISP=(NEW,CATLG,DELETE).
Back to top
View user's profile Send private message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Wed Sep 17, 2008 7:28 am    Post subject: Reply with quote

jsharon1248 wrote:
I think I have the explanation. When you create the initial file with the DISP=(MOD,KEEP,KEEP), the dataset is in a deferred roll-in state. This term is briefly explained in Chapter 29, Processing Generation Data Groups in the DFSMS Using Datasets manual. If you check your allocation messages, you will not find the words 'ROLLED IN' with the IGD107I message. Also, a LISTCAT of the GDG base doesn't show the file. As long as the file is in this deferred roll-in state, the same file gets allocated every time you use the relative number +1. The game changes when you catalog the dataset. The file is rolled-in, and everything processes in the way we're all accustomed to.


That explains everything. I should code disp as (MOD,CATLG,DELETE).

Quote:


guess my question for the op would be, why do you want to do this? It looks like you just want to create a new generation. Why not just use the standard (NEW, CATLG,DELETE)? The interesting outcome I found was that even if you use DISP=(MOD,CATLG,DELETE) for the file in the deferred roll-in state, the data is writting over the same as if you used DISP=(NEW,CATLG,DELETE)



I am using this file as output in one of my ICETOOL jobs. I use this as destination for many of the input DS. As my intention is to append the data i had to use MOD. Otherwise data in this file will be replaced every time.
Back to top
View user's profile Send private message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Wed Sep 17, 2008 7:43 am    Post subject: Reply with quote

expat wrote:
Yes, but you are using a different parameter in DISP aren't you.


Yes, But I thought we are talking only about first parameter of DISP.

Quote:

I did ask you to provide info on the GDG base definition.


Code:


 /* IDCAMS COMMAND */             
    DEFINE GENERATIONDATAGROUP - 
    (NAME(JOBID11.TEST.GDG) -     
     LIMIT(05) -                 
    )                             
Back to top
View user's profile Send private message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Wed Sep 17, 2008 7:44 am    Post subject: Reply with quote

expat wrote:
Yes, but you are using a different parameter in DISP aren't you.


Yes, But I thought we are talking only about first parameter of DISP.

Quote:

I did ask you to provide info on the GDG base definition.


Code:


 /* IDCAMS COMMAND */             
    DEFINE GENERATIONDATAGROUP - 
    (NAME(JOBID11.TEST.GDG) -     
     LIMIT(05) -                 
    )                             
Back to top
View user's profile Send private message
hchinnam
Beginner


Joined: 04 Feb 2005
Posts: 31
Topics: 10

PostPosted: Wed Sep 17, 2008 7:45 am    Post subject: Reply with quote

All,

Thanks for your help. jsharon1248's post explains the issue.
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Wed Sep 17, 2008 9:07 am    Post subject: Reply with quote

If you want to append to the dataset, use DISP=(MOD,CATLG,DELETE) when you create the (+1). Then, use DISP=MOD and (+0) when you want to append (unless it's in the same job where you'd use the (+1)). There are a couple other ways to accomplish the same thing. You could code the specific generation, but that's not very flexible. The other option is to use a non-GDG dataset for all the MOD activity, and then copy that file to the GDG. This was an interesting topic.
Back to top
View user's profile Send private message
kctechpro
Beginner


Joined: 27 Aug 2008
Posts: 6
Topics: 1

PostPosted: Wed Sep 17, 2008 2:35 pm    Post subject: Reply with quote

Interesting! Shocked
I never realized you could use DISP=(MOD) with a GDG.
This behavior only works outside a scheduler, Right? Question
I thought most schedulers resolved the generations before execution and therefore would be looking for the (+1).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group