119 lines
8.6 KiB
HTML
119 lines
8.6 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="Code globalized applications with high-level languages" />
|
|
<meta name="abstract" content="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." />
|
|
<meta name="description" content="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." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsdevelopingappsprog.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagslangcompccsidguide.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagssessionmanagerguide.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsas400ilecguide.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsrpgc3.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsortseqileccobolc3.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsdb2qmansqlsortseq.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagspcsc3.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsinvariantcharset.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsqlangiduse.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsqcntryiduse.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="rbagshilevellangproggde" />
|
|
<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>Code globalized applications with high-level languages</title>
|
|
</head>
|
|
<body id="rbagshilevellangproggde"><a name="rbagshilevellangproggde"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Code globalized applications with high-level languages</h1>
|
|
<div><p>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.</p>
|
|
<p>You should do as follows:</p>
|
|
<ul><li>Base validity checks on database accesses and message files rather than
|
|
on hard-coded literals or tables.</li>
|
|
<li>Base calculations on variable factors retrieved from a file rather than
|
|
coding them inline.</li>
|
|
<li>Place cultural-dependent functions into separate modules of the application
|
|
and call them when you cannot code them flexibly.</li>
|
|
</ul>
|
|
<p>Do not use hard-coded values unless they are fully language and cultural
|
|
independent on comparison, scan, replace, or call operations. In addition,
|
|
do not use uppercase or lowercase-sensitive values. For example, never hard
|
|
code Yes and No (Y or N) responses in your program, because these values are
|
|
different for every language, and should be part of the textual data.</p>
|
|
<p>For literals and constants in source code, use characters only from the
|
|
invariant character set. If input data is checked for validity in the program,
|
|
make sure that the characters checked belong to the invariant character set;
|
|
otherwise you might get a situation where the user is requested
|
|
to enter a character that is not even on his keyboard. For example, the left
|
|
brace ({) and right brace (}) do not appear on Arabic keyboards. See Invariant
|
|
character set for a listing of the invariant character set.</p>
|
|
<p>Do not use compile-time arrays to hold messages or any other language or
|
|
cultural-sensitive data.</p>
|
|
<p>For better performance, when you need to call external NLS-dependent modules,
|
|
call them by a fixed name as a literal (but based on the library list) rather
|
|
than by a variable field containing the program name. This allows your application
|
|
to call the modules of different libraries based on the associated library
|
|
list.</p>
|
|
<p>To allow users to work with an application in the language and habits of
|
|
their culture, specify the editing values (for example, date, time, and date
|
|
separators) as dependent on the language and country or region. You can then
|
|
retrieve them according to the information in the user profile. The parameters
|
|
are LANGID (language identifier) and CNTRYID (country or region identifier).
|
|
You need to retrieve the cultural-sensitive information only once at program
|
|
initiation. You can do this by an initial CL program or by the high-level
|
|
language program and prepare them as:</p>
|
|
<ul><li>Parameters on the call operation</li>
|
|
<li>Parameters on the local data area (LDA)</li>
|
|
<li>Program load tables</li>
|
|
</ul>
|
|
<p>Using an initial program allows you to set the user's
|
|
job attributes to present a consistent application.</p>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rbagslangcompccsidguide.htm">Language compilers CCSID</a></strong><br />
|
|
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.</li>
|
|
<li class="ulchildlink"><strong><a href="rbagssessionmanagerguide.htm">Session manager</a></strong><br />
|
|
For all applications that use a session manager, you must ensure that the output data stream has no X'3F' values in it. The operating system uses X'3F' values to blank out a screen.</li>
|
|
<li class="ulchildlink"><strong><a href="rbagsas400ilecguide.htm">ILE C considerations</a></strong><br />
|
|
When you compile programs with ILE C, consider this information.</li>
|
|
<li class="ulchildlink"><strong><a href="rbagsrpgc3.htm">ILE RPG sort sequence</a></strong><br />
|
|
The ILE RPG feature (an option of the IBM<sup>®</sup> WebSphere<sup>®</sup> Development Studio for iSeries™ licensed
|
|
program) provides the possibility for a user to specify a sort sequence table
|
|
and use it in comparison operations performed with non-numeric data.</li>
|
|
<li class="ulchildlink"><strong><a href="rbagsortseqileccobolc3.htm">ILE COBOL sort sequence</a></strong><br />
|
|
The ILE COBOL feature (an option of the IBM<sup>®</sup> WebSphere<sup>®</sup> Development Studio for iSeries™ licensed
|
|
program) uses the sort sequence support in the ways listed in this topic.</li>
|
|
<li class="ulchildlink"><strong><a href="rbagsdb2qmansqlsortseq.htm">DB2 and SQL sort sequence</a></strong><br />
|
|
For interactive SQL, the SRTSEQ and LANGID parameters can be specified on the STRSQL command. Later these parameters can be changed using the session services for interactive displays.</li>
|
|
<li class="ulchildlink"><strong><a href="rbagspcsc3.htm">iSeries Access sort sequence</a></strong><br />
|
|
You can specify the sort sequence in the iSeries™ Access functions. When performing
|
|
queries on the server databases and SQL tables, you can specify the system-supplied
|
|
or user-supplied sort sequence tables.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbagsdevelopingappsprog.htm" title="As you develop your globalized applications, the national language version environment often requires that you pay additional attention to how you prepare and compile your code.">Programming considerations in globalized application design</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="rbagsinvariantcharset.htm">Invariant character set</a></div>
|
|
<div><a href="rbagsqlangiduse.htm" title="The language identifier (QLANGID) is used to specify the default language identifier for the server.">Language identifier (QLANGID) system value</a></div>
|
|
<div><a href="rbagsqcntryiduse.htm" title="The country or region identifier (QCNTRYID) is used to indicate the default country or region identifier for the system.">Country or region identifier (QCNTRYID) system value</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |