Thanks John, good points.

Another way to think of it is: It's never wrong to write something explicitly,
instead of relying on implicit behavior.

Yep -- Something that has bitten me in the past.

I do feel better. <g>
John B

<snip>
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of John Yeung
Sent: Wednesday, November 24, 2021 3:19 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Using qsys2.ifs_read table function in RPG pgm and getting SQL0332 Character conversion message.

On Wed, Nov 24, 2021 at 3:23 PM John Rusling via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

Executing CHGJOB CCSID(37) on program initialization works.
Not fond of it, seems kludgy but we use what works.

If it makes you feel better about it: Keep in mind that leaving the system CCSID at 65535 is inherently kludgy. That setting, which I agree is not worth the risk of changing at this point, is preventing the built-in IBM facilities from helping you the way that they could and should.

So I would view the initial CHGJOB as simply the obvious and straightforward way to compensate for the fact that your system is configured the way it is.

Another way to think of it is: It's never wrong to write something explicitly, instead of relying on implicit behavior. In a way, it's like using parens in the expression

4 + (5 * 3)

Yeah, operator precedence rules render the parens technically unnecessary, but including them isn't a bad thing. And you can think of CCSID=65535 as an environment with no operator precedence rules, so the parens are elevated from "documentation of intention" to "actually necessary to achieve intention".

John Y.
</snip>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 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.