A free-format COBOL app that sorts a pre-defined file.
- Author: Ethan Kletschke
- Version:
1.0.0 - Developed on: Windows 11
- Targeted Platforms:
- Windows 11
- Windows 10
- License: MIT
- Decompress the
.zipfolder provided in the latest GitHub release of the app. - Run the
.exeprovided in the decompressed folder. - Open
Output.csvto verify that the sorting is complete.
- The app automatically overwrites
Output.csvevery time the program runs. Input.csvdoesn't have to strictly adhere to the format specified here, but it's recommended to stick to the format for proper sorting.
Feel free to test the application with your own .csv files. Trying different
data formats helps validate the robustness of the sorting logic and may uncover
edge cases. When doing so, please adhere to the rules listed below:
The columns of the CSV have to be as follows:
- 4-digit ID, including leading zeros
- User name and surname, up to 45 characters
- 3-digit age, including leading zeros
Do not include headers!
Due to COBOL’s strict handling of fixed-length fields, the program is currently unable to reliably sort records by age. The username field is defined as exactly 45 characters, but the CSV data does not always conform to this fixed length. As a result, the second comma delimiter and the age value may be incorrectly interpreted as part of the username field.
Several attempts were made to address this issue, but they either failed to resolve the parsing problem or caused the output file to become corrupted. This limitation will remain until a more reliable method of handling variable-length CSV fields is implemented.