Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

copy file data in reverse order in another file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
arjunbathula

New User


Joined: 17 Jul 2007
Posts: 3
Location: hyderabad

PostPosted: Thu Apr 29, 2010 11:54 pm    Post subject: copy file data in reverse order in another file
Reply with quote

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
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 29, 2010 11:57 pm    Post subject:
Reply with quote

Copy, no, but a sort with sequence numbers inserted to each record and sorted into descending order should work fine.
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Fri Apr 30, 2010 10:45 am    Post subject: Reply to: copy file data in reverse order in another file
Reply with quote

Please check Anuj's post in this link. It might help.

http://www.ibmmainframes.com/viewtopic.php?t=48304&highlight=copyback

Also this has been answered before a couple of times.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Apr 30, 2010 5:50 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us