It depends, if all you are looking to do is sort "0-9" before "A-Z",
using either Lizette's way or Frank's way will work fine but there may
be unexpected consequences.  If your data has lower-case or national
characters it makes a big difference.  In EBCDIC "a" sorts before "A",
which is the sequence that you will get using AQ with the given ALTSEQ
statement.  If you sort using AC, "A" will sort before "a". 

If you want to complicate the situation even more, using the given
ALTSEQ and AQ, the sequence will be "a", "1", "A".  Using AC the
sequence will be "1", "A", "a".  

By altering the ALTSEQ statement it is easy to get 0-9 to sort before
"a-z" in a similar way to ASCII but you are still left with the
difference in how upper and lower case letters are sequenced.  

John Reda
Syncsort, Inc.   


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Frank Yaeger
Sent: Friday, April 03, 2009 12:54 PM
To: [email protected]
Subject: Re: Can I do a Hex Sort in ISPF Edit?

Lizette Koehler wrote on 04/03/2009 09:20:56 AM:
> I have not found a HEX sort for ISPF yet which I would love to see.
> However in batch I use
>
>   ALTSEQ CODE=(F0B0,F1B1,F2B2,F3B3,F4B4,F5B5,F6B6,F7B7,F8B8,F9B9)
>   SORT FIELDS=(52,8,AQ,A),SIZE=E2000

Liz,

FYI, you don't need to use ALTSEQ and AQ to do this.  You can just
use DFSORT's AC (ASCII) format without ALTSEQ:

   SORT FIELDS=(52,8,AC,A)

With AC format, the numbers sort before the letters.

Frank Yaeger - DFSORT Development Team (IBM) - [email protected]
Specialties: FINDREP, WHEN=GROUP, DATASORT, ICETOOL, Symbols, Migration

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to