How to sort decimal values?

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER
Reuel
Posts: 1
Joined: Thu Aug 09, 2007 8:25 am
Skillset: RMFPP
Referer: Expert Forum

How to sort decimal values?

Postby Reuel » Thu Aug 09, 2007 8:37 am

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

William Thompson
Posts: 81
Joined: Sat Jun 09, 2007 4:24 am
Skillset: Some?
Referer: mcmillan
Location: Tucson AZ

Re: How to sort decimal values?

Postby William Thompson » Thu Aug 09, 2007 10:40 pm

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/

User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Skillset: DFSORT, ICETOOL, ICEGENER
Referer: Search
Contact:

Re: How to sort decimal values?

Postby Frank Yaeger » Sat Aug 11, 2007 5:11 am

Here's a DFSORT job that will do what you asked for:

Code: Select all

//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
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort


  • Similar Topics
    Replies
    Views
    Last post