Page 1 of 1

How to sort decimal values?

PostPosted: Thu Aug 09, 2007 8:37 am
by Reuel
Hi!

Can anyone help me with DFSORT.
I am trying to sort the number below but I am getting an incorrect output.

Incorrect output:
10.2
2.2
1.4
118

Expected Output:
118
10.2
2.2
1.4

Re: How to sort decimal values?

PostPosted: Thu Aug 09, 2007 10:40 pm
by William Thompson
Frank Yaeger wrote:DFSORT's new UFF (unsigned free form) format can extract up to 31 digits from a field of up to 44 characters. DFSORT's new SFF (signed free form) format can extract a sign and up to 31 digits from a field of up to 44 characters. These new formats can be used in DFSORT's SORT, MERGE, INCLUDE, OMIT, INREC, OUTREC and OUTFIL statements, and in the ON and BREAK parameters for all of DFSORT's ICETOOL operators.

For complete information on all of the new DFSORT and ICETOOL functions available with these DFSORT PTFs, see:

http://www.ibm.com/servers/storage/supp ... /mvs/pdug/

Re: How to sort decimal values?

PostPosted: Sat Aug 11, 2007 5:11 am
by Frank Yaeger
Here's a DFSORT job that will do what you asked for:

//S1    EXEC  PGM=ICEMAN             
//SYSOUT    DD  SYSOUT=*             
//SORTIN DD *                       
10.2                                 
  2.2                               
  1.4                               
  118                               
//SORTOUT DD SYSOUT=*               
//SYSIN    DD    *                   
  SORT FIELDS=(1,8,UFF,D)           
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/servers/storage/supp ... tmpub.html