× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Could you take a look at SQL's LCASE (LOWER) and UCASE (UPPER) ...

The UPPER function returns a string in which all the characters have been
converted to uppercase characters, based on the CCSID of the argument. Only
SBCS and Unicode graphic characters are converted. The characters a-z are
converted to A-Z, and characters with diacritical marks are converted to
their uppercase equivalent, if any. Refer to the UCS-2 level 1 mapping
tables section of the Globalization topic in the i5/OS Information Center
for a description of the monocasing tables that are used for this
translation. expression An expression that specifies the string to be
converted. expression must be any built-in numeric, character, Unicode
graphic string. A numeric argument is cast to a character string before
evaluating the function. For more information on converting numeric to a
character string, see “VARCHAR” on page 395. The result of the function has
the same data type, length attribute, actual length, and CCSID as the
argument. If the argument can be null, the result can be null; if the
argument is null, the result is the null value. When UPPER is specified in
a query, the query cannot contain: v EXCEPT or INTERSECT operations, v OLAP
specifications, v recursive common table expressions, v ORDER OF, or v
scalar fullselects (scalar subselects are supported).


So I wonder if this works for you...

exec sql set :uppermyGraphic = UCASE(myGraphic);

????


Michael Schutte
Admin Professional
Bob Evans Farms, Inc.



midrange-l-bounces@xxxxxxxxxxxx wrote on 03/20/2008 12:33:51 PM:

Hello,

I have some routines I use such as ToMixed(fieldname) that convert to
upper/lower case and they need to be able to handle Graphic character
fields with CCSID 13488 (UCS-2).

The traditional %Xlate with not do it because there will be multiple
languages (English and German to start). I have also looked at the
QlgConvertCase API, but is says that "This API does not convert
double-byte character data from and double-byte character set (DBCS)
or from a mixed-byte character set". I have tried to converting with
this API and in fact is does not convert by field. This API can
base conversion on a CCSID, but it appears that it does not do this
for Graphic character field (a 10 byte character field takes up 20
Graphic bytes).

Is there another way to do Upper/Lower case conversions with Graphic
UCS-2 fields or am I possibly doing something wrong using the
API. ( When I step through it in debug, it looks okay.)

Do I have to convert the Graphic CCSID 13488 field to normal (us)
CCSID 37 character field, convert the case, then convert back to
Graphic CCSID 13488?

Thanks

Dave Murvin
DRM Enterprises, Inc.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.