145 lines
9.7 KiB
HTML
145 lines
9.7 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="ILE RPG sort sequence" />
|
||
|
<meta name="abstract" content="The ILE RPG feature (an option of the IBM WebSphere 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." />
|
||
|
<meta name="description" content="The ILE RPG feature (an option of the IBM WebSphere 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." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagshilevellangproggde.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagsqsrtsequse.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagsqlangiduse.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagssortsequencetable.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagslangcntrycodeids.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagsqsrtsequse.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagsqlangiduse.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbagsortseqileccobolc3.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="rbagsrpgc3" />
|
||
|
<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>ILE RPG sort sequence</title>
|
||
|
</head>
|
||
|
<body id="rbagsrpgc3"><a name="rbagsrpgc3"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">ILE RPG sort sequence</h1>
|
||
|
<div><p>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.</p>
|
||
|
<p>For each of the supported languages, two tables (a shared-weight and unique-weight)
|
||
|
are included with the server. With sort sequence support you can create sort
|
||
|
sequence tables based on the existing ones.</p>
|
||
|
<p>The control specifications are specifications that provide the ILE RPG
|
||
|
for iSeries compiler
|
||
|
with information about your program and your server. The sort sequence used
|
||
|
in ILE RPG for iSeries programs
|
||
|
is controlled by all of the following items:</p>
|
||
|
<ul><li>The control specifications.</li>
|
||
|
<li>The SRTSEQ (sort sequence table) parameter on the Create RPG Module and
|
||
|
the Create Bound RPG Program commands.</li>
|
||
|
<li>The LANGID (language identifier) parameter on the Create RPG Module and
|
||
|
the Create Bound RPG Program commands.</li>
|
||
|
</ul>
|
||
|
<p>The alternative collating sequence field (ALTSEQ) in the control specifications
|
||
|
allows the following values:</p>
|
||
|
<dl><dt class="dlterm">blank</dt>
|
||
|
<dd>No alternative collating sequence is used in the RPG program. The normal
|
||
|
collating sequence is used in the RPG program. The compile options SRTSEQ
|
||
|
and LANGID are ignored.</dd>
|
||
|
<dt class="dlterm">*NONE</dt>
|
||
|
<dd>No alternative collating sequence is used in the RPG program. The normal
|
||
|
collating sequence is used in the RPG program. The compile options SRTSEQ
|
||
|
and LANGID are ignored.</dd>
|
||
|
<dt class="dlterm">*SRC</dt>
|
||
|
<dd>The alternative collating sequence is used in the RPG program, according
|
||
|
to the tables entered at the end of the RPG program. The alternative collating
|
||
|
sequence table is loaded at compile time, and ordering, sorting, comparing,
|
||
|
and match field processing is done according to that table. <p>The SORTA and
|
||
|
LOOKUP operation codes do not use specified alternative collating sequence
|
||
|
tables.</p>
|
||
|
<p>The SRTSEQ and LANGID parameters on the Create RPG Module and
|
||
|
Create Bound RPG Program commands are ignored.</p>
|
||
|
</dd>
|
||
|
<dt class="dlterm">*EXT</dt>
|
||
|
<dd>The alternative collating sequence is specified outside of the RPG program.
|
||
|
RPG compiler imports an external sort sequence table, based on the SRTSEQ
|
||
|
and LANGID parameters on the Create RPG Module and the Create Bound RPG Program
|
||
|
commands. <p>The SORTA and LOOKUP function with the arrays and tables at compile
|
||
|
time and processing time take effect only when you specify D in the control
|
||
|
specifications.</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p>The sort sequence table to be used by the program can be determined at
|
||
|
compile time or when the job is run. If the SRTSEQ parameter of the Create
|
||
|
RPG Module and Create Bound RPG Program commands:</p>
|
||
|
<ul><li>Is set to *HEX, no sort sequence table is used.</li>
|
||
|
<li>Specifies a table name, then that table is stored with the program object
|
||
|
to be used when the job is run. For system-supplied default sort sequence
|
||
|
tables for the supported languages, refer to Sort sequence tables.</li>
|
||
|
<li>Is set to *LANGIDSHR or *LANGIDUNQ, the shared-weight or unique-weight
|
||
|
table for the language determined by the LANGID parameter is stored with the
|
||
|
program object. For a list of valid language identifiers, refer to Language
|
||
|
and country and region identifiers.</li>
|
||
|
<li>Is set to *JOB, the SRTSEQ parameter of the compile time job is used to
|
||
|
determine the sort sequence. The table is stored with the program object.</li>
|
||
|
<li>Is set to *JOBRUN, the attributes of the job running the compiled program
|
||
|
determine the sort sequence to be used. If the SRTSEQ attribute of the job
|
||
|
refers to the LANGID, the LANGID stored with the program object is used. If
|
||
|
the LANGID stored with the program is also *JOBRUN, the LANGID of the runtime
|
||
|
job is used.</li>
|
||
|
</ul>
|
||
|
<div class="note"><span class="notetitle">Notes:</span> <ol><li>If the table to be stored with the program object at compile time does
|
||
|
not exist, a table defining hexadecimal sort sequence and tagged with a CCSID
|
||
|
value of 65535 is used.</li>
|
||
|
<li>If the sort sequence table and the CCSID of the job running the program
|
||
|
differ, the table is converted to the CCSID of the job.</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
<div class="section" id="rbagsrpgc3__Header_404"><a name="rbagsrpgc3__Header_404"><!-- --></a><h4 class="sectiontitle">SORTA and LOOKUP operation codes</h4><p>The
|
||
|
implementation of compare operation codes, match field and control field processing
|
||
|
with the sort sequence tables is the same for the alternative collating sequence
|
||
|
and for the sort sequence support. Compare operation codes are ANDxx, COMP,
|
||
|
CABxx, CASxx, DOUxx, DOWxx, IFxx, ORxx, and WHxx. Additional functions provided
|
||
|
with the SORTA and LOOKUP operation codes follow:</p>
|
||
|
<dl><dt class="dlterm">SORTA</dt>
|
||
|
<dd>The data in the array is sorted according to the sort sequence table.</dd>
|
||
|
<dt class="dlterm">LOOKUP</dt>
|
||
|
<dd>To provide proper table searching, the sort sequence table is used with
|
||
|
the search arguments in the arrays and tables. <p>The search argument and
|
||
|
either the table or array element are compared using the sort sequence table.</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p>The array and table data are checked using the sort sequence
|
||
|
table, whenever ascending or descending sequence is specified. If the SRTSEQ
|
||
|
and LANGID parameter values resolve to retrieve the sort sequence table again
|
||
|
at run time, then the array and table elements are loaded without
|
||
|
a sequence check at the compile time. The sequence checks are performed at
|
||
|
run time, according to the sort sequence table.</p>
|
||
|
</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 class="relconcepts"><strong>Related concepts</strong><br />
|
||
|
<div><a href="rbagsqsrtsequse.htm" title="The sort sequence (QSRTSEQ), along with QLANGID, is used to determine the sort sequence table to be used for sorting character data.">Sort sequence (QSRTSEQ) system value</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="rbagssortsequencetable.htm" title="A sort sequence table is an object that contains the weight of each single-byte graphic character within a specified coded character set identifier (CCSID). The system-recognized identifier for the sort sequence table object type is *TBL.">Sort sequence tables</a></div>
|
||
|
<div><a href="rbagslangcntrycodeids.htm" title="This table lists the country and region identifiers.">Country and region identifiers</a></div>
|
||
|
<div><a href="rbagsortseqileccobolc3.htm" title="The ILE COBOL feature (an option of the IBM WebSphere Development Studio for iSeries licensed program) uses the sort sequence support in the ways listed in this topic.">ILE COBOL sort sequence</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|