+012.30 and +012.30, which should compare as equal.
Or I've missed something.
Can you show some sample input and expected output?
As to performance, SORT IO is going to be faster than COBOL. You seem to want the output human-readable, so doing the edit and then compare is not going to be a bad way to do it. The other way involves "scaling" (multiply the one-decimal-place figure by 10) which, since you need the EDIT anyway, is going to be slower.
If you want to see the original style of EDIT for each field after the compare, just extend your BUILD so that it has 1,1,3,5,8,6 and you should get it.
It is easier for humans to read if you include spaces between the things :-)
Joined: 09 Mar 2011 Posts: 7311 Location: Inside the Matrix
If the lengths (with padding) and alignment (on decimal point) are the same, there should be no problem with any character comparison you like.
I can't tell what is not working, as you haven't described what "works" would be, nor how that data fails to work. I don't know where you got that data from, and why it is different from the amendments I suggested to your original code, not why you want to OMIT at all, not what you want to do.
So you can see, you need to say in detail what you want, with sample input, expected output and output you are getting, along with control cards and RECFM/LRECL of files.