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



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

Answer / Mohd Hilal

In COBOL, opening a file is mandatory because it establishes a connection between the program and the file, allowing the program to read from or write to the file.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

what happens if we wont give timestamp in precompilation process ?

4 Answers   Covansys,


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

1 Answers  


I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?

1 Answers  


how do you define single dimensional array and multidimensional array in your cobol?

1 Answers  


What are the steps you go through while creating a COBOL program executable?

3 Answers  


Did anybody attend the walkin of TCS on 31st July in Gurgaon for any technology,If u have completed 3 round i.e till the HR round,have u received the Offer letter yet? Please let me know.Thanks.

1 Answers  


Can anyone please give the example of Inline Perform.

6 Answers   TCS,


how do you reference the ksds vsam file formats from cobol programs

1 Answers  


what if any ,is the syntex error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.

5 Answers   TCS,


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

5 Answers   Accenture,


How to covert given string into ASCII value in COBOL/MF COBOL

3 Answers   CTS, IBM, iFlex,


what are the error codes in cobol, db2, cics, vsam , and jcl

2 Answers   TetraSoft,


Categories