× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Sorry that I'm getting in on this thread late. I've been swamped the last several weeks.

The TGTCCSID designates the CCSID of the data, such as literals, stored in the module.

See the Targeting a CCSID section in the ILE C/C++ Programmers Guide for detailed information. Note that C allows only EBCDIC CCSIDs and will default to 037 if an ANSI CCSID is used. C++ accepts both EBCDIC and ANSI, stores the data appropriately and then defaults to 65535.

The TGTCCSID allows the use of one source code module to be used for multiple NLS builds so that I can use the same source and make builds specific for English, Spanish, Portuguese, etc.

Be careful in that the default is *SOURCE.

Mike

On 03/04/2011 09:52 AM, Erik Olsson wrote:
I'm having problems with #pragma convert.

I'm compiling a C module using a source file with CCSID 865 residing
in the IFS. My job CCSID is 278, I'm on 6.1. The CCSID of the module
is 37, regardless of what I'm specifying on the TGTCCSID command.

Even though I have this:
#pragma convert(278)
char *specchars = "ÉÜÅÄÖ";
#pragma convert(0)

... the hex representation of this string is "3542a2075", when it
should read "e0fc5b7b7c", i.e. no conversion to CCSID 278 is taking
place. I don't see any caveats in the manual that could explain this
behaviour.

Suggestions anyone? For now I'm using direct hex comparison instead
but I'd prefer to get the pragma working.

Regards,
Erik


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