VARGRAPHIC Query for iSeries function
The VARGRAPHIC scalar function provides a way to convert:
v
character data (SBCS and Mixed) to DBCS graphic.
v
character data (SBCS and Mixed) to UCS2 graphic.
v
UCS2 graphic to UCS2 graphic.
v
DBCS graphic to UCS2 graphic.
The VARGRAPHIC function returns a graphic string representation of a string expression.
The first argument must be a string expression and must not be bit data.
The second argument, if specified as
length
, is the length attribute of the result and must be an integer
constant between 1 and 16370 if the first argument is not nullable or between 1 and 16369 if the first
argument is nullable.
If the second argument is not specified or DEFAULT is specified, the length attribute of the result is the
same as the length attribute of the first argument.
In the following rules, S denotes one of the following:
v
If the string expression is a host variable containing data in a foreign encoding scheme, S is the result
of the expression after converting the data to a CCSID in a native encoding scheme.
v
If the string expression is data in a native encoding scheme, S is that string expression.
If the third argument is specified, the CCSID of the result is the third argument. It must be a DBCS or
UCS2 CCSID. The CCSID cannot be 65535.
If the third argument is not specified, the CCSID of the result is determined by a mixed CCSID, let M
denote that mixed CCSID. M is determined as follows:
v
If the CCSID of S is a mixed CCSID, M is that CCSID.
v
If the CCSID of S is an SBCS CCSID:
– If the CCSID of S has an associated mixed CCSID, M is that CCSID.
– Otherwise the operation is not allowed.
M
Result CCSID
Description
DBCS Substitution
Character
930
300
Japanese EBCDIC
X’FEFE’
933
834
Korean EBCDIC
X’FEFE’
935
837
S-Chinese EBCDIC
X’FEFE’
937
835
T-Chinese EBCDIC
X’FEFE’
939
300
Japanese EBCDIC
X’FEFE’
5026
4396
Japanese EBCDIC
X’FEFE’
5035
4396
Japanese EBCDIC
X’FEFE’
The result of the function is a varying-length graphic string. If the expression can be null, the result can be
null. If the expression is null, the result is the null value. If the expression is an empty string or the
EBCDIC string X’0E0F’, the result is an empty string.
QQ VARGRAPHIC (
expression
,
length
DEFAULT
,ccsid
)
QR
Chapter 5. Defining result fields in Query for iSeries
65
Содержание @server iSeries
Страница 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 ...