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
How to sort decimal values?
-
- Posts: 81
- Joined: Sat Jun 09, 2007 4:24 am
- Skillset: Some?
- Referer: mcmillan
- Location: Tucson AZ
Re: How to sort decimal values?
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/
- 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?
Here's a DFSORT job that will do what you asked for:
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
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
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
-
-
How to sum a decimal value using sort
by hkaur7087 » Thu Aug 05, 2021 2:19 pm » in DFSORT/ICETOOL/ICEGENER - 4
- 2347
-
by sergeyken
View the latest post
Thu Aug 05, 2021 7:48 pm
-
-
- 7
- 1996
-
by sergeyken
View the latest post
Wed Dec 23, 2020 6:39 pm
-
- 2
- 4124
-
by sergeyken
View the latest post
Tue Aug 02, 2022 4:07 am
-
-
COBOL SORT - How to sort entire file first & sort by Key
by k_ekam » Thu Dec 01, 2022 12:58 pm » in IBM Cobol - 3
- 1545
-
by Robert Sample
View the latest post
Wed Dec 07, 2022 7:32 am
-
-
-
Array processing and Table handling with packed decimal
by rogerstrycova » Tue Oct 26, 2021 3:55 pm » in IBM Cobol - 2
- 1702
-
by Robert Sample
View the latest post
Wed Oct 27, 2021 1:12 am
-