IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

what are the default DISP Parameters for an existing dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kiran_65

New User


Joined: 01 Apr 2005
Posts: 46

PostPosted: Thu Dec 14, 2006 11:57 am
Reply with quote

Hi All,

could you please let me know

"what are the default DISP Parameters for an existing dataset?"

is it shr or old?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Dec 14, 2006 11:59 am
Reply with quote

It took me about 10 seconds to find the answer in the fine manual.

O.
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Thu Dec 14, 2006 1:34 pm
Reply with quote

Hi kiran,

I guess you have confusion for DISP parameter for new and existing dataset.

As mentioned in the manual given by ofer71,
When u omit DISP parameter by dafault it will take NEW in effect.
If you omit the DISP parameter it will take DISP=NEW and your job abends shouting JCL ERROR.

Let me know if it is still not clear.

Thanks,
Rajen.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Dec 14, 2006 11:22 pm
Reply with quote

kiran,

I think the question being asked is whether DISP 'OLD' or 'SHR' should be used with existing datasets.


DISP=OLD is an exclusive use of the dataset. No-one can use the dataset while you are using it.

DISP=SHR will allow other programs to access the dataset at the same time your using it.

There are a couple of things to consider when choosing DISP=OLD or DISP=SHR . Using either has their good and bad points.

If everyone used DISP=OLD on a dataset that was in heavy use would cause the jobs to run sequentially. It could take a long time to get through the job stream. On the other hand, if you have a job that is time crucial, you may want to use DISP=OLD to remove the processing from other jobs against the dataset.

If you are updating the dataset, it?s always a good idea to use DISP=OLD.

If your job does not update the dataset, using DISP=SHR is probably right.

Dave
Back to top
View user's profile Send private message
kiran_65

New User


Joined: 01 Apr 2005
Posts: 46

PostPosted: Fri Dec 15, 2006 11:29 am
Reply with quote

Thanks for all your answers.

but, i read some where that it will take NEW,DELETE,DELETE as default for an existing dataset

Actually my question is as below:


If the "DISP=" keyword is not coded for an existing dataset, what default values will be
used for "DISP="?


Please let me know the answer.

Regards,
Kiran
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Dec 15, 2006 11:34 am
Reply with quote

Kiran...
Quote:
If the "DISP=" keyword is not coded for an existing dataset, what default values will be
used for "DISP="?

Did you try doing that ??
I dont think you can have it with out DISP Parm for an existing one.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Dec 15, 2006 5:26 pm
Reply with quote

Hi Kiran

You cant omit the DISP parameter for an existing dataset.It should be OLD/SHR/MOD.

Thanks
Arun
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Dec 15, 2006 7:33 pm
Reply with quote

Kiran,

You are right that the defaut value given if DISP is not coded is 'NEW,DELETE,DELETE'. This is true for anytime it is not coded, not only for existing datasets.


--With a dataset not currently cataloged

Code:

        2 //JS00100  EXEC PGM=IEFBR14                                         
        3 //DD1      DD  DSN=YOUR.PS.NODISP,                                 
          //             SPACE=(80,(1,1),RLSE),AVGREC=K,                       
          //             RECFM=FB,LRECL=80                                     
        4 //SYSIN DD *                                                         
SARPAGE 3                                                                     
IEF236I ALLOC. FOR YOURXXX JS00100                                           
IGD101I SMS ALLOCATED TO DDNAME (DD1     )                                     
        DSN (YOUR.PS.NODISP                             )                     
        STORCLAS (TSO) MGMTCLAS (TSOREG) DATACLAS (        )                   
        VOL SER NOS= TSO466                                                   
IEF237I JES3 ALLOCATED TO SYSIN                                               
IEF142I YOURXXX JS00100 - STEP WAS EXECUTED - COND CODE 0000                 
IGD105I YOUR.PS.NODISP                              DELETED,   DDNAME=DD1


--With a dataset currently cataloged

Code:

        2 //JS00100  EXEC PGM=IEFBR14                                         
        3 //DD1      DD  DSN=YOUR.PS.EXISTING.NODISP,                         
          //             SPACE=(80,(1,1),RLSE),AVGREC=K,                       
          //             RECFM=FB,LRECL=80                                     
        4 //SYSIN DD *                                                         
SARPAGE 3                                                                     
IEF344I YOURXXX JS00100 DD1 - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ER
IGD17101I DATA SET YOUR.PS.EXISTING.NODISP                                   
NOT DEFINED BECAUSE DUPLICATE NAME EXISTS IN CATALOG                           
RETURN CODE IS 8 REASON CODE IS 38 IGG0CLEH                                   
IEF272I YOURXXX JS00100 - STEP WAS NOT EXECUTED.
Back to top
View user's profile Send private message
vibhor_thebest
Warnings : 1

New User


Joined: 18 Dec 2006
Posts: 3
Location: noida

PostPosted: Tue Dec 19, 2006 3:43 am
Reply with quote

hello folks,
i have a doubt in continuation with the discussion going on.
can anybody please tell me wat is the meaning of the 2nd and 3rd parameters in DISP=(new/old,---,-icon_cool.gif
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Tue Dec 19, 2006 3:54 am
Reply with quote

Quote:
wat is the meaning of the 2nd and 3rd parameters in DISP=(new/old,---,-

DISP=([status][,normal-termination-disp][,abnormal-termination-disp])

Look here for a complete reference on DISP...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
Search our Forums:

Back to Top