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

1061 lines
56 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>Element Definition (ELEM)</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="ELEM.Top_Of_Page"></a>
<h2>Element Definition (ELEM)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"></td>
<td valign="top" align="right">
<a href="#ELEM.PARAMETERS.TABLE">Parameters</a><br>
<a href="#ELEM.COMMAND.EXAMPLES">Examples</a><br>
<a href="#ELEM.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="ELEM"></a>
<p>The Element (ELEM) command definition statements are used to define the elements of a mixed list parameter on a command. A list parameter is a parameter that accepts multiple values that are passed together as consecutive values pointed to by a single parameter. The values are preceded by a 2-byte binary value that indicates the number of elements defined for the parameter.
</p>
<p>A list item is the value that represents one value among a group of values organized in a specific order in a list. If all of the list elements are not of the same type, one ELEM statement must be used for each element that appears in the list being defined. If all the elements are of the same type (a simple list), individual ELEM statements are not required. For a simple list, all that is necessary is to specify the number of elements in the list on the <b>Maximum values allowed (MAX)</b> parameter of the PARM statement.
</p>
<p>The order in which the ELEM statements are entered into the source file determines their positional order in the list. The first ELEM statement (for the first list item) must have a statement label that matches the statement label on the <b>Type of value (TYPE)</b> parameter of the PARM or ELEM statements for the same list. The remaining ELEM statements in the list must be unlabeled. Lists of elements having different values can be nested to the depth of three levels, including the highest level. A maximum of 300 elements can be included in one list.
</p>
<p>
<b>Note: </b>The ELEM statement contains certain parameters and predefined values that can be used only when an IBM-supplied command processing program (CPP) is called by the command being defined. Because there are limitations in some high-level languages, these values may not be useful in the definition statements of user-defined commands. If the entire parameter is for IBM-supplied commands only, these parameters and values are identified by the phrase (<i>For IBM-supplied commands)</i> that immediately follows the parameter keyword or the predefined value to which it applies.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="ELEM.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="#ELEM.TYPE"><b>TYPE</b></a></td>
<td valign="top">Type of value</td>
<td valign="top"><i>Simple name</i>, *DEC, *CHAR, *LGL, *NAME, *VARNAME, *INT2, *GENERIC, *INT4, *DATE, *TIME, *ZEROELEM, *HEX, *SNAME, *PNAME, *UINT2, *UINT4, *X, *CNAME</td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.LEN"><b>LEN</b></a></td>
<td valign="top">Value length</td>
<td valign="top">Values (up to 3 repetitions): <i>Integer</i></td>
<td valign="top">Optional, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.CONSTANT"><b>CONSTANT</b></a></td>
<td valign="top">Constant value</td>
<td valign="top"><i>Character value</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.RSTD"><b>RSTD</b></a></td>
<td valign="top">Restricted values</td>
<td valign="top">*YES, <b><u>*NO</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.DFT"><b>DFT</b></a></td>
<td valign="top">Default value</td>
<td valign="top"><i>Character value</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.VALUES"><b>VALUES</b></a></td>
<td valign="top">Valid values</td>
<td valign="top">Values (up to 300 repetitions): <i>Character value</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ELEM.REL"><b>REL</b></a></td>
<td valign="top">Relational expression</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Relational operator</td>
<td valign="top">
*GT, *EQ, *GE, *NL, *LT, *NE, *LE, *NG</td>
</tr>
<tr>
<td valign="top">Element 2: Value</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ELEM.RANGE"><b>RANGE</b></a></td>
<td valign="top">Range of values</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Lower value</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top">Element 2: Upper value</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ELEM.SPCVAL"><b>SPCVAL</b></a></td>
<td valign="top">Special values</td>
<td valign="top">Values (up to 300 repetitions): <i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: From value</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top">Element 2: To replacement value</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ELEM.SNGVAL"><b>SNGVAL</b></a></td>
<td valign="top">Single values</td>
<td valign="top">Values (up to 300 repetitions): <i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: From value</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top">Element 2: To replacement value</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.MIN"><b>MIN</b></a></td>
<td valign="top">Minimum values required</td>
<td valign="top">0-300, <b><u>0</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.MAX"><b>MAX</b></a></td>
<td valign="top">Maximum values allowed</td>
<td valign="top"><i>Integer</i>, <b><u>1</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.ALWUNPRT"><b>ALWUNPRT</b></a></td>
<td valign="top">Allow unprintable characters</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.ALWVAR"><b>ALWVAR</b></a></td>
<td valign="top">Allow variable names</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.PGM"><b>PGM</b></a></td>
<td valign="top">Is ELEM a program</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.DTAARA"><b>DTAARA</b></a></td>
<td valign="top">Is ELEM a data area</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.FILE"><b>FILE</b></a></td>
<td valign="top">If a file parameter, how used</td>
<td valign="top"><b><u>*NO</u></b>, *IN, *OUT, *UPD, *INOUT, *UNSPFD</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.FULL"><b>FULL</b></a></td>
<td valign="top">Full field required</td>
<td valign="top">*YES, <b><u>*NO</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.EXPR"><b>EXPR</b></a></td>
<td valign="top">Value an expression</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ELEM.VARY"><b>VARY</b></a></td>
<td valign="top">Varying length</td>
<td valign="top">Single values: <b><u>*NO</u></b><br>Other values: <i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Return length value</td>
<td valign="top">
*YES</td>
</tr>
<tr>
<td valign="top">Element 2: Value length</td>
<td valign="top">
<b><u>*INT2</u></b>, *INT4</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.PASSATR"><b>PASSATR</b></a></td>
<td valign="top">Pass attribute byte</td>
<td valign="top">*YES, <b><u>*NO</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.CASE"><b>CASE</b></a></td>
<td valign="top">Case of value</td>
<td valign="top"><b><u>*MONO</u></b>, *MIXED</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.CCSID"><b>CCSID</b></a></td>
<td valign="top">CCSID of value</td>
<td valign="top"><b><u>*JOB</u></b>, *UTF16</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.DSPINPUT"><b>DSPINPUT</b></a></td>
<td valign="top">Display input</td>
<td valign="top"><b><u>*YES</u></b>, *PROMPT, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.CHOICE"><b>CHOICE</b></a></td>
<td valign="top">Choice text</td>
<td valign="top"><i>Character value</i>, <b><u>*VALUES</u></b>, *NONE, *PGM</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#ELEM.CHOICEPGM"><b>CHOICEPGM</b></a></td>
<td valign="top">Choice program</td>
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Qualified object name</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Choice program</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#ELEM.INLPMTLEN"><b>INLPMTLEN</b></a></td>
<td valign="top">Initial prompt length</td>
<td valign="top"><b><u>*CALC</u></b>, *PWD, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17, 25, 32, 50, 80, 132, 256, 512</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#ELEM.PROMPT"><b>PROMPT</b></a></td>
<td valign="top">Prompt text or message ID</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="ELEM.TYPE"></a>
<h3>Type of value (TYPE)</h3>
<p>Specifies the type of list item being defined. The element can be an integer, a decimal or logical value, or a quoted or not quoted character string that can be a name, label, date, or time.
</p>
<dl>
<dt><b>*DEC</b></dt>
<dd>The list item is a packed decimal number.
</dd>
<dt><b>*LGL</b></dt>
<dd>The list item is a logical value, either a one ('1') or a zero ('0').
</dd>
<dt><b>*CHAR</b></dt>
<dd>The list item is a character string that can (optionally) be enclosed in apostrophes. If the character string contains any special characters (not including an asterisk (*)), it <i>must</i> be enclosed in apostrophes. The maximum number of characters that can be in the character string is 5000.
</dd>
<dt><b>*NAME</b></dt>
<dd>The list item is a character string that represents a name. The maximum length of the name is 256 characters. The first character must be alphabetic or one of the special characters, $, @, or #. The name can also be a string of characters starting and ending with double quotation marks (") or enclosed in parentheses. If a special value is used (as in *LIBL or *NONE), it should be specified on the <b>Special values (SPCVAL)</b> parameter.
</dd>
<dt><b>*SNAME</b></dt>
<dd>The list item is a character string that represents a name. The maximum length of the name is 256 characters. The first character must be alphabetic or one of the special characters $, @, or #. The remaining characters can be alphanumeric, an underscore, or one of the special characters $, @, or #. The character string can be enclosed in parentheses. If a special value is used (as in *LIBL or *NONE), it must be specified on the <b>Special values (SPCVAL)</b> parameter.
</dd>
<dt><b>*CNAME</b></dt>
<dd>The list item is a character string that represents a name. The maximum length of the name is 256 characters. The first character must be alphabetic or one of the special characters, $, @, or #. If a special value is used (as in *LIBL or *NONE), it must be specified on the <b>Special values (SPCVAL)</b> parameter.
</dd>
<dt><b>*PNAME</b></dt>
<dd>The list item is a character string that represents a path name string. Optionally the path name string may be enclosed in apostrophes. If the path name string contains any special characters (not including an asterisk (*)), it must be enclosed in apostrophes. The maximum length of the path name string is 5000 characters.
</dd>
<dt><b>*GENERIC</b></dt>
<dd>The list item is a character string that represents a generic name. A generic name contains a maximum of 255 characters followed by an asterisk (*) and must conform to the rules for generic names. The name identifies a group of objects whose names all begin with the characters preceding the asterisk. If an asterisk is not included, the system assumes that the generic name is a complete object name.
</dd>
<dt><b>*DATE</b></dt>
<dd>The list item is a character string that represents a date. When entering the command, the year may be specified with either 2 digits or 4 digits. If a 2-digit year is specified, the date is assumed to be in the range of January 1, 1940 through December 31, 2039. If a 4-digit year is specified, the date may be in the range of August 24, 1928 through May 9, 2071. When it is passed to the CPP, it is always passed in the format <i>Cyymmdd</i>, where C = century, yy = year, mm = month, and dd = day. The century digit is set to 0 (zero) for years 19xx, and it is set to 1 (one) for years 20xx. When a date value is specified in this ELEM statement, it must be specified without quotation marks in one of the following formats: <i>mmddyy</i>, <i>mmddyyyy</i>, or <i>Cyymmdd</i>. If the user enters a date when the command is run, it must be specified in the job-date format. The job date separator may be used when the date is entered. If the separator character is used, the date must be enclosed in apostrophes.
</dd>
<dt><b>*TIME</b></dt>
<dd>The list item is a character string that represents a time. It is passed to the command processing program in a 6-byte character string as <i>hhmmss</i>, where hh = hours, mm = minutes, and ss = seconds. Values specified in this statement must be in the format <i>hhmmss</i> When a user types a time in the command at run time, it must be specified in the format <i>hhmmss</i>. The job time separator may be used when the time is entered. If the separator character is used, the time must be enclosed in apostrophes.
</dd>
<dt><b>*HEX</b></dt>
<dd>The list item value is hexadecimal in form. The specified characters must be 0 through F. They are converted to hexadecimal (EBCDIC) characters (2 hex digits per byte), right-justified, and padded with zeros. If the value is enclosed in apostrophes, an even number of digits is required. If the value is not enclosed in apostrophes, the number of digits can be odd or even.
</dd>
<dt><b>*ZEROELEM</b></dt>
<dd>The list item is always considered as a list of zero elements, for which no value can be specified in the command. It is used to prevent a value from being entered for an element that is a list even though the CPP expects one. An element for which *ZEROELEM is specified is not prompted for, although the other elements in the parameter are prompted and are passed to the CPP as a list.
</dd>
<dt><b>*X</b></dt>
<dd>(For IBM-supplied commands) The list item value is a character string, variable name, or numeric value. The value is passed as a numeric value if it contains only digits, a + or - sign, or a decimal point; otherwise, it is passed as a character string.
</dd>
<dt><b>*INT2</b></dt>
<dd>The list item is an integer that is passed as a 2-byte signed binary number.
</dd>
<dt><b>*INT4</b></dt>
<dd>The list item is an integer that is passed as a 4-byte signed binary number.
</dd>
<dt><b>*UINT2</b></dt>
<dd>The list item is an integer that is passed as a 2-byte unsigned binary number.
</dd>
<dt><b>*UINT4</b></dt>
<dd>The list item is an integer that is passed as a 4-byte unsigned binary number.
</dd>
<dt><b>*VARNAME</b></dt>
<dd>(For IBM-supplied commands) The list item value is a CL variable name that is passed as a character string.
</dd>
<dt><b><i>statement-label</i></b></dt>
<dd>The list item accepts a qualified list name or a mixed list of values. The statement label specified here by the TYPE parameter is the statement label that identifies the first of a series of QUAL or ELEM statements that further describe the qualified list name or the mixed list being defined. The label must be the same as the label specified by statement label on the <b>Type of value (TYPE)</b> parameter on the PARM statement for this list.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.LEN"></a>
<h3>Value length (LEN)</h3>
<p>Specifies the length of the list item value that is passed to the command processing program (CPP).
</p>
<p>If *INT2, *INT4, *UINT2, *UINT4, *DATE, *TIME, *ZEROELEM, or statement label is specified on the <b>Type of value (TYPE)</b> parameter, this parameter is not allowed.
</p>
<p>If *DEC is specified on the <b>Type of value (TYPE)</b> parameter, the decimal length is specified in the form (n1 n2), where n1 specifies the total number of digits in the value (including the decimal portion), and n2 specifies the number of allowable decimal digits to the right of the decimal point. (The value for n2 is optional. Zero is assumed if n2 is not entered.)
</p>
<p>If *X is specified for the <b>Type of value (TYPE)</b> parameter, the LEN parameter is used as follows:
</p>
<ul>
<li>For character data, length1 specifies the minimum length to be passed. If a longer value is entered, the entire value is passed.
</li>
<li>For decimal data, length2 and length3 specify the length and decimal positions for a constant value. If a variable is entered, it is passed according to the variable attributes.
</li>
<li>For a logical value, length1 specifies the length of the value, which is always 1.
</li>
</ul>
<p>If TYPE is other than *DEC or *X, the second and third list elements must be omitted and simply the number of characters must be specified.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.CONSTANT"></a>
<h3>Constant value (CONSTANT)</h3>
<p>Specifies that a value is passed to the CPP as a constant for the list item when the command being defined is processed; the element is not to appear externally on the command. If specified, the value must satisfy the requirements specified by the following parameters:
</p>
<ul>
<li>Type of value (TYPE)
</li>
<li>Value length (LEN)
</li>
<li>Valid values (VALUES)
</li>
<li>Relational expression (REL)
</li>
<li>Range of values (RANGE)
</li>
<li>Special values (SPCVAL)
</li>
<li>Full field required (FULL)
</li>
</ul>
<p>If a character constant is specified in this parameter, it can be no longer than 32 characters. This parameter is not valid in the following cases:
</p>
<ul>
<li>If *ZEROELEM is specified for the <b>Type of value (TYPE)</b> parameter.
</li>
<li>If *YES is specified for the <b>Value an expression (EXPR)</b> parameter.
</li>
<li>If the <b>Maximum values allowed (MAX)</b> parameter is specified greater than 1.
</li>
<li>If a value is specified for the <b>Default value (DFT)</b> parameter.
</li>
</ul>
<p>If a constant is specified for the element being defined, no prompt text can be specified for the <b>Prompt text or message ID (PROMPT)</b> parameter. However, the other elements of the list parameter (of which this list item is a part) are still prompted, and their values along with this constant value are still passed to the CPP as a list.
</p>
<p>Variables cannot be coded for this parameter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.RSTD"></a>
<h3>Restricted values (RSTD)</h3>
<p>Specifies whether the value entered for the list item (specified in the ELEM statement) is restricted to only one of the values given in the <b>Valid values (VALUES)</b> parameter, the <b>Special values (SPCVAL)</b> parameter, or the <b>Single values (SNGVAL)</b> parameter; or if the value can be any value that satisfies the requirements specified by the following parameters:
</p>
<ul>
<li>Type of value (TYPE parameter)
</li>
<li>Value length (LEN parameter)
</li>
<li>Relational expression (REL parameter)
</li>
<li>Range of values (RANGE parameter)
</li>
<li>Special values (SPCVAL parameter)
</li>
<li>Single values (SNGVAL parameter)
</li>
<li>Full field required (FULL parameter)
</li>
</ul>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The value entered for the list item defined by this ELEM statement can be anything that matches the requirements specified by the following parameters:
<ul>
<li>Type of value (TYPE parameter)
</li>
<li>Value length (LEN parameter)
</li>
<li>Relational expression (REL parameter)
</li>
<li>Range of values (RANGE parameter)
</li>
<li>Special values (SPCVAL parameter)
</li>
<li>Single values (SNGVAL parameter)
</li>
<li>Full field required (FULL parameter)
</li>
</ul>
</dd>
<dt><b>*YES</b></dt>
<dd>The value entered for the list item in this ELEM statement is restricted to one of the values in the <b>Valid values (VALUES)</b> parameter, or to one of the from-values in the <b>Special values (SPCVAL)</b> parameter, or the <b>Single values (SNGVAL)</b> parameter. *YES cannot be specified if a statement label or *ZEROELEM is specified on the <b>Type of value (TYPE)</b> parameter.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.DFT"></a>
<h3>Default value (DFT)</h3>
<p>Specifies the default value that is assigned to the list item if the user does not specify a value. That is, the default value is used as the value of the list item if the user omits the parameter that represents this list item, or specifies *N for the element, while coding or entering the command. The default value must satisfy one of the following:
</p>
<ul>
<li>It must match the element requirements specified by the following parameters:
<ul>
<li>Type of value (TYPE parameter)
</li>
<li>Value length (LEN parameter)
</li>
<li>Relational expression (REL parameter)
</li>
<li>Range of values (RANGE parameter)
</li>
<li>Full field required (FULL parameter)
</li>
</ul>
</li>
<li>It must be one of the from-values in the <b>Special values (SPCVAL)</b> parameter, or the <b>Single values (SNGVAL)</b> parameter.
</li>
<li>If the default is a character constant, it can have no more than 32 characters.
</li>
<li>If *YES is specified on the <b>Restricted values (RSTD)</b> parameter, it must be in the list of values in the <b>Valid values (VALUES)</b> parameter, or in the list of from-values of the <b>Special values (SPCVAL)</b> parameter, or the <b>Single values (SNGVAL)</b> parameter.
</li>
<li>If this ELEM statement itself defines a list, the default value must be specified in the <b>Single values (SNGVAL)</b> parameter.
</li>
</ul>
<p>This parameter is valid only if the <b>Minimum values required (MIN)</b> parameter is 0, which means the element defined by this ELEM statement for this list is optional. This parameter is not allowed if the <b>Constant value (CONSTANT)</b> parameter is specified. A default cannot be specified if *ZEROELEM is specified for the <b>Type of value (TYPE)</b> parameter; in that case, an assumed default is passed.
</p>
<p>An <i>assumed</i> default value is not displayed by the command prompt; a blank input field is shown instead. If a default is specified in this parameter, it is displayed by the prompt exactly as specified.
</p>
<dl>
<dt><b><i>value</i></b></dt>
<dd>Specify the default value that meets the specified requirements or that is one of the values specified in the <b>Valid values (VALUES)</b> parameter, the <b>Special values (SPCVAL)</b> parameter, or the <b>Single values (SNGVAL)</b> parameter.
<p>Variables cannot be coded for this value.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.VALUES"></a>
<h3>Valid values (VALUES)</h3>
<p>Specifies a list of up to 300 constants (fixed values) from which one constant can be specified as the value of the list item. This parameter is valid only if all of the following are true:
</p>
<ul>
<li>*YES is specified for the <b>Restricted values (RSTD)</b> parameter.
</li>
<li>Both the <b>Range of values (RANGE)</b> parameter and the <b>Relational expression (REL)</b> parameter are <i>not</i> specified.
</li>
<li>Each constant matches the attributes specified by the following parameters:
<ul>
<li>Type of value (TYPE parameter)
</li>
<li>Value length (LEN parameter)
</li>
<li>Full field required (FULL parameter)
</li>
</ul>
</li>
</ul>
<p>Character constants specified in this parameter can be no longer than 32 characters. Specify up to 300 constants that can be specified as the value of the list item. This parameter is not valid if a statement label or *ZEROELEM is specified for the <b>Type of value (TYPE)</b> parameter;
</p>
<p>If this ELEM statement is defining the first element in a list, the value specified for this parameter cannot be the same as the value specified in the <b>Single values (SNGVAL)</b> parameter on either the PARM or ELEM statement that points to this ELEM statement.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.REL"></a>
<h3>Relational expression (REL)</h3>
<p>Specifies the relationship between the list item value and the value of another parameter or constant. The value associated with the referred to keyword is the value passed to the CPP, not the user-specified value. To specify the relationship, enter one of the following relational operators followed by a constant or the value of another parameter.
</p>
<dl>
<dt><b>*LT</b></dt>
<dd>less than
</dd>
<dt><b>*LE</b></dt>
<dd>less than or equal to
</dd>
<dt><b>*EQ</b></dt>
<dd>equal to
</dd>
<dt><b>*GE</b></dt>
<dd>greater than or equal to
</dd>
<dt><b>*GT</b></dt>
<dd>greater than
</dd>
<dt><b>*NL</b></dt>
<dd>not less than
</dd>
<dt><b>*NE</b></dt>
<dd>not equal to
</dd>
<dt><b>*NG</b></dt>
<dd>not greater than
</dd>
</dl>
<p>This parameter is not valid if *LGL, *VARNAME, *ZEROELEM, or a statement label is specified for the <b>Type of value (TYPE)</b> parameter, or if either the <b>Range of values (RANGE)</b> parameter or the <b>Valid values (VALUES)</b> parameter is specified. If *CHAR (character type) is specified by the <b>Type of value (TYPE)</b> parameter, the EBCDIC value of the character string is used as an unsigned integer in the comparison. If a character constant is specified in this parameter, it can be no longer than 32 characters.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.RANGE"></a>
<h3>Range of values (RANGE)</h3>
<p>Specifies the range, or the limits, for the value of the list item. The list item value must be greater than or equal to the lower limit value specified, and it must be less than or equal to the upper limit value specified. The value tested is the value sent to the CPP, not the user-specified value.
</p>
<p>For nonnumeric data types, such as *CHAR, the range of values and the data specified will be right-justified and padded on the left with blanks. A numeric range should not be used to define an interval for nonnumeric data unless leading zeros are specified or the data is only 1 character in length.
</p>
<p>This parameter is not valid if either the <b>Relational expression (REL)</b> parameter or the <b>Valid values (VALUES)</b> parameter is specified, or if *LGL, *VARNAME, *ZEROELEM, or statement label is specified on the <b>Type of value (TYPE)</b> parameter. Character constants specified in this parameter can be no longer than 32 characters.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.SPCVAL"></a>
<h3>Special values (SPCVAL)</h3>
<p>Specifies a list of up to 300 entries that define special values that can be entered for the element defined by this ELEM statement. Each entry specifies a character string (from value) that can be entered even though it may not meet all validity checking requirements. If the entered character string matches the from-value of one of the entries, and the to-value is specified, the string is replaced with the to-value and is then passed to the command processing program (CPP) without further checking. If the to-value is omitted, the from-value is passed to the CPP. This parameter is not valid if a statement label or *ZEROELEM is specified for the <b>Type of value (TYPE)</b> parameter.
</p>
<p>If a to-value of *CURLIB is specified, the name of the current library is passed to the CPP rather than the value *CURLIB. If the from-value is *CURLIB and no to-value is specified, or if the to-value is *CURLIB and it is enclosed in apostrophes, the value *CURLIB is passed to the CPP.
</p>
<p>The from-value is a character string, but the to-value can be anything that is passable. However, if *DATE is specified for the <b>Type of value (TYPE)</b> parameter, the to-value must be specified not quoted in one of the following formats: <i>mmddyy</i>, <i>mmddyyyy</i>, or <i>cyymmdd.</i>. If a CL variable is used for the from-value, its type must be *CHAR. If this ELEM statement is defining the first element in a list, the value specified for the from-value cannot be the same as the value specified in the <b>Single values (SNGVAL)</b> parameter on either the PARM or ELEM statement that points to this ELEM statement.
</p>
<p>The to-value must be no longer than is specified on the <b>Value length (LEN)</b> parameter; and, if *DEC, *INT2, *INT4, *UINT2 or *UINT4 is specified for the <b>Type of value (TYPE)</b> parameter, the type of the to-value must be the same. If a character type (such as *CHAR, *LGL, or *DATE) is specified for the <b>Type of value (TYPE)</b> parameter, the to-value must be a character string. Character constants specified in this parameter can be no longer than 32 characters. If a to-value is not specified, the from-value must be passable.
</p>
<p>Variables cannot be coded for this element.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.SNGVAL"></a>
<h3>Single values (SNGVAL)</h3>
<p>Specifies a list of up to 300 single values that can be specified for an element being defined as a statement label, or that is to have two or more list items in its nested list (defined by the <b>Maximum values allowed (MAX)</b> parameter). Any one of the single values can be used instead of a nested list of values or a qualified name that the element is defined to accept. Each entry specifies a character string (from-value) that can be entered. If an entered character string matches the from-value of one of the entries and the to-value is specified, the data is replaced with the to-value and is then passed to the command processing program (CPP) without further checking. If the to-value is omitted, the from-value is passed to the CPP. If this ELEM statement is defining the first element in a list, the value specified for the from-value cannot be the same as the value specified in the <b>Single values (SNGVAL)</b> parameter on either the PARM or ELEM statement that points to this ELEM statement.
</p>
<p>The to-value (or the from-value, if the to-value is omitted) must be passable, as specified in the <b>Special values (SPCVAL)</b> parameter. Character constants specified in this parameter can be no longer than 32 characters. This parameter can be specified only if the <b>Maximum values allowed (MAX)</b> parameter is greater than one or if a statement label is specified for the <b>Type of value (TYPE)</b> parameter. It is not valid if *ZEROELEM is specified for the <b>Type of value (TYPE)</b> parameter. Each single value can only substitute for a list of values or a qualified name; it cannot be a list item or qualifier. It is passed as the first element of the list.
</p>
<p>If a to-value of *CURLIB is specified, the name of the current library is passed to the CPP rather than the value *CURLIB. If the from-value is *CURLIB and no to-value is specified, or if the to-value is *CURLIB and it is enclosed in apostrophes, the value *CURLIB is passed to the CPP.
</p>
<p>Variables cannot be coded for this element.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.MIN"></a>
<h3>Minimum values required (MIN)</h3>
<p>Specifies the minimum number of values that must be entered for the element being defined. For an element that does not allow multiple like values, only zero (0) for optional and one (1) for required can be specified as the minimum number of values.
</p>
<p>For an element that allows multiple like values (because a value greater than one is specified in the <b>Maximum values allowed (MAX)</b> parameter), zero (0) indicates that no values must be entered; therefore, it is an <i>optional</i> element. A value of one (1) or greater than one indicates the minimum number of values that must be entered for the element, and therefore it is a <i>required</i> element. The value specified for this parameter cannot exceed the value specified for the <b>Maximum values allowed (MAX)</b> parameter. The number specified tells how many list items are required in another list. If this parameter is not specified, zero (0) is assumed, which means that the element is optional.
</p>
<dl>
<dt><b><u>0</u></b></dt>
<dd>The list item is optional; it does not have to be entered.
</dd>
<dt><b><i>minimum-number</i></b></dt>
<dd>Specify the minimum number of elements that must be specified in the nested list. If 1 is assigned as the value, it specifies that one value is required for the element. If a number greater than 1 is specified, the element contains a list that must have at least as many elements as the number specified.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.MAX"></a>
<h3>Maximum values allowed (MAX)</h3>
<p>Specifies, if this ELEM statement is defining a simple list item, the maximum number of elements that this list item can have in its nested list. If a value greater than 1 is specified, the element is capable of accepting multiple like values (that is, a simple nested list). All values entered for this element (at the time the command is run) must satisfy the validity checking requirements specified by the other parameter values on this ELEM statement.
</p>
<p>
<b>Note: </b>The values for a nested list are passed consecutively, preceded by a 2-byte binary value that indicates the number of values entered in the list item by the user. CL programs do not support the handling of binary values in variables.
</p>
<dl>
<dt><b><u>1</u></b></dt>
<dd>The list item accepts only one value; there is no nested list.
</dd>
<dt><b><i>maximum-number</i></b></dt>
<dd>Specify the maximum number of elements that the list item can accept. The specified maximum must be greater than or equal to the value specified in the <b>Minimum values required (MIN)</b> parameter and less than or equal to 300. If the maximum is greater than 1 and a statement label that identifies a QUAL statement or another ELEM statement is not specified for the <b>Type of value (TYPE)</b> parameter, the parameter, which is also an element, is a simple list of like values (that is, each element in the list has the same requirements, such as type and length). If a statement label is specified for the <b>Type of value (TYPE)</b> parameter, and it points to the label of a QUAL statement or another ELEM statement, this parameter should only be specified greater than 1 if a list of lists or a list of qualified names is to be accepted. A maximum greater than 1 is not valid if the <b>Constant value (CONSTANT)</b> parameter is also specified.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.ALWUNPRT"></a>
<h3>Allow unprintable characters (ALWUNPRT)</h3>
<p>Specifies whether this ELEM statement should accept the hexadecimal characters above X'FF' and those in the range of X'00' to X'3F'. This parameter is valid only if *CHAR or *X is specified for the <b>Type of value (TYPE)</b> parameter.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>Any characters can be sent to the display or printer.
</dd>
<dt><b>*NO</b></dt>
<dd>Unprintable characters cannot be passed to the command processing program.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.ALWVAR"></a>
<h3>Allow variable names (ALWVAR)</h3>
<p>Specifies whether variable names are allowed for the element. *NO is not allowed if *VARNAME, *ZEROELEM, *NULL, or a statement label is specified for the <b>Type of value (TYPE)</b> parameter.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>Variable names can be used for the element.
</dd>
<dt><b>*NO</b></dt>
<dd>Variable names cannot be used for the element.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.PGM"></a>
<h3>Is ELEM a program (PGM)</h3>
<p>Specifies whether this element is a program name. *YES is valid only if a statement label, *CHAR, *NAME, *SNAME, *CNAME, or *GENERIC is specified for the <b>Type of value (TYPE)</b> parameter. The specification of *YES on this parameter does not have any effect on the element being defined by the ELEM statement; it only indicates to the compiler that the value for this element is a program name. This information is stored so that it can be included in the output of the Display Program References (DSPPGMREF) command.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The element (defined in this ELEM statement) is not a program name.
</dd>
<dt><b>*YES</b></dt>
<dd>The element is a program name.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.DTAARA"></a>
<h3>Is ELEM a data area (DTAARA)</h3>
<p>Specifies whether the element is a data area name. *YES is valid only if a statement label, *CHAR, *NAME, *SNAME, *CNAME, or *GENERIC is specified for the <b>Type of value (TYPE)</b> parameter. The specification of *YES on this parameter does not have any effect on the element being defined by the ELEM statement; it only indicates to the compiler that the value for this element is a data area. This information is stored so that it can be included in the output of the Display Program References (DSPPGMREF) command.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The element (defined in this ELEM statement) is not a data area name.
</dd>
<dt><b>*YES</b></dt>
<dd>The element is a data area name.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.FILE"></a>
<h3>If a file parameter, how used (FILE)</h3>
<p>Specifies whether if the list item is a file name and the expected use of the file. The element can be specified as the name of a file that has a specific use so that, at compile time, the names can be used to get file reference information about where the files are used. This parameter is valid only if a statement label, *CHAR, *NAME, *SNAME, *CNAME, or *GENERIC value is specified for the <b>Type of value (TYPE)</b> parameter. The specification in this parameter does not have any effect on the list item being defined by the ELEM statement; it only indicates to the compiler that the value for this element is a file name and what type of file it is. This information is stored so that it can be included in the output of the DSPPGMREF (Display Program References) command. One of the following types of files can be specified:
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The list item (defined in this ELEM statement) is not a file name.
</dd>
<dt><b>*IN</b></dt>
<dd>The list item is an input file name.
</dd>
<dt><b>*OUT</b></dt>
<dd>The list item is an output file name.
</dd>
<dt><b>*UPD</b></dt>
<dd>The list item is an update file name.
</dd>
<dt><b>*INOUT</b></dt>
<dd>The list item value is the name of a file that is to be used for both input and output.
</dd>
<dt><b>*UNSPFD</b></dt>
<dd>The list item value is the name of a file, but its use cannot be specified.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.FULL"></a>
<h3>Full field required (FULL)</h3>
<p>Specifies whether the number of characters in the list item must be exactly the same as the number specified in the <b>Value length (LEN)</b> parameter (if specified) or its default length (if LEN is not specified).
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The number of characters in the list item can be less than that specified by the <b>Value length (LEN)</b> parameter.
</dd>
<dt><b>*YES</b></dt>
<dd>The number of characters in the list item must equal the number specified by the <b>Value length (LEN)</b> parameter, or the default length for that type. The exact length is valid only for the following types on the <b>Type of value (TYPE)</b> parameter: *LGL, *CHAR, *NAME, *SNAME, *CNAME, *GENERIC, *VARNAME, and *HEX.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.EXPR"></a>
<h3>Value an expression (EXPR)</h3>
<p>Specifies whether the element can accept an expression containing a character concatenation.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The element value cannot be a concatenation expression.
</dd>
<dt><b>*YES</b></dt>
<dd>The element value can be a concatenation expression. *YES is not valid if a value is specified for the <b>Constant value (CONSTANT)</b> parameter.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.VARY"></a>
<h3>Varying length (VARY)</h3>
<p>Specifies whether the list item value that is passed to the CPP is preceded by a length value that indicates the number of characters entered for the element's value.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The element value is not preceded by a length value.
</dd>
</dl>
<p><b>Element 1: Return length value</b>
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The element value passed to the CPP is preceded by a field that indicates the number of characters actually specified for the parameter. *YES is valid only for the following parameter types: *CHAR, *NAME, *SNAME, *CNAME, *PNAME, *GENERIC, *LGL, and *VARNAME. *YES must be specified if PASSATR(*YES) and RTNVAL(*YES) are specified.
<p>
<b>Note: </b>The length value is the actual number of characters entered for the command parameter with trailing blanks removed. The length value passed may be different than the defined parameter length or the declared variable length. The length of the field containing the character string data is determined by the defined length for the parameter or the declared LEN for CL Program variables. The length value defines how many characters in the character string data field were actually entered for the command parameter.
</p>
</dd>
</dl>
<p><b>Element 2: Value length</b>
</p>
<dl>
<dt><b><u>*INT2</u></b></dt>
<dd>The element value is an integer passed as a 2-byte signed binary number.
</dd>
<dt><b>*INT4</b></dt>
<dd>The element value is an integer passed as a 4-byte signed binary number.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.PASSATR"></a>
<h3>Pass attribute byte (PASSATR)</h3>
<p>Specifies whether an attribute byte is to be passed to the command processing program (CPP) with the list item data. This parameter is not valid if a statement label or *ZEROELEM is specified for the <b>Type of value (TYPE)</b> parameter.
</p>
<p>The attribute byte precedes the list item data. If the list item allows multiple values to be specified, an attribute byte precedes each value.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>No attribute byte is passed with the list item.
</dd>
<dt><b>*YES</b></dt>
<dd>An attribute byte is passed with the list item.
<p>The attribute byte has two fields:
</p>
<ol>
<li>The leftmost bit of the attribute byte indicates whether or not a value was specified. If the leftmost bit is '0'B, the value passed to the command processing program is a default value and was not specified in the command string. If the leftmost bit is '1'B, the value passed to the command processing program was specified in the command string.
</li>
<li>The remaining seven bits describe the value passed to the command processing program when *CHAR is specified for the <b>Type of value (TYPE)</b> parameter.
<p>
<pre>
Attribute Description
---------- --------------------------------------
'0000010'B Meets *NAME rules, like <b>A_B</b>
'0000100'B Meets *GENERIC rules, like <b>AB*</b>
'1000101'B Quoted character string, like <b>'A B'</b>
'0000101'B Unquoted character string, like <b>5A</b>
'1001000'B Logical constant, <b>'0'</b> or <b>'1'</b>
'0001100'B Hexadecimal value, like <b>X'C1C2'</b>
'0100001'B Unsigned numeric value, like <b>5</b>
'0101001'B Unsigned numeric with decimal point,
like <b>5.2</b>
'0110001'B Signed numeric value, like <b>-5</b>
'0111001'B Signed numeric with decimal point,
like <b>-5.2</b>
</pre>
</p>
</li>
</ol>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.CASE"></a>
<h3>Case of value (CASE)</h3>
<p>Specifies whether the value that is passed to the CPP is changed from lowercase to uppercase, or is preserved in the case specified on for the command parameter.
</p>
<dl>
<dt><b><u>*MONO</u></b></dt>
<dd>The element value is changed from lowercase to uppercase. Parameters enclosed with apostrophes preserve the case whether or not this value is specified.
</dd>
<dt><b>*MIXED</b></dt>
<dd>The element value is preserved in the case specified on the command parameter. The value can be specified only for *CHAR and *PNAME parameter types.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.CCSID"></a>
<h3>CCSID of value (CCSID)</h3>
<p>Specifies the coded character set identifier (CCSID) to use when passing the element value.
</p>
<dl>
<dt><b><u>*JOB</u></b></dt>
<dd>If the command string was originally in Unicode, the value will be converted to the job CCSID. If the original command string was not in Unicode, the job CCSID is assumed and no conversion is done.
</dd>
<dt><b>*UTF16</b></dt>
<dd>The element value is converted to UTF16. If the original input was not in Unicode it is assumed to be in the job CCSID. The value can be specified only for *CHAR and *PNAME element types.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.DSPINPUT"></a>
<h3>Display input (DSPINPUT)</h3>
<p>Identifies if the keyword value is to be shown in the job log or in a prompt display.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>The default response, *YES, indicates that the parameter value will be shown on the prompt display and in the job log.
</dd>
<dt><b>*PROMPT</b></dt>
<dd>The response *PROMPT indicates that the parameter value will be shown on the prompt display but not in the job log.
</dd>
<dt><b>*NO</b></dt>
<dd>The response *NO indicates that the parameter values will not be shown on either the prompt display or in the job log.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.CHOICE"></a>
<h3>Choice text (CHOICE)</h3>
<p>Specifies the choices text that is displayed to the right of the input field on the prompt screen. Up to 30 characters of text can be displayed.
</p>
<dl>
<dt><b><u>*VALUES</u></b></dt>
<dd>The choices text is generated based on the values specified for the TYPE, RSTD, RANGE, SNGVAL, SPCVAL, and VALUES parameters. If constants are specified for the RANGE parameter, the choices text begins with the minimum value and the maximum value separated by a hyphen. If RANGE is not specified with constants as the minimum and maximum values, and RSTD(*NO) is specified, the choices text begins with a short description of the parameter type based on the value specified for the TYPE parameter. Values specified for the SNGVAL parameter are added to the choices text, in the order the values are defined in the command definition source and separated by a comma and a blank. The last entries added to the choices text are values specified for the SPCVAL or VALUES parameter, in the order the values are defined in the command definition source and separated by a comma and a blank. If there are too many values to fit in 30 characters, the last value is followed by three periods.
<p>The following are examples of possible choices text generated by CHOICE(*VALUES):
</p>
<ul>
<li>If TYPE(*DEC) and RANGE(1.0 999.9) and SPCVAL((*NOMAX -1)) are specified, the choices text will be:
<p>
<pre>
1.0-999.9, *NOMAX
</pre>
</p>
</li>
<li>If TYPE(*NAME) and RSTD(*NO) and SNGVAL(*ALL) and SPCVAL(*LIBL *CURLIB) are specified, the choices text will be:
<p>
<pre>
Name, *ALL, *LIBL, *CURLIB
</pre>
</p>
</li>
<li>If RSTD(*YES) and SNGVAL(*ALL) and SPCVAL(*ALRTBL *BNDDIR *CHTFMT *CLD *CLS *CMD) are specified, the choices text will be:
<p>
<pre>
*ALL, *ALRTBL, *BNDDIR...
</pre>
</p>
</li>
</ul>
</dd>
<dt><b>*NONE</b></dt>
<dd>No values are displayed.
</dd>
<dt><b>*PGM</b></dt>
<dd>A program that is called determines the values that are displayed. The program that is called is identified in <b>Choice program (CHOICEPGM)</b> parameter of the PARM statement.
</dd>
<dt><b><i>message-identifier</i></b></dt>
<dd>Specify the message ID of the message used to retrieve the message containing the text for the possible values field. The message file specified on the <b>Message file for prompt text (PMTFILE)</b> parameter of the Create Command (CRTCMD) command is used to find the message.
</dd>
<dt><b><i>'choices-text'</i></b></dt>
<dd>Specify no more than 30 characters, enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.CHOICEPGM"></a>
<h3>Choice program (CHOICEPGM)</h3>
<p>Specifies the program to be called during command prompting to fill in the possible choices text and the permissible values. This parameter must be specified if *PGM is specified on the <b>Choice text (CHOICE)</b> parameter and may not be specified otherwise.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No program is identified to fill in the possible choices text and permissible values.
</dd>
</dl>
<p><b>Qualifier 1: Choice program</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specifies the name of the program to be called during prompting to fill in the possible choices text or permissible values. If an exception occurs when the program is called, no possible choices text is left blank, and the list of permissible values is taken from the command.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is used to locate the program. If no library is specified as the current library for the job, QGPL is used.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library where the program is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.INLPMTLEN"></a>
<h3>Initial prompt length (INLPMTLEN)</h3>
<p>Specifies the length of the input field initially displayed for the element when the command is prompted. The user can extend the field to a maximum length of 512 bytes by entering an ampersand (&amp;) in the first position of the field, followed by a blank. INLPMTLEN is valid only if TYPE is specified as *CHAR, *NAME, *SNAME, *CNAME, *PNAME, *GENERIC, or *HEX. If FULL(*YES), RSTD(*YES), or CONSTANT are specified, INLPMTLEN(*CALC) must be specified or defaulted.
</p>
<dl>
<dt><b><u>*CALC</u></b></dt>
<dd>The prompter will determine the length of the prompt field based on the type and length of the parameter.
</dd>
<dt><b>*PWD</b></dt>
<dd>If the current value of system value QPWDLVL is '0' or '1', the prompt field will be 10 bytes long. Otherwise, the length of the prompt field will be determined by the length of the parameter. INLPMTLEN(*PWD) is valid only if TYPE is specified as *CHAR, *NAME, *SNAME, *PNAME, or *CNAME.
</dd>
<dt><b><i>initial-prompt-length</i></b></dt>
<dd>Specify the initial length in bytes. Valid values are 1-12, 17, 25, 32, 50, 80, 132, 256, and 512.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ELEM.PROMPT"></a>
<h3>Prompt text or message ID (PROMPT)</h3>
<p>Specifies the prompt text, if any, is that used for the list item (defined in this ELEM statement). The prompt text gives a short description of the element which appears next to the element input field when the command is prompted. Prompt text cannot be specified if *ZEROELEM is specified for the <b>Type of value (TYPE)</b> parameter, or if a constant value is specified for the <b>Constant value (CONSTANT)</b> parameter.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No prompt text is displayed for the list item defined by this ELEM statement. This list item is still prompted by an input field, but no text is displayed with it.
</dd>
<dt><b><i>message-identifier</i></b></dt>
<dd>Specify the message identifier that specifies the message containing the prompt text of up to 30 characters that is displayed when the program is prompting for the list item. If a message having the specified identifier cannot be found in the message file specified in the <b>Message file for prompt text (PMTFILE)</b> parameter of the Create Command (CRTCMD) command, the message identifier itself is used as the prompt text.
</dd>
<dt><b><i>'prompt-text'</i></b></dt>
<dd>Specify the prompt text that is displayed when the program is prompting for the list item. The text must be a character string of no more than 30 characters, enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ELEM.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Define a Parameter with Two Different Types of Elements</b>
</p>
<p>
<pre>
PARM KWD(JOBDESC) TYPE(L1) MIN(1)
L1: ELEM TYPE(*NAME) LEN(10) MIN(1)
ELEM TYPE(*DEC) LEN(2) MIN(1) REL(*LE 60)
</pre>
</p>
<p>The parameter named JOBDESC is required and has two elements which must both be specified. The first element is a ten-character name, and the second element is a 2-digit number that is less than or equal to 60.
</p>
<p><b>Example 2: Define a Parameter with Similar Elements</b>
</p>
<p>
<pre>
PARM KWD(RANGE) TYPE(L1) MIN( DFT(*SAME) +
SNGVAL((*SAME 101))
L1: ELEM TYPE(*DEC) MIN(1) REL(*LE 100)
ELEM TYPE(*DEC) MIN(1) REL(*LE 100)
</pre>
</p>
<p>The parameter named RANGE can be omitted, but, if present, it must be a list of two numbers, neither of which can be greater than 100. To allow the command processing program to determine whether the value passed is a user-specified value or the *SAME single value, *SAME is mapped to 101 which is outside the normal range of values being checked for.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ELEM.ERROR.MESSAGES">Error messages</a> </h3>
<p>None
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ELEM.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>