View previous topic :: View next topic
|
Author |
Message |
arjunbathula
New User
Joined: 17 Jul 2007 Posts: 3 Location: hyderabad
|
|
|
|
Hi,
In my interview, the interviewer ask how to copy data in one file having records 1,2,3,4......50 to another file in reverse order i.e, 50,49,48,47,46.....1. If any one knows tell me the answer. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Copy, no, but a sort with sequence numbers inserted to each record and sorted into descending order should work fine. |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
arjunbathula - You must have asked the interviewer, what are my choices to pick from - COBOL, SORT, File-Aid... because if there are only 50-records, reading the file in a COBOL array and writing from the last record til first must have not been be a problem.
For regular business situations, where you need to deal with millions of records, this question, to start with, has no practical grounds! And COBOL for usre should not be your choice. |
|
Back to top |
|
|
|