98 lines
7.6 KiB
HTML
98 lines
7.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="copyright" content="(C) Copyright IBM Corporation 2005" />
|
|
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
|
|
<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="Select records based on field value (INCREL parameter)" />
|
|
<meta name="abstract" content="You use the INCREL parameter to select records for copying by testing for the value of an entire field. Unlike the INCCHAR parameter, you can use the INCREL parameter only when you are copying from a database file, and you can test for different values in different fields on one copy command." />
|
|
<meta name="description" content="You use the INCREL parameter to select records for copying by testing for the value of an entire field. Unlike the INCCHAR parameter, you can use the INCREL parameter only when you are copying from a database file, and you can test for different values in different fields on one copy command." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal3selrecords.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal3copyvlf.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal3copydttf.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal3copyncf.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal3copyccs.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal3copydgf.htm" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbal3copyreco" />
|
|
<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>Select records based on field value (INCREL parameter)</title>
|
|
</head>
|
|
<body id="rbal3copyreco"><a name="rbal3copyreco"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Select records based on field value (INCREL parameter)</h1>
|
|
<div><p>You use the INCREL parameter to select records for copying by testing
|
|
for the value of an entire field. Unlike the INCCHAR parameter, you can use
|
|
the INCREL parameter only when you are copying from a database file, and you
|
|
can test for different values in different fields on one copy command.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> You can use this parameter on the CPYF command only.</div>
|
|
<div class="p">You can use as many as 50 AND and OR relationships on one INCREL parameter.
|
|
The OR relationship groups the AND relationships. For example, the following
|
|
INCREL parameter essentially says this: If field FLDA is greater than 5 and
|
|
field FLDB is less than 6, select the record. If FLDB is equal to 9 (FLDA
|
|
is any value), select the record. <pre>INCREL((*IF FLDA *GT 5) (*AND FLDB *LT 6) +
|
|
(*OR FLDB *EQ 9))</pre>
|
|
</div>
|
|
<p>The value you specify must be compatible with the field type. You must
|
|
enclose each INCREL relational set in parentheses.</p>
|
|
<p>The value *IF must be specified as the first value in the first set of
|
|
comparison values, if there is only one set or several sets of comparison
|
|
values. If more than one set of comparison values are specified, either *AND
|
|
or *OR must be specified as the first value in each set after the first set
|
|
of values.</p>
|
|
<p>In the following discussion, an IF group refers to an IF set, optionally
|
|
followed by one or more AND sets. An OR group refers to an OR set, optionally
|
|
followed by one or more AND sets. All the comparisons specified in each group
|
|
are done until a complete group, which is a single IF set or OR set having
|
|
no AND sets following it, yields all true results. If at least one group has
|
|
a true result, the copy command includes the record in the copied file.</p>
|
|
<p>The first set of comparison values (*IF field-name operator value) and
|
|
any AND sets logically connected with the IF set are evaluated first. If the
|
|
results in all of the sets in the IF group are true, the testing ends and
|
|
the record is copied. If any of the results in the IF group are false and
|
|
an OR group follows, another comparison begins. The command evaluates the
|
|
OR set and any AND sets that follow it (up to the next OR set). If the results
|
|
in the OR group are all true, the record is included. If any result is false
|
|
and another OR group follows, the process continues until either an OR group
|
|
is all true or until there are no more OR groups. If the results are not all
|
|
true for any of the IF or OR groups, the record is excluded (not copied to
|
|
the to-file).</p>
|
|
<p>If you specify both the INCCHAR and INCREL parameters, the copy command
|
|
copies a record only if it satisfies both the INCCHAR and INCREL conditions.</p>
|
|
<p>You cannot specify the INCREL parameter if you specify RCDFMT(*ALL) when
|
|
copying from a multiple-format logical file.</p>
|
|
<p>For binary character fields, the INCREL parameter will only allow checks
|
|
for *EQ and *NE.</p>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rbal3copyvlf.htm">Variable-length fields used by the INCREL parameter</a></strong><br />
|
|
You can use variable-length character fields for the INCREL parameter. Enter the character value without the 2-byte length field. The length of the data that is entered determines the number of bytes that are used for the comparison.</li>
|
|
<li class="ulchildlink"><strong><a href="rbal3copydttf.htm">Date, time, and timestamp fields used by the INCREL parameter</a></strong><br />
|
|
The INCREL parameter allows date, time, and timestamp fields. The copy command compares the input field value chronologically to the value in the date, time, or timestamp field to determine if it should select the record.</li>
|
|
<li class="ulchildlink"><strong><a href="rbal3copyncf.htm">Null-capable fields used by the INCREL parameter</a></strong><br />
|
|
The INCREL parameter allows a value of *NULL as input for a field value. You can use the *EQ and *NE operators with the *NULL value to test whether a field in a database file contains the null value or not.</li>
|
|
<li class="ulchildlink"><strong><a href="rbal3copyccs.htm">Different CCSIDs used by the INCREL parameter</a></strong><br />
|
|
The copy command assumes that the input string for character, DBCS-open, DBCS-either, or DBCS-only fields are in the CCSID of the job in which the copy command is running. The input string is converted to the CCSID of the from-field.</li>
|
|
<li class="ulchildlink"><strong><a href="rbal3copydgf.htm">DBCS-graphic fields used by the INCREL parameter</a></strong><br />
|
|
When you specify a graphic field for the INCREL parameter, you should enclose the DBCS data in shift-out and shift-in characters. The copy command assumes that the data is in the associated DBCS CCSID of the job CCSID.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3selrecords.htm" title="You can use parameters on the copy commands to select only the specific records that you want to copy.">Select the records to copy</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |