Chapter 9. Selecting a collating sequence in Query for iSeries
This chapter describes how you select the collating sequence for your query. The collating sequence is
used for certain operations (such as sorting, comparing, and evaluating) that involve SBCS character data
in SBCS, DBCS-open, and DBCS-either character fields. A collating sequence assigns a weight to each
alphanumeric and special character so that Query knows how to perform operations on character fields
and constants.
The collating sequence is
only
used for SBCS character data in SBCS, DBCS-open, and DBCS-either
fields. It is
not
used for numeric, date, time, timestamp, DBCS-only, DBCS-graphic, or UCS2-graphic data.
Note:
To provide the intended effect regardless of the hexadecimal representations of the characters in
the data, coded character set identifiers (CCSIDs) are stored with collating sequences when they
are saved. For more information about how CCSIDs affect the collating sequence used see
“CCSIDs and collating sequences in Query for iSeries” on page 248.
Letting Query for iSeries select a collating sequence
If you did not type a 1 next to the
Select collating sequence
option on the Define the Query display,
Query for iSeries uses the default collating sequence. If you have never saved a collating sequence
default value, your collating sequence for new queries is the hexadecimal sequence.
Setting your default collating sequence in Query for iSeries
Generally, you will use the same collating sequence for all of your queries. For most users, the
language
collating sequence (provided on most systems) is the only one needed. If you select the Select collating
sequence option on the Define the Query display when you are creating or changing a query and save
your collating sequence option as a default in your query profile, all your queries can use this same
collating sequence option without you having to specify it in each query definition. (This does not mean
that you
must
use this same collating sequence for
all
of your query definitions. It just means that, if you
save the collating sequence option as a default, you do not have to select the Select collating sequence
option for every query that you create; you have to select it only when a query you are creating requires a
different
collating sequence.)
After you have selected the collating sequence option that you want on the Select Collating Sequence
display, you can save your option as a default value in your query user profile by pressing F23 (Save as
default) while you are still viewing the display.
If you decide to define your own collating sequence (option 3 on the Select Collating Sequence display),
you can also save your collating sequence (as a default) on the Define Collating Sequence display by
pressing F23 while you are still viewing that display. The coded character set identifier (CCSID) of the
sequence, assumed from the CCSID of your job, is saved with the profile.
Purpose of a collating sequence in Query for iSeries
A collating sequence determines what characters come before others when operations are performed on
character fields for the purpose of:
v
Selecting records
v
Joining files
v
Sorting records
v
Calculating the minimum and maximum values of a field
v
Determining when a report break occurs
© Copyright IBM Corp. 2000, 2002
111
Summary of Contents for @server iSeries
Page 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 2: ......
Page 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 12: ...x Query for iSeries Use V5R2 ...
Page 14: ...2 Query for iSeries Use V5R2 ...
Page 32: ...20 Query for iSeries Use V5R2 ...
Page 38: ...26 Query for iSeries Use V5R2 ...
Page 44: ...32 Query for iSeries Use V5R2 ...
Page 116: ...104 Query for iSeries Use V5R2 ...
Page 122: ...110 Query for iSeries Use V5R2 ...
Page 146: ...134 Query for iSeries Use V5R2 ...
Page 150: ...138 Query for iSeries Use V5R2 ...
Page 174: ...162 Query for iSeries Use V5R2 ...
Page 178: ...166 Query for iSeries Use V5R2 ...
Page 196: ...184 Query for iSeries Use V5R2 ...
Page 198: ...186 Query for iSeries Use V5R2 ...
Page 204: ...192 Query for iSeries Use V5R2 ...
Page 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Page 206: ...194 Query for iSeries Use V5R2 ...
Page 210: ...198 Query for iSeries Use V5R2 ...
Page 242: ...230 Query for iSeries Use V5R2 ...
Page 256: ...244 Query for iSeries Use V5R2 ...
Page 270: ...258 Query for iSeries Use V5R2 ...
Page 272: ...260 Query for iSeries Use V5R2 ...
Page 292: ...280 Query for iSeries Use V5R2 ...
Page 293: ......
Page 294: ... Printed in U S A SC41 5210 04 ...