I am new to this forum. I have one requirement to sum the Hexadecimal value and dispaly in Trailer record. I am trying different options in syncsort, but result is not expected one. can you plese help on this.
Input data:: we are getting this file from cobol program in cobol this varibale is declared as a comp-2.
Joined: 09 Mar 2011 Posts: 7311 Location: Inside the Matrix
If your data contains a floating-point value (in COBOL, COMP-1 or COMP-2, or even longer than those) then FL is only going to get you the integer part of that.
If you need it in SORT, you'll have to arrange an EXIT program to do a conversion which would have a defined number of decimal places. Or just do it in a general-purpose programming language if you don't need other parts of SORT's capabilities for the task.
The code you show is behaving exactly as it should. It cannot behave as you want. If you want to moan about it, take it up with SyncSORT, not here.