Hi all.
Here is an interview question:
How can I get only the first and the last record information into the output in a cobol program?
Are there any cobol Statements available to access exactly first and last records of a file?
Please let me know the solution with piece of code if possible.
Joined: 05 May 2005 Posts: 102 Location: Navi Mumbai, India
You can read an i/p file once & write the o/p. Then keep on reading till the end of input file. When the end of file is encountered, write the record. Thus both first & last records can be written.