Abstract
If there is one thing you should have learned from the chapters on sequential files, it is that your processing options are very limited if a sequential file is not ordered. Solutions based on control breaks, and the file-update problem, are impossible unless the file is ordered on some key field. In previous chapters, I mentioned the very useful program design technique called beneficial wishful thinking in which, when you are confronted by a difficult programming problem, you imagine a set of circumstances under which the difficulty would be greatly reduced and then try to bring about that set of circumstances. In the context of sequential files, you will often find yourself confronted with problems that would be much easier to solve if the file was ordered. A solution based on the beneficial wishful thinking approach first puts the file into the required order.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2014 Michael Coughlan
About this chapter
Cite this chapter
Coughlan, M. (2014). Sorting and Merging. In: Beginning COBOL for Programmers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6254-1_14
Download citation
DOI: https://doi.org/10.1007/978-1-4302-6254-1_14
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-6253-4
Online ISBN: 978-1-4302-6254-1
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books