Re: CCSID - RPG issues

Barbara Morris <[email protected]> Sat, 28 Feb 2026 08:47:23 -0500
Newsgroups gmane.comp.lang.as400.rpg
Organization IBM
Message-ID <[email protected]>
On 2026-02-28 4:20 a.m., Gad Miron wrote:
> I guess I was not too clear
> 
> Source AND target fields as CCSID(1208)
> 
> ...
>>
>> On 2026-02-26 7:01 a.m., Gad Miron wrote:
>>> ...
>>> UTF8 Hebrew presents no problem since it translates , in the built-in RPG
>>> conversion,
>>> to CCSID(424) without issues.
>>>
>>> The problem lies with Spanish, French, Chinese,Russian, Greek, Arabic
>> etc.
>...

In another message, you said
> The value in debug is
> 00000     0036932F F0F5F3D4 D3E6F9D6 E9E491A8
> 00010     99C3E96D D8404040 40404040 40404040
> 00020     40404040 40404040 40400014 C380206C
> 00030     61206669 6E206465 206C27C3 A974C3A9
> 00040     20202020 20202020 20202020 20202020
>
> The Hex value in the file is
> 349848894884973A3444444444444444
> F031069504503DF3F000000000000000
>
> Value of select HEX(ITEMNAME) from NMMLIMP2 is
> C380206C612066696E206465206C27C3A974C3A9

And in a different message, you said you did the CHAIN like this:
            SRCFILEID = 36932 ;
            CATLOG = '9OZUjyrCZ_Q' ;
            chain (SRCFILEID : CATLOG) NMMLIMPF ds_NMMLIMP ;

The value in debug looks like the value of the whole data structure.
- The first 0036932F is the packed value 36932 for SRCFILEID
- F9D6E9E4 91A899C3 E96DD8 is '9OZUjyrCZ_Q' for CATLOG.

The UTF-8 data for the French data "À la fin de l'été" is at the end of 
the value in debug (starting at 0014 which is the varying-length 20). 
That debug value starts with what looks like EBCDIC data,
"l?053MLW9OZUjyrCZ_Q".

Assuming you did this in the debugger, I think the CHAIN got the correct 
value.
===> eval ds_NMMLIMP:x

If you do this in the debugger, I think you would see the correct hex 
value of ITEMNAME, starting with x'0014' for the varying length prefix:
===> eval ds_NMMLIMP.ITEMNAME:x


-- 
Barbara

-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact [email protected] for any subscription related questions.