126 lines
9.5 KiB
HTML
126 lines
9.5 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="task" />
|
||
|
<meta name="DC.Title" content="Define parameters" />
|
||
|
<meta name="abstract" content="To define a parameter, you must use the PARM statement." />
|
||
|
<meta name="description" content="To define a parameter, you must use the PARM statement." />
|
||
|
<meta name="DC.subject" content="key parameter, defining, prompt, text, defining for parameter, parameter, description, consideration, file, name, using as parameter value, Parameter (PARM) command definition statement, use, PARM (Parameter) command definition statement, PARM (Parameter) statement, Parameter (PARM) statement, restricted value, restricted value for parameter, return value, command definition, return value for parameter, constant value, valid value, determining valid value, valid parameter, valid parameter, value, valid, optional, optional parameter, required parameter, required, required parameter for, optional parameter, number of, values in list, specifying, value length, length returned with value, passing attribute information, passing, attribute information for a parameter, prompt text, prompt text for parameter, prompt text for a parameter" />
|
||
|
<meta name="keywords" content="key parameter, defining, prompt, text, defining for parameter, parameter, description, consideration, file, name, using as parameter value, Parameter (PARM) command definition statement, use, PARM (Parameter) command definition statement, PARM (Parameter) statement, Parameter (PARM) statement, restricted value, restricted value for parameter, return value, command definition, return value for parameter, constant value, valid value, determining valid value, valid parameter, valid parameter, value, valid, optional, optional parameter, required parameter, required, required parameter for, optional parameter, number of, values in list, specifying, value length, length returned with value, passing attribute information, passing, attribute information for a parameter, prompt text, prompt text for parameter, prompt text for a parameter" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="hdfcd.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="nkdpr.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="prtyp.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="lprvl.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="defvl.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="exdpr.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="defslclhll.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="defmlclhll.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="dqnam.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="qnrx.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="defpr" />
|
||
|
<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>Define parameters</title>
|
||
|
</head>
|
||
|
<body id="defpr"><a name="defpr"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Define parameters</h1>
|
||
|
<div><p>To define a parameter, you must use the PARM statement.</p>
|
||
|
<div class="section"> <p>You can define as many as 99 parameters for each command. </p>
|
||
|
<p>On
|
||
|
the PARM statement, you specify the following: </p>
|
||
|
<ul><li>Name of the keyword for the parameter</li>
|
||
|
<li>Whether or not the parameter is a key parameter</li>
|
||
|
<li>Type of parameter value that can be passed</li>
|
||
|
<li>Length of the value</li>
|
||
|
<li>If needed, the default value for the parameter.</li>
|
||
|
</ul>
|
||
|
<p>In addition, you must consider the following information when defining
|
||
|
parameters. (The associated PARM statement parameter is given in parentheses.)
|
||
|
</p>
|
||
|
<ul><li>Whether a value is returned by the command processing program (RTNVAL).
|
||
|
If RTNVAL (*YES) is specified, a return variable must be coded on the command
|
||
|
when it is called, if you want to have the value returned. If no variable
|
||
|
is specified for a RTNVAL(*YES) parameter, a null pointer is passed to the
|
||
|
command processing program.</li>
|
||
|
<li>Whether the parameter is not to appear on the prompt to the user but is
|
||
|
to be passed to the command processing program as a constant (CONSTANT).</li>
|
||
|
<li>Whether the parameter is restricted (RSTD) to specific values (specified
|
||
|
on the VALUES, SPCVAL, or SNGVAL parameter) or can include any value that
|
||
|
matches the parameter type, length, value range, and a specified relationship.</li>
|
||
|
<li>What the specific valid parameter values are (VALUES, SPCVAL, and SNGVAL).</li>
|
||
|
<li>What tests should be performed on the parameter value to determine its
|
||
|
validity (REL and RANGE).</li>
|
||
|
<li>Whether the parameter is optional or required (MIN).</li>
|
||
|
<li>How many values can be specified for a parameter that requires a simple
|
||
|
list (MIN and MAX).</li>
|
||
|
<li>Whether unprintable data (any character with a value of hexadecimal <samp class="codeph">00</samp> through <samp class="codeph">3F</samp> or <samp class="codeph">FF</samp> can
|
||
|
be entered for the parameter value (ALWUNPRT).</li>
|
||
|
<li>Whether a variable name can be entered for the parameter value (ALWVAR).</li>
|
||
|
<li>Whether the value is a program name (PGM).</li>
|
||
|
<li>Whether the value is a data area name (DTAARA).</li>
|
||
|
<li>Whether the value is a file name (FILE).</li>
|
||
|
<li>Whether the value must be the exact length specified (FULL).</li>
|
||
|
<li>Whether the length of the value should be given with the value (VARY).</li>
|
||
|
<li>Whether expressions can be specified for a parameter value (EXPR).</li>
|
||
|
<li>Whether attribute information should be given about the value passed for
|
||
|
the parameter (PASSATR).</li>
|
||
|
<li>Whether to pass a value to the command processing program or validity
|
||
|
checking program if the parameter being defined is not specified (PASSVAL).</li>
|
||
|
<li>Whether the case value is preserved or the case value is converted to
|
||
|
uppercase (CASE).</li>
|
||
|
<li>Whether list within list displacements (LISTDSPL) are 2-byte or 4-byte
|
||
|
binary values.</li>
|
||
|
<li>What the message identifier is or what the prompt text for the parameter
|
||
|
is (PROMPT).</li>
|
||
|
<li>What valid values are shown in the possible choices field on the prompt
|
||
|
display (CHOICE).</li>
|
||
|
<li>Whether the choice values are provided by a program (CHOICEPGM).</li>
|
||
|
<li>Whether prompting for a parameter is controlled by another parameter (PMTCTL).</li>
|
||
|
<li>Whether values for a PMTCTL statement are provided by a program (for parameters
|
||
|
referred to in CTL keywords) (PMTCTLPGM).</li>
|
||
|
<li>Whether the value is to be hidden in the job log or hidden when the command
|
||
|
is being prompted (DSPINPUT).</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="nkdpr.htm">Name the keyword for the parameter</a></strong><br />
|
||
|
The name of the keyword you choose for a parameter should be descriptive of the information being requested in the parameter value.</li>
|
||
|
<li class="ulchildlink"><strong><a href="prtyp.htm">Parameter types</a></strong><br />
|
||
|
This describes parameter types, including parameter types only for IBM-supplied commands.</li>
|
||
|
<li class="ulchildlink"><strong><a href="lprvl.htm">Length of parameter value</a></strong><br />
|
||
|
You can specify a length for parameter values using the LEN parameter.</li>
|
||
|
<li class="ulchildlink"><strong><a href="defvl.htm">Default values</a></strong><br />
|
||
|
If you are defining an optional parameter, you can define a value on the DFT parameter to be used if the user does not enter the parameter value on the command.</li>
|
||
|
<li class="ulchildlink"><strong><a href="exdpr.htm">Example: Define a parameter</a></strong><br />
|
||
|
This example shows how to define a parameter used in calling an application.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="hdfcd.htm" title="To create a command, you must first define the command through command definition statements.">Define a command</a></div>
|
||
|
</div>
|
||
|
<div class="reltasks"><strong>Related tasks</strong><br />
|
||
|
<div><a href="defslclhll.htm" title="This describes the format in which elements in a simple list are passed when a command is run using CL or a high-level language.">Use CL or HLL for simple lists</a></div>
|
||
|
<div><a href="defmlclhll.htm" title="This describes the format in which elements in a mixed list are passed when a command is run using CL or a high-level language.">Use CL or HLL for mixed lists</a></div>
|
||
|
<div><a href="dqnam.htm" title="A qualified name is the name of an object preceded by the name of the library in which the object is stored.">Define a qualified name</a></div>
|
||
|
<div><a href="qnrx.htm" title="This describes the format in a qualified name is passed when a command is run using REXX.">Use REXX for a qualified name</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|