Hi Art,
CCSID problems are always nasty. You have to be very much aware of the way you look at the data, because every single tool does its own conversion of the binary data that's on disk. Every tool provides you with a set of 'glasses' in that sense.
You say that the IFS looks fine. How did you check that? Via a Windows tool that may do its own representation of the data based on the contents or even a BOM header? Or via a 5250 emulator with its own (job) CCSID and settings for displaying unicode data? When I run into these kind of problems, I tend to look at the hexadecimal data. When whitespace is X'20' it's either ascii or unicode, X'40' means ebcdic where we live. Characters with diacritics will show up different hexdecimally in ascii than in uniciode. The file attribute must be consistent with that contents.
The same applies the the data in the database. If you look at that with a 5250 emulator without the proper settings you will see garbage. RunSqlScripts is the way to go there. Again, if you doubt what it is, use "select hex(yourData)" to see what's under the covers.
There are many ways to screw up each single conversion step. Make the smallest number of steps possible and check intermediate results as they are on disk.
Good luck!
Kind regards,
Martijn van Breden
lead software architect
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
We are receiving JSON with many different countries. We save the JSON to
the IFS and the data looks good.
When we copy it to a table we get garbage. Can I just make that table or
some of those columns in the table a different CCSID? Is there one CCSID
for this like UTF-8?
Trying to hurry up something that wasn't planned. If there's no easy way
just to move the data around I'll be looking into setting it up from the
start.
Thanks for any ideas.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.