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

126 lines
7.6 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="CONCAT (Concatenate) keyword" />
<meta name="abstract" content="Use this field-level keyword when you want to combine two or more fields from the physical file record format into one field in the logical file record format you are describing." />
<meta name="description" content="Use this field-level keyword when you want to combine two or more fields from the physical file record format into one field in the logical file record format you are describing." />
<meta name="DC.subject" content="CONCAT (Concatenate) keyword" />
<meta name="keywords" content="CONCAT (Concatenate) keyword" />
<meta name="DC.Relation" scheme="URI" content="dbkwd.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakbmstlconcat.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="dbcconcat" />
<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>CONCAT (Concatenate) keyword</title>
</head>
<body id="dbcconcat"><a name="dbcconcat"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">CONCAT (Concatenate) keyword</h1>
<div><p>Use this field-level keyword when you want to combine two or more
fields from the physical file record format into one field in the logical
file record format you are describing.</p>
<div class="section"><p>The name of this concatenated field must appear in positions 19
through 28. Specify the physical file field names in the order in which you
want them to be concatenated, and separate them by blanks.</p>
<div class="p">The following
rules and restrictions apply: <ul><li>The operating system assigns
the length of the concatenated field as the sum of the lengths (digits and
characters) of the fields that are included in the concatenation. <div class="note"><span class="notetitle">Note:</span> For
fields with data type J, the shift-out and shift-in pairs between the concatenated
fields are removed from the resulting field. If the resulting data type is
hexadecimal, the shift-out and shift-in pairs are eliminated for DBCS fields
that precede the first hexadecimal fields.</div>
</li>
<li>A DBCS-graphic field can be concatenated only with another graphic data
type field.</li>
<li>The operating system assigns
the data type based on the data types of the fields that are being concatenated.
When bracketed-DBCS fields are included in a concatenation, the general rules
are: <ul><li>If the concatenation contains one or more hexadecimal (H) fields, the
resulting data type is hexadecimal (H).</li>
<li>If all fields in the concatenation are DBCS-only (J), the resulting data
type is DBCS-only (J).</li>
<li>If the concatenation contains one or more DBCS (O, E, J) fields, but no
hexadecimal fields, the resulting data type is DBCS-open (O).</li>
</ul>
</li>
<li>The operating system assigns
the field to be fixed length or variable length based on the fields that are
being concatenated. The general rules are: <ul><li>Concatenation of a variable length field to either a fixed length field
or another variable length field results in a variable length field.</li>
<li>Concatenation of a fixed length field to a fixed length field results
in a fixed length field unless the VARLEN keyword is also specified on the
same field as the CONCAT keyword.</li>
</ul>
</li>
<li>The maximum length of a concatenated field varies depending on the data
type of the concatenated field and the length of the fields being concatenated.
If the concatenated field is zoned decimal (S), its total length cannot exceed
63 bytes; if it is character (A) or DBCS(O, J), its total length cannot exceed
32 766 bytes. If the concatenated field is variable length, its total
length cannot exceed 32 740 bytes (32 739 if the field also allows
the null value). <p>If the concatenated field is a DBCS-graphic (G) field,
its total length cannot exceed 16 383 characters. If the concatenated
field is variable length, its total length cannot exceed 16 370 characters.</p>
</li>
<li>In join logical files, the fields to be concatenated must be from the
same physical file. The first field specified on the CONCAT keyword identifies
which physical file is used. The first field must, therefore, be unique among
the physical files on which the logical file is based, or you must also specify
the JREF keyword to specify which physical file to use.</li>
<li>When one or more of the fields being concatenated are DBCS fields, none
of the fields on the CONCAT keyword can be specified as a key, select, or
omit field unless the field name is also specified in positions 19 through
28 or on a RENAME or CONCAT keyword specified before the DBCS concatenation.</li>
<li>The usage of a concatenated field must be I (input only).</li>
<li>REFSHIFT cannot be specified on a concatenated field that has been assigned
a data type of O or J. </li>
</ul>
</div>
</div>
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
the CONCAT keyword on the DDS coding form.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R RECORD 1 PFILE(PF1)
A FLD1 I CONCAT(PFLD1 PFLD2)
A FLD2 I CONCAT(PFLD1 PFLD2 PFLD3)
A FLD3 I CONCAT(PFLD4 PFLD5)
A</pre>
<div class="p">In the example, if the fields from PF1 are: <ul><li>PFLD1 with data type J</li>
<li>PFLD2 with data type J</li>
<li>PFLD3 with data type E</li>
<li>PFLD4 and PFLD5 with data type G</li>
</ul>
</div>
<div class="p">Then the resulting fields are: <ul><li>FLD1 with data type J</li>
<li>FLD2 with data type O</li>
<li>FLD3 with data type G</li>
</ul>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dbkwd.htm" title="Do not specify DDS keywords intended for use with numeric data for fields containing DBCS data. The system treats DBCS data the same as character data, and, therefore, cannot perform arithmetic operations on it.">Keyword considerations for database files that use DBCS</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rzakbmstlconcat.htm" title="Use this field-level keyword when you want to combine two or more fields from the physical file record format into one field in the logical file record format you are defining. The name of this concatenated field must appear in positions 19 through 28.">CONCAT (Concatenate) keyword—logical files only</a></div>
</div>
</div>
</body>
</html>