IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

copy file data in reverse order in another file


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Thu Apr 29, 2010 11:57 pm
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
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

Superior Member


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

PostPosted: Fri Apr 30, 2010 5:50 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 3
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top