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 Previous  1, 2
 
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
warp5
Intermediate


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

PostPosted: Fri Jul 07, 2006 2:05 am    Post subject: Reply with quote

twb's or Mervyn's situation leave uncataloged datasets lying around. They should check their disks how many of those uncataloged datasets there are - they might get a lot of disk space freed by deleting those "ghost" datasets.
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: Fri Jul 07, 2006 6:06 am    Post subject: Reply with quote

warp5 wrote:
twb's or Mervyn's situation leave uncataloged datasets lying around. They should check their disks how many of those uncataloged datasets there are - they might get a lot of disk space freed by deleting those "ghost" datasets.


That's absolutely right. I run a job most days looking for datasets unused for four weeks, and I pick up a few of these in a week.

Our PARMLIB has three ALLOCxx members, and they all contain
Code:
CATLG_ERR  FAILJOB(YES) 
           ERRORMSG(YES)

_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Jaya
Beginner


Joined: 02 Sep 2005
Posts: 77
Topics: 10
Location: Cincinnati

PostPosted: Fri Jul 07, 2006 6:59 am    Post subject: Reply with quote

TWD,

I have seen CA11 doing it in our production system.

A utility CA11RMS is used in batch jobs to delete all already catalogued files that are to be created as output files i.e files with Disp=new

If the job contains a CA11RMS step in the beginning, one does not get a JCL error
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
twb
Beginner


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

PostPosted: Tue Jul 11, 2006 10:47 am    Post subject: DISP=(NEW for Existing Reply with quote

"Dedpending on what is coded in the ALLOCxx member of PARMLIB depends on what course of action will taken"
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.                 */

While I agree this information is correct, I doubt it is "on point." Our sysprog pointed me at the IBM doc (very nice RTFM note) and as I read it, my issue is that CATLG_ERR is not triggered. Instead of raising an error for DISP=(NEW with an existing dataset, something is quietly removing the old dataset.

I might mention, I have observed this on other systems but thought it was a SAS trick in the LIBNAME statement. I think DISP=NEW has destroyed existing datasets for several years.

I DO appreciate your thoughts--you give me credibility with the locals.
Thanks in advance for more ideas,
Tim Berryhill
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Tue Jul 11, 2006 3:04 pm    Post subject: Reply with quote

Still sounds flaky to me. Can you recreate this with a test dataset name?
Create a test dataset, post a catalog listing for it. Run your job with disp=(NEW,CATLG,DELETE). Post pertinent job log messages. Post a catalog listing for the newly created dataset.
Back to top
View user's profile Send private message
nevilh
Beginner


Joined: 11 Aug 2004
Posts: 115
Topics: 0

PostPosted: Wed Jul 12, 2006 2:14 am    Post subject: Reply with quote

If you specify DISP=(NEW,CATLG) and an existing dataset is overwritten then this is an integrity exposure and should be reported IBM
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 13, 2006 1:31 am    Post subject: Reply with quote

twb, you need to let us know more about your environment (Jes2? Scheduler? etc. ) and how you are running your job, is CA11 involved (see comments about that above) or some other tool? If you have DISP=(NEW,CATLG) then your job should abort if the dataset already exists, as a matter of fact you should get a JCL failure (in JES2).
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 13, 2006 2:21 am    Post subject: Reply with quote

twb stated in initial post that the old dataset was uncataloged. In this case it is quite valid to try and allocate a dataset with the same name on a different device.
We do this regularly . I agree with taltyman this sounds a bit flaky, I find it hard to believe such a basic function would have such an obvious error.
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 Previous  1, 2
Page 2 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