Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - Why we need to read a file before re-write a record?




516
views
asked mar September 10, 2014 12:10 PM  

Why we need to read a file before re-write a record?


           

1 Answers



 
answered By Mswami   0  

When a record needs to be updated(rewrite) it has to be "read" first so that, an lock will be held on the record that needs to be updated & record mismatch/the anomalies could be avoided.

So, just read the record that need to be rewritten & then issue the rewrite statement.

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert