If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read the same record thrice or it will read three records sequentially?

For example :
Input File
01
02
03

Para 900
Read infile
Display Infile rec
Read infile
Display infile rec
Read infile
Display infile rec.

What will be the output?

Answers were Sorted based on User's Feedback



If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read ..

Answer / ameins

It will read three consecutive records.

Is This Answer Correct ?    12 Yes 2 No

If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read ..

Answer / ??????

It will read the same record three times.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?

7 Answers   Bank Of America, Mind Tree,


can we redefine 77 level item is it possible

4 Answers   HCL,


how to transfer the file from pc to mainframe??

2 Answers  


What is an in line PERFORM? When would you use it? Anything else to say about it?

4 Answers  


How include time & date in the report generation in cobol programing?

2 Answers  






What is the significance of the PROGRAM-ID paragraph? If this name doesnt match with the name of the COBOL program, does it make a difference? Is the name specified in the PROGRAM-ID paragraph used as a name for the load module or any such thing?

4 Answers   IBM,


What is the difference between perform … with test after and perform … with test before?

0 Answers  


maximum of how many screens we can open in emulator

2 Answers  


Can the OCCURS clause be at the 01 level?

8 Answers   Oracle,


What is an in line perform? When would you use it? Anything else you wish to say about it.

0 Answers  


What is the usage of comp fields in cobol?

0 Answers  


What are the different data types available in COBOL?

4 Answers  


Categories