Difference between KEEP and CATLOG



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Difference between KEEP and CATLOG

Postby ashwin1990 » Wed May 09, 2012 12:23 pm

DISP=(NEW,KEEP)

DISP=(NEW,CATLOG)


What is the difference between the two
ashwin1990
 
Posts: 32
Joined: Mon Feb 27, 2012 4:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between KEEP and CATLOG

 

Re: Difference between KEEP and CATLOG

Postby halfteck » Wed May 09, 2012 12:34 pm

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
halfteck
 
Posts: 42
Joined: Tue Nov 08, 2011 8:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between KEEP and CATLOG

Postby BillyBoyo » Wed May 09, 2012 1:01 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Difference between KEEP and CATLOG

Postby ashwin1990 » Wed May 09, 2012 1:12 pm

thnk u guys
ashwin1990
 
Posts: 32
Joined: Mon Feb 27, 2012 4:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between KEEP and CATLOG

Postby MrSpock » Wed May 09, 2012 5:48 pm

Actually,

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

are the same. For NEW datasets KEEP implies CATLG.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Difference between KEEP and CATLOG

Postby Robert Sample » Wed May 09, 2012 6:03 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Difference between KEEP and CATLOG

Postby sinmani » Fri Jun 01, 2012 6:45 pm

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.
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: Difference between KEEP and CATLOG

Postby Robert Sample » Fri Jun 01, 2012 6:49 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Difference between KEEP and CATLOG

Postby sinmani » Fri Jun 01, 2012 8:16 pm

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)
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: Difference between KEEP and CATLOG

Postby Robert Sample » Fri Jun 01, 2012 8:28 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post