ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakb_5.4.0.1/rzakbmstcompselom.htm

84 lines
5.5 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="Specify COMP at the select- or omit-field level" />
<meta name="abstract" content="At the select/omit-field level, you can specify a field name, a value, or *NULL for the parameter." />
<meta name="description" content="At the select/omit-field level, you can specify a field name, a value, or *NULL for the parameter." />
<meta name="DC.subject" content="specifying COMP at the select or omit-field level, select or omit-field level, specifying COMP" />
<meta name="keywords" content="specifying COMP at the select or omit-field level, select or omit-field level, specifying COMP" />
<meta name="DC.Relation" scheme="URI" content="rzakbmstlcomp.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="compselom" />
<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>Specify COMP at the select- or omit-field level</title>
</head>
<body id="compselom"><a name="compselom"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Specify COMP at the select- or omit-field level</h1>
<div><p>At the select/omit-field level, you can specify a field name, a
value, or *NULL for the parameter.</p>
<p>If the select/omit field is a binary character field, the field-name parameter
must also be a binary character field. The comparisons for binary character
select/omit fields also need to take the actual lengths of the operands into
consideration. The operands will only compare as equal if the actual lengths
of the operands are equal. Shorter operands will be considered less than the
longer operands when they are equal up to the length of the shorter operand.</p>
<div class="p">If you specify a value, the following rules apply: <ul><li>If you are defining a character field, specify a character constant or
a hexadecimal character string. <p>Specify character strings with single
quotation marks (see Example 1 in the <a href="rzakbmstlcomp.htm">COMP (Comparison) keyword for physical and logical files</a> topic).</p>
<p>Specify hexadecimal character strings as an X followed by
a combination of the digits 0 through 9 and the letters A through F, enclosed
in single quotation marks ('). The number of hexadecimal digits in single
quotation marks must be exactly twice the specified length of the field (see
Example 2 in the <a href="rzakbmstlcomp.htm">COMP (Comparison) keyword for physical and logical files</a> topic).</p>
</li>
<li>If you are defining a numeric field, specify a numeric string (digits
0 through 9 specified without single quotation marks) as shown in example
2.</li>
<li>If you are defining a date field, specify a valid date in the same format
specified on the DATFMT keyword and use the same separator as specified on
the DATSEP keyword.<p>For example, <samp class="codeph">COMP(EQ '12/15/91')</samp> is
the default value if *MDY is specified for DATFMT and '/' is specified for
DATSEP.</p>
</li>
<li>If you are defining a time field, specify a valid time in the same format
specified on the TIMFMT keyword and use the same separator as specified on
the TIMSEP keyword.<p>For example, <samp class="codeph">COMP(EQ '11.00.00')</samp> is
the default value if *ISO is specified for TIMFMT. The default separator for
*ISO is a period (.).</p>
</li>
<li>If you are defining a timestamp field, you must specify the default value
in the following format: <pre>COMP(EQ 'YYYY-MM-DD-HH.MM.SS.UUUUUU')</pre>
</li>
</ul>
</div>
<p>If you specify *NULL, the relational operator must be EQ or NE.</p>
<p>COMP selects or omits records retrieved from the physical file on which
this logical file is based when your program sends an input operation to the
record format you are defining. The operating system selects or omits records
as a result of testing the value of the select/omit fields against the value
you specify, the value of the field whose name you specify, or the null value
(if *NULL was specified).</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakbmstlcomp.htm" title="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.">COMP (Comparison) keyword for physical and logical files</a></div>
</div>
</div>
</body>
</html>