Selecting a Query for iSeries collating sequence
To select a collating sequence, you have to understand how the data exists in your files. For example, if
both uppercase and lowercase SBCS characters exist in your character fields, you have to decide if you
want uppercase and lowercase characters treated the same. Once you make this analysis, you can select
the collating sequence that produces the desired results, or you can define a collating sequence of your
own.
Select Collating Sequence
The selected collating sequence will be used for character fields when
sorting, selecting records, joining files, finding minimum and maximum
values, and determining when a control break has occurred.
Type choices, press Enter.
Collating sequence
option........ 1 1=Hexadecimal
2=Query for iSeries English
3=Define the sequence
4=Translation table
5=System sort sequence
For choice 4=Use translation table:
Table ........ __________ Name, F4 for list
Library ...... __________ Name, *LIBL, F4 for list
F3=Exit F4=Prompt F5=Report F10=Process/previous
F12=Cancel F13=Layout F17=Job sequence F24=More keys
Using the hexadecimal collating sequence in Query for iSeries
The standard collating sequence is the hexadecimal collating sequence. For any given CCSID, all of the
character-set characters (alphanumeric and special) are assigned a hexadecimal value. The characters
and their related hexadecimal value are called a code page. A code page is shown as a 16 by 16 matrix
as shown in Table 3.
Table 3. Example of How a Code Table Works. The value in the left column is the first half of the hexadecimal value.
The value at the top of each column is the second half of the hexadecimal value. The lowercase a in this table is at
’81’X and the uppercase A is at ’C1’X. This is an example, a real table contains all the alphanumeric and special
characters.
0123456789ABCDEF
0
1
2
3
4
5
6
7
8 a
9
A
B
Chapter 9. Selecting a collating sequence in Query for iSeries 113