132 lines
7.3 KiB
HTML
132 lines
7.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="reference" />
|
||
|
<meta name="DC.Title" content="COMP (Comparison) keyword for physical and logical files" />
|
||
|
<meta name="abstract" content="Use this field-level keyword to specify validity checking for the field you are defining when it is referred to later during display file creation. For logical files, you can also specify this keyword at the select/omit-field level. COMP is equivalent to CMP." />
|
||
|
<meta name="description" content="Use this field-level keyword to specify validity checking for the field you are defining when it is referred to later during display file creation. For logical files, you can also specify this keyword at the select/omit-field level. COMP is equivalent to CMP." />
|
||
|
<meta name="DC.subject" content="COMP (Comparison) keyword" />
|
||
|
<meta name="keywords" content="COMP (Comparison) keyword" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakbmstlfkeyw.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakbmstcompfield.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakbmstcompselom.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakbmsttdcmp.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="lcomp" />
|
||
|
<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>Physical and Logical Files, COMP</title>
|
||
|
</head>
|
||
|
<body id="lcomp"><a name="lcomp"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">COMP (Comparison) keyword for physical and logical files</h1>
|
||
|
<div><p>Use this field-level keyword to specify validity checking for the
|
||
|
field you are defining when it is referred to later during display file creation.
|
||
|
For logical files, you can also specify this keyword at the select/omit-field
|
||
|
level. COMP is equivalent to CMP.</p>
|
||
|
<div class="section"><div class="p">The format of the keyword is: <pre>COMP(relational-operator value)</pre>
|
||
|
</div>
|
||
|
<div class="p">At
|
||
|
the select/omit-field level, the format of the keyword is: <pre>COMP(relational-operator field-name)</pre>
|
||
|
</div>
|
||
|
<div class="p">Valid
|
||
|
relational operators are: <dl><dt><strong>Relational operator</strong></dt>
|
||
|
<dd><strong>Meaning</strong></dd>
|
||
|
<dt class="dlterm">EQ</dt>
|
||
|
<dd>Equal to</dd>
|
||
|
<dt class="dlterm">NE</dt>
|
||
|
<dd>Not equal to</dd>
|
||
|
<dt class="dlterm">LT</dt>
|
||
|
<dd>Less than</dd>
|
||
|
<dt class="dlterm">NL</dt>
|
||
|
<dd>Not less than</dd>
|
||
|
<dt class="dlterm">GT</dt>
|
||
|
<dd>Greater than</dd>
|
||
|
<dt class="dlterm">NG</dt>
|
||
|
<dd>Not greater than</dd>
|
||
|
<dt class="dlterm">LE</dt>
|
||
|
<dd>Less than or equal to</dd>
|
||
|
<dt class="dlterm">GE</dt>
|
||
|
<dd>Greater than or equal to</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<p>Specify the value parameter at either the field level
|
||
|
or the select/omit field level. Specify the field name parameter only at the
|
||
|
select/omit field level.</p>
|
||
|
</div>
|
||
|
<div class="example" id="lcomp__e1"><a name="lcomp__e1"><!-- --></a><h4 class="sectiontitle">Example 1</h4><p>The following example shows how
|
||
|
to specify the COMP keyword for character and numeric strings.</p>
|
||
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
||
|
00010A R RECORD PFILE(PF1)
|
||
|
00020A
|
||
|
00030A FIELDA 1 0 COMP(NE O) <span><span>1</span></span>
|
||
|
C0040A FIELDB 1 COMP(NE 'A') <span><span>1</span></span>
|
||
|
00050A FIELDC
|
||
|
00060A FIELDD
|
||
|
00070A FIELDE
|
||
|
00080A K FIELDB
|
||
|
00090A S FIELDC COMP(EQ FIELDD) <span><span>2</span></span>
|
||
|
00100A S FIELDA COMP(NE O) <span><span>2</span></span>
|
||
|
00110A S FIELDE COMP(NE *NULL) <span><span>2</span></span>
|
||
|
00120A O FIELDB COMP(GE 'A') <span><span>2</span></span>
|
||
|
A</pre>
|
||
|
<dl><dt class="dlterm"><span>1</span></dt>
|
||
|
<dd>COMP is specified for FIELDA and FIELDB as a validity checking keyword
|
||
|
for display files that refer to FIELDA and FIELDB.</dd>
|
||
|
<dt class="dlterm"><span>2</span></dt>
|
||
|
<dd>COMP is specified as a select/omit keyword for FIELDC, FIELDA, FIELDB,
|
||
|
and FIELDE. Records from the physical file PF1 are retrieved through this
|
||
|
logical file record format depending on the following comparisons: <ul><li>FIELDC: Records are selected when FIELDC equals FIELDD.</li>
|
||
|
<li>FIELDA: Records not meeting FIELDC test are selected only when FIELDA
|
||
|
is not equal to zero.</li>
|
||
|
<li>FIELDE: Records not meeting FIELDA test are selected only when FIELDE
|
||
|
is not the null value.</li>
|
||
|
</ul>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<div class="example" id="lcomp__e2"><a name="lcomp__e2"><!-- --></a><h4 class="sectiontitle">Example 2</h4><p>The following example specifies
|
||
|
the COMP keyword using a hexadecimal character string.</p>
|
||
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
||
|
00010A R RCD1 PFILE(PF1)
|
||
|
00020A CODEA
|
||
|
00030A FLD1
|
||
|
00040A FLD2
|
||
|
00050A K FLD1
|
||
|
00060A S CODEA COMP(EQ X'51')
|
||
|
A</pre>
|
||
|
<p>COMP is specified as a select/omit keyword for CODEA
|
||
|
(which is a 1-byte field). Records from physical file PF1 are retrieved through
|
||
|
this record format only if the value of field CODEA is hex 51.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rzakbmstcompfield.htm">Specify COMP at the field level</a></strong><br />
|
||
|
At the field level, COMP does not affect the physical or logical file you are describing.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rzakbmstcompselom.htm">Specify COMP at the select- or omit-field level</a></strong><br />
|
||
|
At the select/omit-field level, you can specify a field name, a value, or *NULL for the parameter.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakbmstlfkeyw.htm" title="This topic lists valid keyword entries for describing physical and logical files. They are typed in positions 45 through 80 (functions).">Keyword entries for physical and logical files (positions 45 through 80)</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="rzakbmsttdcmp.htm" title="This keyword is equivalent to the COMP keyword.">CMP (Comparison) keyword for physical and logical files</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|