195 lines
12 KiB
HTML
195 lines
12 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="EDTWRD (Edit Word) keyword for display files" />
|
|||
|
<meta name="abstract" content="Use this field-level keyword to specify an edit word if you cannot obtain the editing that you want by using the EDTCDE keyword." />
|
|||
|
<meta name="description" content="Use this field-level keyword to specify an edit word if you cannot obtain the editing that you want by using the EDTCDE keyword." />
|
|||
|
<meta name="DC.subject" content="EDTWRD (Edit Word) keyword, Edit Word (EDTWRD) keyword" />
|
|||
|
<meta name="keywords" content="EDTWRD (Edit Word) keyword, Edit Word (EDTWRD) keyword" />
|
|||
|
<meta name="DC.Relation" scheme="URI" content="rzakcmstkeyent.htm" />
|
|||
|
<meta name="DC.Relation" scheme="URI" content="dfnoy.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="rzakcmstdfedwrd" />
|
|||
|
<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>EDTWRD (Edit Word) keyword for display files</title>
|
|||
|
</head>
|
|||
|
<body id="rzakcmstdfedwrd"><a name="rzakcmstdfedwrd"><!-- --></a>
|
|||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|||
|
<h1 class="topictitle1">EDTWRD (Edit Word) keyword for display files</h1>
|
|||
|
<div><p>Use this field-level keyword to specify an edit word if you cannot
|
|||
|
obtain the editing that you want by using the EDTCDE keyword.</p>
|
|||
|
<div class="section"><div class="p">The format of the keyword is: <pre>EDTWRD('edit-word')</pre>
|
|||
|
</div>
|
|||
|
<p>An
|
|||
|
edit word specifies the form in which the field values are to be displayed
|
|||
|
and clarifies the data by inserting characters directly, such as decimal points,
|
|||
|
commas, floating- and fixed-currency symbol, and credit balance indicators.
|
|||
|
The edit word can also be used to suppress leading zeros and to provide asterisk
|
|||
|
fill protection.</p>
|
|||
|
<p>If a field previously defined in a database file has
|
|||
|
EDTWRD specified, you need not specify EDTWRD for that field in the display
|
|||
|
file. You can specify R in position 29 to refer to the previously defined
|
|||
|
field. The editing specified for the referenced field is included in the display
|
|||
|
file. However, if you also specify length, data type, or decimal positions
|
|||
|
for a display file field, editing specified for the referenced field is not
|
|||
|
included in the display file, and you must specify editing again in the display
|
|||
|
file.</p>
|
|||
|
</div>
|
|||
|
<div class="example"><h4 class="sectiontitle">Parts of an edit word</h4><p>An edit word consists of three parts: the body, the
|
|||
|
status, and the expansion. <a href="#rzakcmstdfedwrd__exedwrd">Figure 1</a> shows
|
|||
|
the three parts of an edit word.</p>
|
|||
|
<div class="fignone" id="rzakcmstdfedwrd__exedwrd"><a name="rzakcmstdfedwrd__exedwrd"><!-- --></a><span class="figcap">Figure 1. Three parts of
|
|||
|
an edit word</span><br /><img src="rv2f511.gif" alt="Three parts of an edit word:
the body, the status, and the expansion." /><br /></div>
|
|||
|
<p>The body is the space for the digits transferred from the data field
|
|||
|
to the output record. The body begins at the farthest left position of the
|
|||
|
edit word. The number of blanks (plus one for a zero or an asterisk) it contains
|
|||
|
is equal to the number of digits of the data field to be edited. If the zero
|
|||
|
or asterisk is the first character in the edit word, the number of blanks
|
|||
|
it contains might equal the number of digits in the data field. The body ends
|
|||
|
with the farthest right character that can be replaced by a digit.</p>
|
|||
|
<p>The
|
|||
|
status positions display the sign (+ or -) of the data field. The status continues
|
|||
|
to the right of the body to either a CR (credit) or - (minus) symbol. These
|
|||
|
two symbols print only when the field is negative. Edit words without the
|
|||
|
CR or - symbol have no status positions.</p>
|
|||
|
<p>The expansion positions are
|
|||
|
not changed by the edit operation. The expansion starts at the first position
|
|||
|
to the right of the status (or body, if status is not specified) and ends
|
|||
|
with the farthest right character of the edit word.</p>
|
|||
|
</div>
|
|||
|
<div class="section"><h4 class="sectiontitle">Forming the body of an edit word</h4><p>The following characters
|
|||
|
have special meanings when used in the body of an edit word.</p>
|
|||
|
<dl><dt class="dlterm">Blank</dt>
|
|||
|
<dd>A blank is replaced with the character from the corresponding position
|
|||
|
of the data field. A blank position is referred to as a digit position.</dd>
|
|||
|
<dt class="dlterm">Ampersand</dt>
|
|||
|
<dd>An ampersand causes a blank in the edited field. The ampersand is not
|
|||
|
displayed. Note that ampersands specified in the edit word between blanks
|
|||
|
can result in incorrect data when specified for an input/output field. This
|
|||
|
is because embedded blanks in a numeric-only field are converted to zeros.</dd>
|
|||
|
<dt class="dlterm">Zero</dt>
|
|||
|
<dd>A zero stops zero suppression. Place it in the farthest right position
|
|||
|
where zero suppression is to stop. The zero is replaced with the character
|
|||
|
from the corresponding position of the data field, unless that character is
|
|||
|
a zero. Any zeros in the data that appear to the right of the stop-zero-suppression
|
|||
|
character are displayed. The stop-zero-suppression character is considered
|
|||
|
a digit position; however, when it is the first character, it might not represent
|
|||
|
the digit position. At least one leading zero is suppressed, unless it is
|
|||
|
the first character of the EDTWRD. Then it does not count as a digit because
|
|||
|
the number of blanks equals the number of digits in the field. Each zero that
|
|||
|
is suppressed is replaced by a blank. An asterisk replaces zeros with asterisks
|
|||
|
(asterisk protection). Place the asterisk in the farthest right position where
|
|||
|
zero suppression is to stop. Each zero that is suppressed is replaced by an
|
|||
|
asterisk. <div class="note"><span class="notetitle">Note:</span> If your display file was created before Version 2 Release
|
|||
|
1, it is possible that the Edit Word (EDTWRD) keyword will produce different
|
|||
|
output after a recompile.</div>
|
|||
|
</dd>
|
|||
|
<dt class="dlterm">Asterisk</dt>
|
|||
|
<dd>An asterisk preceding a zero is interpreted as representing asterisk protection,
|
|||
|
and in this case, the zero prints as a constant. Any asterisks or zeros to
|
|||
|
the right of the stop-zero-suppression character are constants.</dd>
|
|||
|
<dt class="dlterm">Currency symbol</dt>
|
|||
|
<dd> <p>If you code a currency symbol immediately to the left of the zero
|
|||
|
suppression code, a currency symbol is inserted in the position to the left
|
|||
|
of the first significant digit. It is called the <em>floating-currency symbol</em> when
|
|||
|
used in this manner.</p>
|
|||
|
<p>If you code a currency symbol in the farthest left
|
|||
|
position of the edit word, it is fixed and prints in the same location each
|
|||
|
time. When used in this manner, it is called the <em>fixed-currency symbol</em>.</p>
|
|||
|
<p>The
|
|||
|
currency symbol is not considered a digit replace position. This symbol must
|
|||
|
correspond to the system value QCURSYM.</p>
|
|||
|
</dd>
|
|||
|
<dt class="dlterm">Decimals and commas</dt>
|
|||
|
<dd> <p>Decimals and commas are printed in the same relative positions in
|
|||
|
which they are coded in the edit word unless they are to the left of the first
|
|||
|
significant digit. In that case, they are blanked out or replaced by an asterisk.</p>
|
|||
|
<p>All
|
|||
|
other characters are printed if they are to the right of significant digits
|
|||
|
in the edit word. If they are to the left of the high-order significant digits
|
|||
|
in the edit word, they are blanked out or replaced by asterisks if asterisk
|
|||
|
protection is being used.</p>
|
|||
|
<p>If a constant is to be printed in the left
|
|||
|
most position, the constant must be preceded by a zero and the field length
|
|||
|
increased by one.</p>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
</div>
|
|||
|
<div class="section"><h4 class="sectiontitle">Forming the status of an edit word</h4><p>The following
|
|||
|
characters have special meanings when used in the status of an edit word.</p>
|
|||
|
<dl><dt class="dlterm">Ampersand</dt>
|
|||
|
<dd>Causes a blank in the edited output field. An ampersand cannot be placed
|
|||
|
in the edited output field.</dd>
|
|||
|
<dt class="dlterm">CR or minus symbol</dt>
|
|||
|
<dd>If the sign in the edited output field is plus (+), these positions are
|
|||
|
blanked out. If the sign in the edited output field is minus (-), these positions
|
|||
|
remain undisturbed.</dd>
|
|||
|
</dl>
|
|||
|
</div>
|
|||
|
<div class="section"><h4 class="sectiontitle">Forming the expansion of an edit word</h4><p>The characters
|
|||
|
in the expansion portion of an edit word are always written. The expansion
|
|||
|
cannot contain blanks. If a blank is required in the edited output field,
|
|||
|
specify an ampersand in the body of the edit word.</p>
|
|||
|
</div>
|
|||
|
<div class="section"><h4 class="sectiontitle">Specify a valid edit word</h4><p>Use the following
|
|||
|
rules to specify a valid edit word:</p>
|
|||
|
<ul><li>The EDTWRD keyword is valid for numeric only fields (Y specified in position
|
|||
|
35).</li>
|
|||
|
<li>You cannot specify both EDTWRD and EDTCDE for the same field.</li>
|
|||
|
<li>The DFT and DFTVAL keywords cannot be specified with the EDTWRD keyword.</li>
|
|||
|
<li>Enclose the edit word in single quotation marks.</li>
|
|||
|
<li>The sum of the blanks and stop-zero-suppression characters (digit positions)
|
|||
|
in the edit word must equal the length of the field.</li>
|
|||
|
<li>If the stop-zero-suppression character is the first character in the edit
|
|||
|
word, the sum of the blanks might equal the length of the field or the length
|
|||
|
of the field minus one.</li>
|
|||
|
<li>When you use the floating-currency symbol, the currency symbol is not
|
|||
|
counted as a digit position. For example, if you specify the floating-currency
|
|||
|
symbol for a field with a length of 7 and 2 decimal positions, the edit word
|
|||
|
is: <pre>EDTWRD('____$0.__)</pre>
|
|||
|
<p>where _ represents a blank.</p>
|
|||
|
</li>
|
|||
|
<li>If you want to show a negative sign with a negative number, include a
|
|||
|
sign in the edit word. Use either the minus sign (-) or the letters CR (credit)
|
|||
|
to the right of the last digit replacement character. These print only if
|
|||
|
the number is negative.</li>
|
|||
|
</ul>
|
|||
|
<p>Option indicators are not valid for this keyword.</p>
|
|||
|
<p><a href="#rzakcmstdfedwrd__dfsew">Figure 2</a> shows
|
|||
|
sample edit words with the program value of the field and the display value
|
|||
|
of the field (as edited).</p>
|
|||
|
</div>
|
|||
|
<div class="example"> <div class="fignone" id="rzakcmstdfedwrd__dfsew"><a name="rzakcmstdfedwrd__dfsew"><!-- --></a><span class="figcap">Figure 2. Sample edit words</span><br /><img src="rv2f481.gif" alt="A figure of example edit
words." /><br /></div>
|
|||
|
</div>
|
|||
|
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
|
|||
|
the EDTWRD keyword.</p>
|
|||
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|||
|
00020A FIELDA 7 2 5 2EDTWRD(' $0. ')
|
|||
|
A</pre>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div>
|
|||
|
<div class="familylinks">
|
|||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakcmstkeyent.htm" title="You type the keyword entries that define display files in positions 45 through 80 (functions).">DDS keyword entries for display files (positions 45 through 80)</a></div>
|
|||
|
</div>
|
|||
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|||
|
<div><a href="dfnoy.htm" title="You can only type the numbers 0 through 9, plus (+), minus (-), period (.), comma (,), and space ( ) into the field. You can press any key to leave the field.">Numeric only (Y)</a></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</body>
|
|||
|
</html>
|