IBM SC41-5210-04 Server User Manual


 
Table 12. How CCSIDs Affect Run-Time Record Selection
Job CCSID Query CCSID Constants Treated as CCSID
37 37 37
65535 37 37
37 65535 37
65535 No tag 65535
37 No tag 37
37 500 Not allowed
CCSIDs and Query for iSeries query definition items
Query for iSeries warns you about some CCSID compatibility problems as you are working on a query
definition but some problems are not diagnosed until the query is run. To understand the results, you need
to know:
v How CCSIDs are assigned to constants and expressions
v The order in which conversions and comparisons are performed
v Whether the check looks at the data or just the CCSID marking
The following topics present some of this information by query definition item. Refer to CCSID
compatibility considerations in Query for iSerieson page 254 for information on specific pairs of marked
items.
CCSID and file selections in Query for iSeries
If a format that you specify when you are working on a query definition has any text that cannot be
converted to the CCSID of your job, you see an error message telling you to select a different file or
format.
If you have done an override to a database file, query uses the new file information, including the CCSID
markings. This could cause the same kind of errors that would ordinarily be diagnosed at definition time.
CCSID and join tests in Query for iSeries
If fields in a join test have different CCSIDs, a conversion to a compatible CCSID is done. If the two fields
do not have the same CCSID and cannot be converted, or if any collating sequence to be used cannot be
converted, you see an error message.
CCSID and result field expressions in Query for iSeries
Query for iSeries users in countries other than the United States should type field names and keywords
(for example, SUBSTR) in uppercase to ensure correct results. The CCSID of the result field depends on
the fields used to define the result. At create time, the system assumes constants are marked with the job
CCSID. At change time, the system assumes constants are in the job CCSID of the changing user if the
create time CCSID is 65535. If one field is specified, the result field has the CCSID of that field. If values
with different CCSIDs are specified, the result field has a CCSID based on the order of the values and
type of the expression.
Field and constant values that are not in the CCSID of the expression must be converted. If fields or
constants used in expressions have CCSIDs that are not compatible, a message is sent to the user.
For a concatenation symbol you can type:
v Two vertical bars.
v The hexadecimal value of two vertical bars in CCSID 37 (4F4FX).
v Two of the characters that have hexadecimal representation 4F in the CCSID of the query.
252 Query for iSeries Use V5R2