Just my two cents, but have you tried storing your source in the IFS (ASCII - 819)? We do that for all our source. Eases working with Eclipse and Subversion.

Sent via BlackBerry by AT&T

-----Original Message-----
From: Erik Olsson <erik.eo.olsson@xxxxxxxxx>
Date: Sun, 4 Oct 2009 17:46:31
To: C programming iSeries / AS400<c400-l@xxxxxxxxxxxx>
Subject: Re: [C400-L] 6.1 issue

Do you mean chapter 31 of the Programmer's guide? It says that "the compiler
recognizes source code that is written in most single-byte EBCDIC CCSID" and
that files are converted to 037 before compiling. Or that's how I interpret
it at least.

Is all your source in 273 or only the main source file? Is your job
also in 273 or something else?

My job ccsid is 037. All (albeit few) source files are in 273 currently.

There isn't a trigraph for !=. You'd have to use the not_eq
alternative token.

Yes, I saw that, so I hadn't really anticipated that "!=" could be a
problem. So many thanks for the thorough analysis - sounds very plausible to
me. I'll try to report it.

Best regards,

2009/10/4 Simon Coulter <shc@xxxxxxxxxxxxxxxxx>

On 04/10/2009, at 10:25 PM, Erik Olsson wrote:

Yes, it doesn't feel very safe that a character that the compiler
like isn't caught as an error at compile time. And that it in this
meant that the statement always was evaluated to true must mean that
with my CCSID (source file has 273 and target CCSID on the CRTCPPMOD
*SOURCE) is interpreted as "==", which is kind of the last thing you
Confusing. Seems like I have more homework to do on the CCSIDs of

When I looked at this yesterday I could have sworn the the ILE C
reference materials stated that any source CCSID used must be
compatible with CCSID 37 but, of course, I can't find that now.

Anyway, I compared the 273 to 37 conversion just out of curiosity and
both show ! as x'5a' although they are at different offsets within the
table. For 273 the offset is at x'5a', for 37 the offset is at x'4f'.
What's interesting about that is that x'4f' in 273 is the vertical bar
so perhaps your if-test is being interpreted as |= (i.e., bitwise-or
assignment). If so then any non-zero result form the bitwise-or
operation will be treated as true hence the body of the test is entered.

Don't you just love C's support for assignment within an if-test? Yet
another example of why it's such a poor language for so many tasks!

Is all your source in 273 or only the main source file? Is your job
also in 273 or something else?

I don't want to use trigraphs again. Yuck.

There isn't a trigraph for !=. You'd have to use the not_eq
alternative token.

You may have better luck with source in CCSID 37 and specify
TGTCCSID(273) on the compile command.

However, the ILE C reference manual suggests that at 610 they've added
support for more input CCSIDs and since 273 isn't one of the
problematic CCSIDs (290, 930, and 5026) I'd report the problem and see
what they say.

Simon Coulter.
FlyByNight Software OS/400, i5/OS Technical Specialists

Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
ASCII Ribbon campaign against HTML E-Mail / \

This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.

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