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 

How to Avoid Replacing Existing Dataset with DISP=(NEW ?
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
twb
Beginner


Joined: 15 Jun 2006
Posts: 5
Topics: 2
Location: San Francisco

PostPosted: Wed Jul 05, 2006 2:18 pm    Post subject: How to Avoid Replacing Existing Dataset with DISP=(NEW ? Reply with quote

Long ago, if one coded DISP=(NEW,CATLG,DELETE) for an existing dataset, the job failed. It seems now (with SMS), DISP=(NEW,CATLG,DELETE) will uncatalog an existing dataset and allocate and catalog a new version.

Are there some options to cause the job to loudly fail rather than quietly replacing the existing dataset?

Yes, I realize the old one is only uncataloged and I am using ISMF to try to find it in the VTOC's, but I REALLY wish the job had failed!

Thanks for your advice,
Tim
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Jul 06, 2006 1:28 am    Post subject: Reply with quote

What you describe should never happen and has nothing to do with SMS. Something is wrong! You need to analyze the situation or post more information.
Back to top
View user's profile Send private message Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Jul 06, 2006 1:49 am    Post subject: Reply with quote

Indeed -- something is very wrong. Is this shared dasd or shared catalogs, 2nd level systems with shared virtual dasd, something like that?
Back to top
View user's profile Send private message Visit poster's website
nevilh
Beginner


Joined: 11 Aug 2004
Posts: 115
Topics: 0

PostPosted: Thu Jul 06, 2006 2:51 am    Post subject: Reply with quote

If the old dataset was not cataloged and you try and allocate a new dataset with the same name the system will allocate the dataset as long as the new allocation is on another device. If you try to allocate on the same device you should get a duplicate dsname error.
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Jul 06, 2006 6:31 am    Post subject: Reply with quote

If I run this code twice,
Code:
//STEP010  EXEC PGM=IEFBR14                                   
//DD1      DD   DSN=MYUSERID.TRY.THIS,DISP=(,CATLG,DELETE),   
//         SPACE=(TRK,1),                                     
//         DSORG=PS,RECFM=FB,LRECL=80                         
//*                                                           


I get a NOT CATLGD 2 error for the second dataset, but the first dataset remains catalogued. Not the same as Tim's problem, but I believe it's not uncommon.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
nevilh
Beginner


Joined: 11 Aug 2004
Posts: 115
Topics: 0

PostPosted: Thu Jul 06, 2006 6:54 am    Post subject: Reply with quote

Mervyn did the second job leave an uncataloged dataset on the disk?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jul 06, 2006 7:08 am    Post subject: Reply with quote

Mervyn,

The second job should have failed with a JCL error. I get this when I submit the IEFBR14 step the second time.

Code:

IEF344I TXXXXXA STEP0100 FILE01 -
ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
IGD17101I DATA SET TXXXXXX.EMPTY.DSN                                           
NOT DEFINED BECAUSE DUPLICATE NAME EXISTS IN CATALOG                           
RETURN CODE IS 8 REASON CODE IS 38 IGG0CLEH                                   


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nevilh
Beginner


Joined: 11 Aug 2004
Posts: 115
Topics: 0

PostPosted: Thu Jul 06, 2006 7:28 am    Post subject: Reply with quote

Dedpending on what is coded in the ALLOCxx member of PARMLIB depends on what course of action will taken
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jul 06, 2006 7:53 am    Post subject: Reply with quote

Quote:

Dedpending on what is coded in the ALLOCxx member of PARMLIB depends on what course of action will taken


Looks like my shop has the following

Code:

/********************************************************************/
/*                                                                  */
/*              CATLG_ERR defines policies for when                 */
/*              datasets fail to get (re)cataloged at               */
/*              step unallocation.                                  */
/*                                                                  */
/********************************************************************/
                                                                     
  CATLG_ERR  ERRORMSG(YES)  /* Issue an error message to the        */
                            /* console if the dataset cannot be     */
                            /* cataloged.                           */
             FAILJOB(YES)   /* Fail the job if the dataset          */
                            /* cannot be cataloged.                 */
                                                                     


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Jul 06, 2006 8:03 am    Post subject: Reply with quote

This is new to me because we do not have an ALLOCxx Member in our Parmlib, we use the defaults that come with the system. I try not to change default settings of the system, I try to only change things when it is really necessary. Changing the Alloc behaviour means that you might have an entirely different behaviour when you try running jobs on a different system. Sure can cause a lot of confusion and can be down right dangerous, as our original poster has discovered!
Back to top
View user's profile Send private message Visit poster's website
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Jul 06, 2006 9:26 am    Post subject: Reply with quote

nevilh wrote:
Mervyn did the second job leave an uncataloged dataset on the disk?


Yes, that's right, but it doesn't uncatalog the first one, which is the situation Tim says he's in.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Jul 06, 2006 9:28 am    Post subject: Reply with quote

nevilh wrote:
Dedpending on what is coded in the ALLOCxx member of PARMLIB depends on what course of action will taken


If that's SYS1.PARMLIB, then we don't have an ALLOCxx member.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jul 06, 2006 9:34 am    Post subject: Reply with quote

Mervyn,
Quote:

If that's SYS1.PARMLIB, then we don't have an ALLOCxx member.


May be your shop has some other naming convention. My shop also has a different one.
Code:

Sys1.xx.parmlib


See if you have any other parmlib datasets under SYS1 HLQ

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Jul 06, 2006 4:36 pm    Post subject: Reply with quote

or type TSO ISRDDN ; PARMLIB
Back to top
View user's profile Send private message Visit poster's website
twb
Beginner


Joined: 15 Jun 2006
Posts: 5
Topics: 2
Location: San Francisco

PostPosted: Thu Jul 06, 2006 5:48 pm    Post subject: Reply with quote

Quote:

or type TSO ISRDDN ; PARMLIB

Cool feature.

Unfortunately, I do not have TSS READ access to SYS1.PARMLIB (I'll probably get a message from my VP asking why he is getting all of these TSS violation messages...).
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