Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us