File status must be checked both while opening and reading
the file or only while reading the file?

Answer Posted / nagaraj ramamoorthy

As a good programming practice, it will be good if you
handle/include all possible error combination in the
program. so the file status must be checked in both cases.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

661


What is a scope terminator give example?

646


Explain how you can characterize tables in cobol?

633


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2320


How many bytes S(8) comp field occupy and its maximum value?

1620






can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1892


Write a cobol program making use of the redefine clause.

718


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 ......

10529


Define cobol?

852


How arrays can be defined in COBOL?

654


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

810


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2089


how to move the records from file to array table. give with code example

2207


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8592


What is the use of intialize verb?

735