GeekInterview.com
Series: Subject: Topic:
Question: 138 of 148

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.
Asked by: Interview Candidate | Asked on: Oct 13th, 2004
Showing Answers 1 - 1 of 1 Answers
Saradha

Answered On : 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)

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.