ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/crtedtd.htm

530 lines
20 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Create Edit Description (CRTEDTD)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="CRTEDTD.Top_Of_Page"></a>
<h2>Create Edit Description (CRTEDTD)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#CRTEDTD.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CRTEDTD.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CRTEDTD.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CRTEDTD"></a>
<p>The Create Edit Description (CRTEDTD) command defines an edit mask for the specified edit description and stores it in the QSYS library. As many as five edit descriptions can be defined by the user. A version of each of these edit descriptions is supplied in the QSYS library. More information about the IBM-supplied versions is in the Application Display Programming book, SC41-5715. To create a new version, the IBM-supplied version must first be deleted by the Delete Edit Description (DLTEDTD) command.
</p>
<p>Edit descriptions can be used in data description specifications and high-level language programs to edit numeric fields.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CRTEDTD.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.EDTD"><b>EDTD</b></a></td>
<td valign="top">Edit description</td>
<td valign="top">5, 6, 7, 8, 9</td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.INTMASK"><b>INTMASK</b></a></td>
<td valign="top">Integer mask</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.DECPNT"><b>DECPNT</b></a></td>
<td valign="top">Decimal point character</td>
<td valign="top"><i>Character value</i>, <b><u>'.'</u></b>, *NONE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.FRACMASK"><b>FRACMASK</b></a></td>
<td valign="top">Fraction mask</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.FILLCHAR"><b>FILLCHAR</b></a></td>
<td valign="top">Fill character</td>
<td valign="top"><i>Character value</i>, <b><u>*BLANK</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.CURSYM"><b>CURSYM</b></a></td>
<td valign="top">Currency symbol</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.ZEROBAL"><b>ZEROBAL</b></a></td>
<td valign="top">Edit zero values</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.NEGSTS"><b>NEGSTS</b></a></td>
<td valign="top">Negative status characters</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.POSSTS"><b>POSSTS</b></a></td>
<td valign="top">Positive status characters</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.LFTCNS"><b>LFTCNS</b></a></td>
<td valign="top">Left constant characters</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.RGTCNS"><b>RGTCNS</b></a></td>
<td valign="top">Right constant characters</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.TEXT"><b>TEXT</b></a></td>
<td valign="top">Text 'description'</td>
<td valign="top"><i>Character value</i>, <b><u>*BLANK</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTEDTD.AUT"><b>AUT</b></a></td>
<td valign="top">Authority</td>
<td valign="top"><i>Name</i>, <b><u>*LIBCRTAUT</u></b>, *CHANGE, *ALL, *USE, *EXCLUDE</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CRTEDTD.EDTD"></a>
<h3>Edit description (EDTD)</h3>
<p>Specifies a single-digit code (5, 6, 7, 8, or 9) that identifies the user-defined edit description being created. The actual name of the created object (which is stored in the QSYS library) is <b>QEDIT</b><i>n</i>, where <i>n</i> is the single-digit edit code specified in this parameter.
</p>
<p>This is a required parameter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.INTMASK"></a>
<h3>Integer mask (INTMASK)</h3>
<p>Specifies a character string (mask) that describes the editing of the integer portion of a decimal field. Characters other than a blank, a zero, or an ampersand (&amp;) are handled as constants in the editing process. Blank, zero, and ampersand have the following meanings:
</p>
<ul>
<li>Blank: Each blank is replaced with a fill character or with a digit from the number being edited once zero suppression ends.
</li>
<li>Zero (0): The farthest left zero is a digit replacement character and also ends zero suppression. All other zeros in the integer mask are handled as constants.
</li>
<li>Ampersand (&amp;): Blank substitution.
</li>
</ul>
<p>
<b>Note: </b>You cannot specify both INTMASK(*NONE) and FRACMASK(*NONE) on the CRTEDTD command. Instead, specify blanks for INTMASK and FRACMASK, and specify GENLVL(30) on the Create Printer File (CRTPRTF) or Create Display File (CRTDSPF) command, which allows the file to create, but ignores the edit code keyword.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No editing mask is used on the integer portion of decimal fields.
</dd>
<dt><b><i>'integer-mask'</i></b></dt>
<dd>Specify the character string that is used as the editing mask for the integer portion of a decimal field. A maximum of 31 characters, enclosed in apostrophes, can be used in the integer mask.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.DECPNT"></a>
<h3>Decimal point character (DECPNT)</h3>
<p>Specifies, for decimal fields, a single character used as a decimal point to separate the integer (INTMASK) and fraction (FRACMASK) portions of the edited result. If the field has no decimal places, this character is not used and is not considered in the width of the edited results.
</p>
<p>
<b>Note: </b>If the separator character specified for DECPNT is also used in the INTMASK parameter, it has no special meaning in the integer mask; it is handled only as a constant or as a digit replacement character in the integer mask.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>' . ' (period)</u></b></dt>
<dd>The period (or decimal point) is the separator character. It must be enclosed in apostrophes.
</dd>
<dt><b>*NONE</b></dt>
<dd>No separator character is specified; a decimal point is not needed in the edited result.
</dd>
<dt><b><i>'separator-character'</i></b></dt>
<dd>Specify the separator character, such as the comma (,), that is used as a decimal point. Any alphanumeric or special character can be used, but a special character must be enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.FRACMASK"></a>
<h3>Fraction mask (FRACMASK)</h3>
<p>Specifies a character string (mask) that describes the editing of the fraction portion of a decimal field (to the right of the decimal point). The characters have the same meaning as described for the <b>Integer mask</b> prompt (INTMASK parameter) except that all zeros are handled as constants and blanks are not replaced with a fill character.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No editing mask is used on the fraction portion of decimal fields.
</dd>
<dt><b><i>'fraction-mask'</i></b></dt>
<dd>Specify the character string that is used as the editing mask for the fraction portion of a decimal field. A maximum of 31 characters, enclosed in apostrophes, can be used in the fraction mask.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.FILLCHAR"></a>
<h3>Fill character (FILLCHAR)</h3>
<p>Specifies the character that is used in each position of a result that is zero suppressed. The specified character replaces all leading zeros that are to the left of the first significant digit in the integer mask (or a forced zero).
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*BLANK</u></b></dt>
<dd>The fill character is a blank.
</dd>
<dt><b><i>'fill-character'</i></b></dt>
<dd>Specify the character that is used as the fill character. Any alphanumeric or special character can be used, but a special character must be enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.CURSYM"></a>
<h3>Currency symbol (CURSYM)</h3>
<p>Specifies the character string that is used as the floating currency symbol. The character string specified appears immediately to the left of the first significant digit (or constant). If the first significant digit is a zero, occurring in the position that ended zero suppression, the character string ends in the position occupied by that zero.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No floating currency symbol is specified; none is needed in the edited result.
</dd>
<dt><b><i>'floating-currency-symbol'</i></b></dt>
<dd>Specify the character string that is used as the floating currency symbol for monetary amount fields. A maximum of 15 alphanumeric and special characters, enclosed in apostrophes, can be specified.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.ZEROBAL"></a>
<h3>Edit zero values (ZEROBAL)</h3>
<p>Specifies the editing action for zero values.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>The normal editing rules are followed. (For information on Editing rules, refer to the description of the Create Edit Description (CRTEDTD) command in the CL Reference manual.
</dd>
<dt><b>*NO</b></dt>
<dd>If the field being edited has a value of zero, the entire field (integer, decimal point, or fraction) is replaced by the fill character, including constants in the edit mask.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.NEGSTS"></a>
<h3>Negative status characters (NEGSTS)</h3>
<p>Specifies the character string that immediately follows the body of the edited result if the field is negative. If the field is positive, blanks are substituted for the length of the string, unless a value is also specified for the <b>Positive status characters</b> prompt (POSSTS parameter).
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No character string is specified; blanks are used to the right of the field in the edited result.
</dd>
<dt><b><i>'negative-status-character-string'</i></b></dt>
<dd>Specify the character string that immediately follows the edited field when the field is negative in value. A maximum of 31 characters, enclosed in apostrophes, can be specified as the negative status character string.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.POSSTS"></a>
<h3>Positive status characters (POSSTS)</h3>
<p>Specifies the character string that immediately follows the body of the edited result if the field is positive or zero. If the field is negative, blanks are substituted for the length of the string unless a value is also specified for the <b>Negative status characters</b> prompt (NEGSTS parameter).
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No character string is specified; blanks are used to the right of the field in the edited result.
</dd>
<dt><b><i>'positive-status-character-string'</i></b></dt>
<dd>Specify the character string that immediately follows the edited field when the field is positive in value. A maximum of 31 characters, enclosed in apostrophes, can be specified as the positive status character string.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.LFTCNS"></a>
<h3>Left constant characters (LFTCNS)</h3>
<p>Specifies the character string constant that always appears as the farthest left portion of the edited result.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No constant appears on the left side of edited fields.
</dd>
<dt><b><i>'left-constant'</i></b></dt>
<dd>Specify the character string that always appears on the left side of an edited field. A maximum of 31 characters, enclosed in apostrophes, can be specified.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.RGTCNS"></a>
<h3>Right constant characters (RGTCNS)</h3>
<p>Specifies the character string constant that always appears as the farthest right portion of the edited result.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No constant appears on the right side of edited fields.
</dd>
<dt><b><i>'right-constant'</i></b></dt>
<dd>Specify the character string that always appears on the right side of an edited field. A maximum of 31 characters, enclosed in apostrophes, can be specified.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.TEXT"></a>
<h3>Text 'description' (TEXT)</h3>
<p>Specifies the text that briefly describes the object.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*BLANK</u></b></dt>
<dd>No text is specified.
</dd>
<dt><b><i>'description'</i></b></dt>
<dd>Specify no more than 50 characters of text, enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTEDTD.AUT"></a>
<h3>Authority (AUT)</h3>
<p>Specifies the authority you are giving to users who do not have specific authority for the object, who are not on an authorization list, and whose group profile or supplemental group profiles do not have specific authority for the object.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*LIBCRTAUT</u></b></dt>
<dd>The authority for the object is the same as the create authority for QSYS. The create authority for QSYS can be displayed by using the Display Library Description (DSPLIBD) command. If the create authority is changed with the Change Library (CHGLIB) command, the new authority will not affect existing objects.
</dd>
</dl>
<dl>
<dt><b>*CHANGE</b></dt>
<dd>The user can perform all operations on the object except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
</dd>
</dl>
<dl>
</dl>
<dl>
<dt><b>*ALL</b></dt>
<dd>The user can perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the object.
</dd>
</dl>
<dl>
</dl>
<dl>
<dt><b>*USE</b></dt>
<dd>The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
</dd>
</dl>
<dl>
</dl>
<dl>
<dt><b>*EXCLUDE</b></dt>
<dd>The user cannot access the object.
</dd>
</dl>
<dl>
<dt><b><i>authorization-list-name</i></b></dt>
<dd>Specify the name of an authorization list. Users included on the authorization list are granted authority to the object as specified by the list. The authorization list must exist when the object is created.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTEDTD.COMMAND.EXAMPLES">Examples</a> </h3>
<p>The examples assume the following:
</p>
<dl>
<dt><b>FIELDA</b></dt>
<dd>Six digits (four integer and two decimal positions) with a value of 001234
</dd>
<dt><b>FIELDB</b></dt>
<dd>Same as FIELDA but with a negative value (-001234)
</dd>
<dt><b>FIELDC</b></dt>
<dd>Same as FIELDA but with a zero value (000000)
</dd>
<dt><b>DATE</b></dt>
<dd>Six digits (0 decimal positions) with a value of 091878
<p>The character <b>b</b> is used to represent blank spaces.
</p>
</dd>
</dl>
<p><b>Example 1: Create Edit Description 5</b>
</p>
<p>
<pre>
CRTEDTD EDTD(5) INTMASK(' , , 0') FRACMASK(' ')
NEGSTS('DB ') POSSTS('CREDIT')
LFTCNS('$') RGTCNS(' **')
</pre>
</p>
<dl>
<dt><b>FIELDA</b></dt>
<dd>Logical mask is '$b,bb0.bbDBbbbb b**' for a negative value or '$b,bb0.bb CREDIT b**' for a positive value
<p>Edited result is $bbb12.34CREDITb**
</p>
</dd>
<dt><b>FIELDB</b></dt>
<dd>Same logical mask
<p>Edited result is $bbb12.34DBbbbbb**
</p>
</dd>
<dt><b>FIELDC</b></dt>
<dd>Same logical mask
<p>Edited result is $bbbbb.00CREDITb** or, if ZEROBAL(*NO) had been specified, $bbbbbbbbCREDITb**
</p>
</dd>
</dl>
<p><b>Example 2: Create Edit Description 6</b>
</p>
<p>
<pre>
CRTEDTD EDTD(6) INTMASK(' . 0 ') DECPNT(',')
FRACMASK(' ') CURSYM('DM') NEGSTS('- **')
</pre>
</p>
<dl>
<dt><b>FIELDA</b></dt>
<dd>Logical mask is 'bbb.b0b,bb-b**' with floating DM
<p>Edited result is bbbDM12,34bbbb
</p>
</dd>
<dt><b>FIELDB</b></dt>
<dd>Same logical mask
<p>Edited result is bbbDM12,34-b**
</p>
</dd>
<dt><b>FIELDC</b></dt>
<dd>Same logical mask
<p>Edited result is bbbbDM0,00bbbb or, if ZEROBAL(*NO) had been specified, bbbbbbbbbbbbbb
</p>
</dd>
</dl>
<p><b>Example 3: Create Edit Description 7</b>
</p>
<p>
<pre>
CRTEDTD EDTD(7) INTMASK('0 MONTH DAY YEAR')
LFTCNS('DATE IS ')
</pre>
</p>
<dl>
<dt><b>DATE</b></dt>
<dd>Logical mask is equal to the INTMASK parameter value
<p>Edited result is DATEbISbb9MONTH18DAYb78YEAR
</p>
</dd>
</dl>
<p><b>Example 4: Create Edit Description 9</b>
</p>
<p>
<pre>
CRTEDTD EDTD(9) INTMASK(' , 0') DECPNT('.')
FRACMASK(' ') FILLCHAR('*') NEGSTS(' ERROR **')
</pre>
</p>
<dl>
<dt><b>FIELDA</b></dt>
<dd>Logical mask is 'b,bb0.bbbbbbbbbbb' or 'b,bb0.bbbERRORb**' (Both use the * as the fill character)
<p>Edited result is ***12.34bbbbbbbbb
</p>
</dd>
<dt><b>FIELDB</b></dt>
<dd>Same logical mask
<p>Edited result is ***12.34bERRORb**
</p>
</dd>
<dt><b>FIELDC</b></dt>
<dd>Same logical mask
<p>Edited result is *****.00bbbbbbbbb or, if ZEROBAL(*NO) had been specified, ********bbbbbbbbb
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTEDTD.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF9805</b></dt>
<dd>Object &amp;2 in library &amp;3 destroyed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTEDTD.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>