ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/pmtpc.htm

103 lines
6.2 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="concept" />
<meta name="DC.Title" content="Possible choices and values" />
<meta name="abstract" content="This describes how choices and values for parameters are defined." />
<meta name="description" content="This describes how choices and values for parameters are defined." />
<meta name="DC.subject" content="parameter, possible choice and value, defining, command, choice for parameter, value" />
<meta name="keywords" content="parameter, possible choice and value, defining, command, choice for parameter, value" />
<meta name="DC.Relation" scheme="URI" content="dflst.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="pmtpc" />
<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>Possible choices and values</title>
</head>
<body id="pmtpc"><a name="pmtpc"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Possible choices and values</h1>
<div><p>This describes how choices and values for parameters are defined.</p>
<p>The prompter will display possible choices for parameters to the right
of the input field on the prompt displays. The text to be displayed can be
created automatically, specified in the command definition source, or created
dynamically by an exit program. Text describing possible choices can be defined
for any PARM, ELEM, or QUAL statement, but because of limitations in the display
format, the text is displayed only for values with a field length of 12 or
less, 10 or less for all but the first qualifier in a group.</p>
<p>The text for possible choices is defined by the CHOICE parameter. The
default for this parameter is *VALUES, which indicates that the text is to
be created automatically from the values specified for the TYPE, RANGE, VALUES,
SPCVAL, and SNGVAL keywords. The text is limited to 30 characters; if there
are more values than can fit in this size, an ellipsis (...) is added to the
end of the text to indicate that it is incomplete.</p>
<p>You can specify that no possible choices should be displayed (*NONE), or
you can specify either a text string to be displayed or the ID of a text message
which is retrieved from the message file specified in the PMTFILE parameter
of the CRTCMD command.</p>
<p>You can also specify that an exit program to run during prompting to provide
the possible choices text. This could be done if, for example, you want to
show the user a list of objects that currently exist on the system. The same
exit program can be used to provide the list of permissible values shown on
the Specify Value for Parameter display. To specify an exit program, specify
*PGM for the CHOICE parameter, and the qualified name of the exit program
in the CHOICEPGM parameter on the PARM, ELEM, or QUAL statement.</p>
<p>The exit program must accept the following two parameters:</p>
<ul><li><strong>Parameter 1</strong>: A 21-byte field that is passed by the prompter to
the choice program, and contains the following: <dl><dt><strong>Positions</strong></dt>
<dd><strong>Descriptions</strong></dd>
<dt class="dlterm">1-10</dt>
<dd>Command name. Specifies the name of the command being processed that
causes the program to run.</dd>
<dt class="dlterm">11-20</dt>
<dd>Keyword name. Specifies the keyword for which possible choices or permissible
values are being requested.</dd>
<dt class="dlterm">21</dt>
<dd>C or P character indicating the type of data being requested by prompter.
The letter C indicates that this is a 30-byte field into which the text for
possible choices is to be returned. The letter P indicates that this a 2000-byte
field into which a permissible values list is to be returned.</dd>
</dl>
</li>
<li><strong>Parameter 2</strong>: A 30- or 2000-byte field for returning one of the
following: <ul><li>If C is in byte 21 of the first parameter, this indicates that the text
for possible choices will return. Additionally, this is a 30-byte field where
the program places the text to the right of the input field on the prompt
display.</li>
<li>If P is in byte 21 of the first parameter (indicating that a permissible
values list is to be returned), this is a 2000-byte field into which the program
is to place the list. The first two bytes of the list must contain the number
of entries (in binary) in the list. This value is followed by entries that
consist of a 2-byte binary length followed by the value, which must be 1 to
34 bytes long. <p>If a binary zero value is returned in the first two bytes,
no permissible values are displayed.</p>
<p>If a binary negative value is
returned in the first two bytes, the list of permissible values is taken from
the command.</p>
</li>
</ul>
</li>
</ul>
<p>If any exception occurs when the program is called, the possible choices
text is left blank, and the list of permissible values is taken from the command.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dflst.htm" title="You can define a parameter to accept a list of values instead of just a single value.">Define lists for parameters</a></div>
</div>
</div>
</body>
</html>