Cobol Interview Question
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Interview Q & A

#1: Cobol Interview Question Author: arvibala PostPosted: Tue Aug 10, 2010 4:31 am
    —
Why is Cobol designed to READ FROM A FILE and WRITE TO A RECORD?

#2:  Author: dbzTHEdinosauerLocation: germany PostPosted: Tue Aug 10, 2010 5:44 am
    —
because multiple record definitions are allowed for an FD.
since they all start at the same address, there is no need to declare into which record to read a file.

but, since multiple records can be defined for a file, in order to have the proper length record written, we need to declare from which record a file is written.

#3:  Author: vkphani PostPosted: Tue Aug 10, 2010 6:59 am
    —
There is something called as record id. A file can contain multiple records and while writing to an output file, this record id is taken into consideration. If not, records are overwritten.

#4:  Author: dbzTHEdinosauerLocation: germany PostPosted: Tue Aug 10, 2010 7:28 am
    —
vkphani wrote:
There is something called as record id. A file can contain multiple records and while writing to an output file, this record id is taken into consideration. If not, records are overwritten.


puhleeesse elaborate.

#5:  Author: arvibala PostPosted: Wed Aug 11, 2010 8:57 am
    —
Thanks Brenholtz,

I got many answers and urs makes lot of sense. I tried to search and none of the books or Online tutorials have this explaination. But I guess this is a good question.
Thanks Again

#6:  Author: dbzTHEdinosauerLocation: germany PostPosted: Wed Aug 11, 2010 9:46 am
    —
actually, the answer is: because that is the syntax.

I have never found the explanation I provided,
but it makes sense to me.

#7:  Author: papadi PostPosted: Wed Aug 11, 2010 6:02 pm
    —
Another thought:
We read a file because we don't know before the read if there even is a record to be read.



MVSFORUMS.com -> Interview Q & A


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group