Page 1 of 2

Difference between KEEP and CATLOG

PostPosted: Wed May 09, 2012 12:23 pm
by ashwin1990
DISP=(NEW,KEEP)

DISP=(NEW,CATLOG)


What is the difference between the two

Re: Difference between KEEP and CATLOG

PostPosted: Wed May 09, 2012 12:34 pm
by halfteck
The first 1 works, the second gives you a JOB NOT RUN JCL ERROR.
I suspect your site will frown upon you for coding DISP=(NEW,KEEP) means YOU have to know on which volume the dataset resides to use it after creation, and as we now never code specific volume serial numbers, that will be a challenge.
So code DISP=(NEW,CATLG) not KEEP

Re: Difference between KEEP and CATLOG

PostPosted: Wed May 09, 2012 1:01 pm
by BillyBoyo
Also, what you are coding comes to NEW,KEEP,KEEP, which KEEPs the dataset even when the step abends (an actual abend, not a non-zero return code).

A "normal" coding would be NEW,CATLG,DELETE which catalogs the dataset on normal completion (including non-zero RC) and deletes the dataset on abend.

Re: Difference between KEEP and CATLOG

PostPosted: Wed May 09, 2012 1:12 pm
by ashwin1990
thnk u guys

Re: Difference between KEEP and CATLOG

PostPosted: Wed May 09, 2012 5:48 pm
by MrSpock
Actually,

DISP=(NEW,KEEP)
DISP=(NEW,CATLG)

are the same. For NEW datasets KEEP implies CATLG.

Re: Difference between KEEP and CATLOG

PostPosted: Wed May 09, 2012 6:03 pm
by Robert Sample
A slight clarification:
For NEW datasets KEEP implies CATLG.
is true for SMS-managed data sets. If the data set is not being managed by SMS, KEEP will retain the data set on the volume but not make a catalog entry.

Re: Difference between KEEP and CATLOG

PostPosted: Fri Jun 01, 2012 6:45 pm
by sinmani
MrSpock wrote:Actually,

DISP=(NEW,KEEP)
DISP=(NEW,CATLG)

are the same. For NEW datasets KEEP implies CATLG.


I think ( NEW,KEEP ) will act like (NEW , PASS) and we can use the file in the subsequent steps if we want.

However later on if someone wants to look for the file in say option 3.4 he will not be able to find it.

Re: Difference between KEEP and CATLOG

PostPosted: Fri Jun 01, 2012 6:49 pm
by Robert Sample
However later on if someone wants to look for the file in say option 3.4 he will not be able to find it.
Wrong. The data set is easy to find -- just erase the Dsname Level line and enter the volume serial on the next line which says Volume serial. The data set will show up quite well.

Re: Difference between KEEP and CATLOG

PostPosted: Fri Jun 01, 2012 8:16 pm
by sinmani
Well I don't think people remember the volume serial number so often.

Someone wanting to look for the file most probably will have the file name.

Though what u said Robert is right but the idea to remember vol ser no sounds horrible :) ( Just a thought)

Re: Difference between KEEP and CATLOG

PostPosted: Fri Jun 01, 2012 8:28 pm
by Robert Sample
It all depends upon your perspective. There are times when system programmers have to know the volume serial, because they create data sets on system packs that are not catalogued until after being created. Most application programmers can go their entire career now without ever having to know a volume serial, but system programmers don't have that luxury.