Hai friends
why we need to read a file before re-write a record?

Answer Posted / ravi patnam

1) When you want to modify a record, first you have to get
that into memory from physical file by the way of reading.

2)Then do modifications.

3)After the modification over again put it bak to the
physical file by using 'Rewrite' command.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

1950


What are the cobol coding sheets?

666


How do define dynamic array in cobol.

673


what happens if parmparameter passes zero bytes to the program

1667


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

934






What are the various section in data division and briefly explain them.

700


What is the LINKAGE SECTION used in COBOL?

895


What is the default value(s) for an initialize and what keyword allows for an override of the default?

697


For rewrite, why is it mandatory that file needs to be opened?

623


What is the difference between Call and a Link?

702


How do you reference the fixed block file formats from cobol programs

709


In COBOL programming, what is PERFORM? What is VARYING?

672


What are 77 levels used for?

661


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

635