× 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.



Thanks for the reply Jon. My understanding is that the file/table contains
a list of Chinese Customer Name and Address information and I am trying to
verify from the customer as to what it looks like in their applications to
see if it is something that should convert. It appears it may not convert
as even a simple SQL like the following returns nulls or invalid characters.

select CUSTOMERNAME, cast(CUSTOMERNAME as CHAR(80) CCSID 37) from
CUSTOMERS;

Google did provide the article you linked to and the data does have
matching shift in and shift out pairs.

Again, I appreciate your input. Thanks

On Mon, Jun 6, 2016 at 10:14 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

First of all you need to understand that there is usually a _reason_ for
DBCS data - it is because it won’t map to a conventional 8 bit character.
The Shift-in x’0E’ and shift-out characters x’0F’ represent the beginning
and end of a double-byte sequence. In your case that appears to be the
whole field.

It has been a very long time since I did any DBCS work but this article
seems to have it about right
http://www.itjungle.com/fhg/fhg081909-story01.html.

It is possible that while your data is in two byte form, only characters
that can be represented in SBCS form are present. If that is the case then
conversion should not be an issue. If that is not the case then you have to
decide what to do about the characters that cannot be mapped.

I’m not sure though why you think you need to do this as DBCS data can be
handled by SQL and the clean up routine that Michael showed in the article
above would work to clean up any unmatched SI/SO pairs - which does happen.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jun 6, 2016, at 3:07 PM, IBMiSoftwareEngineer <
ibmisoftwareengineer@xxxxxxxxx> wrote:

I have been provided a file/table from a customer that appears to contain
DBCS data in a few of the fields/columns. The data in the columns begins
with x'0E' and end with x'0F' and the CCSID is 937.

Can I convert the data to CCSID 37 and to our normal SBCS data that we
can
use in an RPG program and also SQL SELECT statements? Any examples or
links to helpful info would be greatly appreciated. My googling has not
resulted in a working solution.

I have attempted to use the QtqIconvOpen, iconv, and iconv_close API's to
convert from CCSID 937 to 37 but the data is still not readable. My
thought
is I also need to convert it from DBCS to SBCS.

Thanks in advance for any assistance or direction.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.