View previous topic :: View next topic
|
Author |
Message |
crreddy
New User
Joined: 09 May 2005 Posts: 4
|
|
|
|
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.
Thanks,
crreddy. |
|
Back to top |
|
|
ankyhunk
Moderator
Joined: 05 May 2005 Posts: 98 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. |
|
Back to top |
|
|
|