What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

DISP=OLD denotes exclusive control of the dataset; DISP=SHR means there is no exclusivity.

Showing Answers 1 - 1 of 1 Answers

Saradha

  • Oct 11th, 2005
 

DISP=OLD --> Exclusive HOLD. Read from beginning of dataset. But if u write, then it will overwrite on existing data. i.e old data is lost.

DISP=MOD --> Exclusive HOLD. You can write to the end of the file without loosing your old data (i.e append the data to the existing file).

DISP=SHR --> multiple user can share the data. Its read-only file.

With Regards to COBOL:

DISP=SHR and OPEN EXTEND in-file => will append the file at the end. Used mainly for line-sequntial file (i.e notepad with extension .TXT or .DAT)

DISP=MOD and OPEN I-O =>  will also append the file at the end. (not used for line sequantial file)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions