Considerations for changing Query for iSeries queries
To make changes to your query, choose the correct options on the Define the Query display. Refer to the
appropriate chapters or appendixes in this guide for information and considerations on how to enter the
definitions that you want. Each query is saved with a CCSID. You cannot change a query if your job
CCSID is not compatible with the query CCSID (one of the CCSIDs is 65535 or they are the same).
Note:
See “Changing a Query for iSeries query” on page 250 for more information on how CCSIDs affect
processing a query.
Changing your collating sequence on Query for iSeries queries
A change in your collating sequence can affect join tests, record selection tests, and sorts involving SBCS
data in SBCS, DBCS-open, and DBCS-either character fields. The extent of the effect depends on the
test.
Changing the setting of the Use Collating Sequence processing option can change your results. If you set
the processing option to Yes, the EQ, NE, LIST, NLIST, LIKE, and NLIKE tests compare character collating
values. These tests compare the hexadecimal character codes if you set the option to No.
Note:
The Use Collating Sequence option does not affect your output when the collating sequence is set
to *HEX.
LT, LE, GT, GE, and RANGE tests compare collating sequence values regardless of how you set the
processing option. A change to your collating sequence can change the records that these tests select. A
change to the collating sequence can also affect your query’s minimum and maximum summary values,
the location of report breaks, and the order of selected records (if you use a field containing SBCS
character data for sorting).
For example, you have 2 collating sequences. In one, the character
E
has a higher sequence number than
e
, and in the other, the two characters have equal (shared) sequence numbers. In one record, field
NAME1
has a value of
LEE
, and field
NAME2
has a value of
Lee
. Table 7 and Table 8 show the results of comparing
the strings (NAME1 and NAME2) using various tests for a collating sequence with:
v
Unique weights used in all tests
v
Shared weights used in all tests
v
Unique weights not used in EQ and NE tests
v
Shared weights not used in EQ and NE tests
Table 7 applies when all data is SBCS. Table 8 applies when some or all of the data is DBCS.
Table 7. Effect of Collating Sequence and Processing Option on Selection. Both NAME1 and NAME2 are SBCS data.
Yes means the record under test is selected. No means it is not selected.
Test
ColSeq=YES Unique
Weights
ColSeq=YES Shared
Weights
ColSeq=NO Unique
Weights
ColSeq=NO Shared
Weights
NAME1 EQ NAME2
No
Yes
No
No
NAME1 GE NAME2
Yes
Yes
Yes
Yes
NAME1 GT NAME2
Yes
No
Yes
No
NAME1 NE NAME2
Yes
No
Yes
Yes
NAME1 LE NAME2
No
Yes
No
Yes
NAME1 LT NAME2
No
No
No
No
176
Query for iSeries Use V5R2
Содержание ISERIES SC41-5210-04
Страница 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 2: ......
Страница 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 12: ...x Query for iSeries Use V5R2 ...
Страница 14: ...2 Query for iSeries Use V5R2 ...
Страница 18: ...Figure 3 Major Tasks on the Query Menu and the Work with Queries Display 6 Query for iSeries Use V5R2 ...
Страница 32: ...20 Query for iSeries Use V5R2 ...
Страница 38: ...26 Query for iSeries Use V5R2 ...
Страница 44: ...32 Query for iSeries Use V5R2 ...
Страница 116: ...104 Query for iSeries Use V5R2 ...
Страница 122: ...110 Query for iSeries Use V5R2 ...
Страница 146: ...134 Query for iSeries Use V5R2 ...
Страница 150: ...138 Query for iSeries Use V5R2 ...
Страница 174: ...162 Query for iSeries Use V5R2 ...
Страница 178: ...166 Query for iSeries Use V5R2 ...
Страница 196: ...184 Query for iSeries Use V5R2 ...
Страница 198: ...186 Query for iSeries Use V5R2 ...
Страница 204: ...192 Query for iSeries Use V5R2 ...
Страница 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Страница 206: ...194 Query for iSeries Use V5R2 ...
Страница 210: ...198 Query for iSeries Use V5R2 ...
Страница 242: ...230 Query for iSeries Use V5R2 ...
Страница 256: ...244 Query for iSeries Use V5R2 ...
Страница 270: ...258 Query for iSeries Use V5R2 ...
Страница 272: ...260 Query for iSeries Use V5R2 ...
Страница 292: ...280 Query for iSeries Use V5R2 ...
Страница 293: ......
Страница 294: ... Printed in U S A SC41 5210 04 ...