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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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