118 lines
6.3 KiB
HTML
118 lines
6.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="Language compilers CCSID" />
|
|
<meta name="abstract" content="Some language compilers expect syntactical operators and the naming convention for the source code to be in CCSID 00037. You can refer to the documentation for the language compiler you use." />
|
|
<meta name="description" content="Some language compilers expect syntactical operators and the naming convention for the source code to be in CCSID 00037. You can refer to the documentation for the language compiler you use." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagshilevellangproggde.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbagslangcompccsidguide" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Language compilers CCSID</title>
|
|
</head>
|
|
<body id="rbagslangcompccsidguide"><a name="rbagslangcompccsidguide"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Language compilers CCSID</h1>
|
|
<div><p>Some language compilers expect syntactical operators and the naming
|
|
convention for the source code to be in CCSID 00037. You can refer to the
|
|
documentation for the language compiler you use.</p>
|
|
<p>For these compilers, incorrect mapping occurs if the source is compiled
|
|
with a CCSID other than 00037 or 65535. You must ensure that these compilers
|
|
receive any variant characters used in language syntax in CCSID 00037.</p>
|
|
<div class="section"><h4 class="sectiontitle">ILE language compilers</h4><p>When compiling an ILE C/400<sup>®</sup>,
|
|
ILE RPG for iSeries™,
|
|
or ILE COBOL for iSeries program,
|
|
source from database source files is converted to the CCSID of the primary
|
|
source file.</p>
|
|
<p>Compilers for these languages can handle syntactical operators
|
|
in most CCSIDs. These compilers can also handle naming conventions for the
|
|
source code in most CCSIDs.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Non-ILE language compilers</h4><p>When compiling a non-ILE
|
|
CL, RPG, or COBOL program, source from database source files is converted
|
|
to the CCSID of the job.</p>
|
|
<p>If you do not want your names, constants, or
|
|
literals converted to the CCSID of the job, you can change your
|
|
job CCSID to 65535. Your constants, literals and names then remain intact.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> REXX/400
|
|
procedures and the literal data coded within them are not converted to the
|
|
job CCSID.</div>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Example 1</h4><p>The following example shows a sample non-ILE
|
|
RPG program. This example shows English source on a system in the United States.</p>
|
|
<pre>* RPG Source (Source file created using CCSID 00037 but tagged
|
|
* with CCSID 65535)
|
|
FFILE1 IF E DISK 80
|
|
C READ FILE1
|
|
C* Test char
|
|
C*
|
|
C FLD1 IFEQ '$'
|
|
C ...
|
|
C* Move char
|
|
C*
|
|
C MOVE FLD1 FLD$
|
|
C ...
|
|
C*
|
|
C SETON LR</pre>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Example 2</h4><p>In Finland, the program in the first example
|
|
does not compile because the field name FLD$ contains a variant character
|
|
(the dollar sign). The variant character represents a different code point
|
|
in a code page other than 00037. This figure shows the same sample non-ILE
|
|
RPG program as English (U.S.) source on a system in Finland (CCSID 278).</p>
|
|
<pre>* RPG Source (Source file created with CCSID 00037, but tagged
|
|
* with 65535)
|
|
FFILE1 IF E DISK 80
|
|
C READ FILE1
|
|
C* Test char
|
|
C*</pre>
|
|
<p><samp class="codeph">C FLD1 IFEQ '</samp> <img src="la270000.gif" alt="a ring character" /> <samp class="codeph">'</samp> </p>
|
|
<pre>C ...
|
|
C* Move char
|
|
C*</pre>
|
|
<p><samp class="codeph">C MOVE FLD1 FLD</samp> <img src="la270000.gif" alt="a ring character" /> </p>
|
|
<pre>C ...
|
|
C*
|
|
C SETON LR</pre>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Example 3</h4><p>You can correct this error by changing
|
|
the file CCSID to 00037 and setting the job CCSID to 00278 (for Finland).
|
|
The following example shows the changed file as seen English source in Finland.</p>
|
|
<pre>* RPG Source (Source file created using CCSID 00037 and tagged
|
|
* with CCSID 00037)
|
|
FFILE1 IF E DISK 80
|
|
C READ FILE1
|
|
C* Test char
|
|
C*
|
|
C FLD1 IFEQ '$'
|
|
C ...
|
|
C* Move char
|
|
C*
|
|
C MOVE FLD1 FLD$
|
|
C ...
|
|
C*
|
|
C SETON LR</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbagshilevellangproggde.htm" title="Your major goal must be to have only one general set of running code that is common for all language versions and to make your programs table-driven as much as possible.">Code globalized applications with high-level languages</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |