ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/rbam6relatexp.htm

72 lines
4.1 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="reference" />
<meta name="DC.Title" content="Relational expressions" />
<meta name="abstract" content="The operands in a relational expression can be arithmetic or character string expressions; they can also be logical constants and logical variables." />
<meta name="description" content="The operands in a relational expression can be arithmetic or character string expressions; they can also be logical constants and logical variables." />
<meta name="DC.Relation" scheme="URI" content="rbam6xpressincom.htm" />
<meta name="DC.Relation" scheme="URI" content="rbam6opsinexp.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="rbam6relatexp" />
<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>Relational expressions</title>
</head>
<body id="rbam6relatexp"><a name="rbam6relatexp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Relational expressions</h1>
<div><p>The operands in a relational expression can be arithmetic or character
string expressions; they can also be logical constants and logical variables.</p>
<div class="section"><p>Only two operands can be used with each relational
operator. The data type (arithmetic, character string, or logical) must be
the same for the pair of operands. The result of a relational expression is
a logical value '0' or '1'.</p>
<p>Refer to the table in <a href="rbam6opsinexp.htm">Operators
in expressions</a> for the meanings of the relational operators, which
can be specified by symbols (=, &gt;, &lt;, &gt;=, &lt;=, <img src="notsym.gif" alt="not symbol" />=, <img src="notsym.gif" alt="not symbol" />&gt;,
<img src="notsym.gif" alt="not symbol" />&lt;) or their reserved
values (*EQ, *GT, *LT, *GE, *LE, *NE, *NG, *NL).</p>
<p>If an operation involves
character fields of unequal length, the shorter field is extended by blanks
added to the right.</p>
<p>Arithmetic fields are compared algebraically; character
fields are compared according to the EBCDIC collating sequence.</p>
<p>When
logical fields are compared, a logical one ('1') is greater than logical zero
('0'). Symbolically, this is ('1' &gt; '0').</p>
<p>The following
are examples of relational expressions:</p>
<pre>(&amp;X *GT 25)
(&amp;X &gt; 25)
(&amp;X&gt;25)
(&amp;NAME *EQ GSD)
(&amp;NAME *EQ &amp;GSD)
(&amp;NAME *EQ 'GSD')
(&amp;BLANK *EQ ' ')</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbam6xpressincom.htm" title="A character string expression can be used for any parameter, element, or qualifier defined with EXPR(*YES) in the command definition object.">Expressions in CL commands</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rbam6opsinexp.htm" title="Operators are used in expressions to indicate an action to be performed on the operands in the expression or the relationship between the operands.">Operators in expressions</a></div>
</div>
</div>
</body>
</html>