by Robert Sample » Wed Jun 06, 2012 6:12 pm
You need to look at the full COBOL definition -- USAGE DISPLAY (the default) is ZD to SORT, COMP-3 is PD to SORT, COMP is BI to SORT, and so forth. If you're not getting the results you expect, you could be using the wrong starting position (if the file is variable), or you could be getting the right results for the data in the file, or .... Perhaps the first question to answer is why do you think the results are wrong? The computer won't lie to you, and it very seldom gets arithmetic wrong, so if the results you're getting don't agree with what you think you should be getting, there's a reason for that to be found.