Re: CCSID - RPG issues
Gad Miron <[email protected]> Wed, 4 Mar 2026 08:36:02 +0200
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <CAFj_=c3idQa7YvqWWuUNS9D6T45KeUJ0hn2kXgX4jnSEAzTJ9g@mail.gmail.com> |
Hello Barbara a simple ds_NMWRKR.ITEMNAME8 = ds_NMMLIMP.ITEMNAME gets me the same (erroneous)) result. trying /charcount NATURAL ds_NMWRKR.ITEMNAME8 = ds_NMMLIMP.ITEMNAME /charcount STDCHARSIZE Plus the required H spec H CHARCOUNTTYPES(*UTF8 : *JOBRUN) finally assigned the correct value to ds_NMWRKR.ITEMNAME8 *À la fin de l'été * 00000 C380206C 61206669 6E206465 206C27C3 - C .%/.öù>.ôõ.%.C 00010 A974C3A9 20202020 20202020 20202020 - z Cz............ 00020 20202020 20202020 20202020 20202020 - ................ 00030 20202020 20202020 20202020 20202020 - ................ 00040 20202020 20202020 20202020 20202020 - ................ 00050 20202020 20202020 20202020 20202020 - ................ 00060 20202020 20202020 20202020 20202020 - ................ 00070 20202020 20202020 20202020 20202020 - ................ SO, SUCCESS !!! (-: Many Thanks for seeing it through. Gad > I can't guess why it is not getting an exception for the %SUBST with a > length of 128. The first 2 bytes of ds_NMWRKR.ITEMNAME8 are x'0014' > which means the current length is 20. Any length for %SUBST greater than > 20 should fail with RNX0100. > > What happens if you just assign ds_NMMLIMP.ITEMNAME ds_NMWRKR.ITEMNAME8 > without %SUBST? > > If you don't have CHARCOUNT(*NATURAL) in your control options, you need > to use the /CHARCOUNT directive to get the data truncated correctly if > the right-hand-size of the assignment is longer than the left-hand-size. > > /charcount NATURAL > ds_NMWRKR.ITEMNAME8 = ds_NMMLIMP.ITEMNAME; > /charcount STDCHARSIZE > > -- > 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.