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



Maria

we use CCISD(1208) when importing UTF-8 data


like

CRTPF FILE(QTEMP/TEMPDDEXF) RCDLEN(2048)
FILETYPE(*SRC) CCSID(1208)
MONMSG MSGID(CPF5813 CPF7302)
EXEC(CLRPFM FILE(QTEMP/TEMPDDEXF))

CHGVAR VAR(&DDEX_F_NA@) VALUE('/NFS_FILES/' *CAT
%trim(&DDEX_F_NAM))


CPYFRMSTMF FROMSTMF(&DDEX_F_NA@)
TOMBR('/QSYS.LIB/QTEMP.LIB/TEMPDDEXF.FILE/TEMPDDEXF.MBR')
MBROPT(*REPLACE) STMFCCSID(1208) DBFCCSID(1208)
ENDLINFMT(*LF) TABEXPN(*NO)


HTH
Gad




date: Fri, 4 Feb 2022 11:14:56 +0100
from: Maria Lucia Stoppa <mlstoppa@xxxxxxxxx>
subject: Importing UTF-8 multibytes file

Hi all,

Hope you are all fine!

For a new customer of mine, I need to import into IBM i running V7R3 a
UTF-8 multibyte file. So, the UTF-8 multibyte file is on IFS and has CCSID
set to 1208, whereas the DB2 flat file is set to CCSID = 655535.

The UTF-8 file is multibyte because it may contain worldwide addresses.

No matter what command do I use, be it FTP or CPYFRMIMPF, the hexadecimal
correspondence for a multibyte character (i.e. C5A0) is just one byte (in
our example is 3F); right after, if I FTP the same DB2 flat file back to
IFS, using TYPE C 1208, the resulting file is different from the original
one: while in the original file there is a multibyte (i.e. C5A0) now there
is a single byte (1A).

In your opinion and experience, is there a way to import and then export a
UTF-8 file to and from the Power system so that the resulting file is the
same as the original one?

Should I really be obliged to read the UTF-8 file from the IFS byte per
byte and make a conversion, sort of?

I already made an unsuccessful search in the mailing list and I resolve to
ask, because I am pretty sure this is a common issue.

Thank you all for any suggestions, hints or experience by hand
Lucia

--

Maria Lucia Stoppa
mlstoppa@xxxxxxxxx




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.