159 lines
8.7 KiB
HTML
159 lines
8.7 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="SST (Substring) keyword—logical files only" />
|
|
<meta name="abstract" content="Use this field-level keyword to specify a character string that is a subset of an existing character, hexadecimal, zoned field, or graphic." />
|
|
<meta name="description" content="Use this field-level keyword to specify a character string that is a subset of an existing character, hexadecimal, zoned field, or graphic." />
|
|
<meta name="DC.subject" content="SST (Substring) keyword, Substring (SST) keyword" />
|
|
<meta name="keywords" content="SST (Substring) keyword, Substring (SST) keyword" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakbmstlfkeyw.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="lleng.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="tdsst" />
|
|
<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, SST</title>
|
|
</head>
|
|
<body id="tdsst"><a name="tdsst"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">SST (Substring) keyword—logical files only</h1>
|
|
<div><p>Use this field-level keyword to specify a character string that
|
|
is a subset of an existing character, hexadecimal, zoned field, or graphic.</p>
|
|
<div class="section"><div class="p">The format of the keyword is: <pre>SST(field-name starting-position [length])</pre>
|
|
</div>
|
|
<div class="p">The
|
|
field-name parameter specifies the name of the field from which the substring
|
|
is taken. This field must be defined in the same logical file format before
|
|
the SST field (which is the field you are defining) or it must exist in the
|
|
physical file specified on the PFILE or JFILE keyword. To find the field,
|
|
the system searches for a matching field name as follows:<ol><li>First, the system searches the field names specified in positions 19 to
|
|
28 in the logical file format before the SST field.</li>
|
|
<li>If no matching field name is found in positions 19 to 28 in the logical
|
|
file format, the system searches for the field name in the physical file specified
|
|
on the PFILE or JFILE keyword, according to the following rules: <ul><li>If the logical file is a simple or multiple format logical file, the field
|
|
must exist in all files specified on the PFILE keyword.</li>
|
|
<li>If the logical file is a join logical file and the JREF keyword is specified
|
|
on the SST field, the field must exist in the JFILE referred to by the JREF
|
|
keyword.</li>
|
|
<li>If the logical file is a join logical file and the JREF keyword is not
|
|
specified on the SST field, the field must exist in exactly one JFILE.</li>
|
|
</ul>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="p">The substring begins at the starting position you specify on the
|
|
SST keyword. Specify its length either as the third parameter on the keyword
|
|
or on the field length (DDS positions 30 through 34). The starting position
|
|
is a required parameter; the length is optional. <div class="note"><span class="notetitle">Note:</span> Both the starting
|
|
position and length values must be positive integer values and the defined
|
|
substring must not be greater than the length of the field specified on the
|
|
SST keyword.</div>
|
|
</div>
|
|
<div class="p">The following rules apply: <ul><li>If the field on the SST keyword is binary character, the resulting field
|
|
is binary character; if the field on the SST keyword is hexadecimal, the resulting
|
|
field is hexadecimal; if the field on the SST keyword is DBCS-graphic, the
|
|
resulting field is DBCS-graphic; otherwise, the resulting field is always
|
|
character. If the data type is not specified in DDS, the result field's data
|
|
type depends on the sub-stringed field as shown in the following table (the <em>Source
|
|
field type</em> is the type of the physical file field or the logical file
|
|
field defined earlier in the logical file source):
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" id="d0e60">Source field type</th>
|
|
<th valign="top" id="d0e62">Logical file field becomes:</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" headers="d0e60 ">A</td>
|
|
<td valign="top" headers="d0e62 ">A</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e60 ">H</td>
|
|
<td valign="top" headers="d0e62 ">H</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e60 ">S</td>
|
|
<td valign="top" headers="d0e62 ">A</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e60 ">G</td>
|
|
<td valign="top" headers="d0e62 ">G</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e60 ">Binary character</td>
|
|
<td valign="top" headers="d0e62 ">Binary character</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li>
|
|
<li>The use of the resulting field must be either input-only (I) or neither
|
|
(N).</li>
|
|
<li>The length of the resulting field is optional. You must specify either
|
|
the field length or the length parameter on the keyword. If you specify both,
|
|
they must be equal. If the field length is not specified, it is assigned the
|
|
length parameter on the keyword.</li>
|
|
<li>You cannot specify this keyword on the same field with the CONCAT, RENAME,
|
|
or TRNTBL keywords.</li>
|
|
<li>The field specified on this keyword cannot be defined with the CONCAT,
|
|
TRNTBL, or SST keywords.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Examples</h4><p>The following examples show how to specify
|
|
the SST keyword.</p>
|
|
<p>The following example shows how to specify the SST
|
|
keyword on a join logical file.</p>
|
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
A R RECORD1 JFILE(PF1 PF2)
|
|
A J JOIN(1 2)
|
|
A JFELD(CITY CITY)
|
|
A ADDRESS JREF(2)
|
|
A CITY I SST(ADDRESS 21 10)
|
|
A JREF(2)
|
|
A SYEAR I SST(SALESDATE 5)
|
|
A NAME JREF(1)
|
|
A CUSTNAME I SST(NAME 11 10) JREF(2)
|
|
A K SYEAR
|
|
A</pre>
|
|
<div class="p">This example shows: <ul><li>CITY is a substring of ADDRESS from the logical format and is joined with
|
|
CITY from PF1.</li>
|
|
<li>CUSTNAME is a substring of NAME from PF2, since NAME in the logical file
|
|
format has a different JREF.</li>
|
|
<li>Since SYEAR is a key field, the unique field name SALESDATE must exist
|
|
in PF1.</li>
|
|
<li>The usage (position 38) for a field with the SST keyword must be I (input
|
|
only). Because this is a join logical file, the usage default
|
|
is I.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="example"><p>The following example shows how to specify the SST keyword on
|
|
a simple or multiple format logical file.</p>
|
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
A R REC1 PFILE(PFA)
|
|
A LASTNAME I SST(NAME 10 10)
|
|
A K LASTNAME
|
|
A</pre>
|
|
<p>The LASTNAME field is a substring of NAME from PFA. The
|
|
usage I in position 38 must be specified for SST fields in simple or multiple
|
|
format logical files.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<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="lleng.htm" title="Use these positions to specify the length of a physical or logical file field.">Length for physical and logical files (positions 30 through 34)</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |