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

317 lines
22 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="task" />
<meta name="DC.Title" content="Use selective prompting for CL commands" />
<meta name="abstract" content="You can request to prompt for selected parameters within a command." />
<meta name="description" content="You can request to prompt for selected parameters within a command." />
<meta name="DC.subject" content="selective prompting, description, prompting, selective, command, CL, for command, command, CL, using the prompter, character table, character table, character description table" />
<meta name="keywords" content="selective prompting, description, prompting, selective, command, CL, for command, command, CL, using the prompter, character table, character table, character description table" />
<meta name="DC.Relation" scheme="URI" content="allow.htm" />
<meta name="DC.Relation" scheme="URI" content="passinfo.htm" />
<meta name="DC.Relation" scheme="URI" content="execp.htm" />
<meta name="DC.Relation" scheme="URI" content="chckp.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="secpr" />
<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>Use selective prompting for CL commands</title>
</head>
<body id="secpr"><a name="secpr"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use selective prompting for CL commands</h1>
<div><p>You can request to prompt for selected parameters within a command.
</p>
<div class="section"> <p>This is especially helpful when you are using some of the longer
commands and do not want to be prompted for certain parameters.</p>
<p>Selective
prompting can be used during interactive prompting or entered as source (in
SEU) for use within a CL procedure or program. You can enter the source for
selective prompting with SEU but you cannot use selective prompting while
entering commands in SEU.</p>
<p>You can use selective prompting to: </p>
<ul><li>Select the parameters for which prompting is needed.</li>
<li>Determine which parameters are protected.</li>
<li>Omit parameters from the prompt.</li>
</ul>
<p>The following restrictions apply to selective prompting: </p>
<ul><li>The command name or label must be preceded by a <samp class="codeph">?</samp> (question
mark): <ul><li>When one or more of the selective prompt options is <samp class="codeph">?-</samp> (question
mark, minus).</li>
<li>To avoid getting a CPF6805 message (a message that indicates a diagnostic
problem on the command although compilation is successful)</li>
</ul>
</li>
<li>Parameters can be specified by position but they cannot be preceded by
selective prompt characters.</li>
<li>A parameter must be in keyword form to be selectively prompted for.</li>
<li>Blanks cannot be entered between the selective prompt characters and the
keyword.</li>
<li>Selective prompting is only applicable at a parameter level; that is,
you cannot specify particular keyword values within a list of values.</li>
<li><samp class="codeph">?-</samp> is not allowed in prompt override programs.</li>
<li>If a parameter is required, the <samp class="codeph">??</samp> selective prompt must
be used. <p>You can tell that a parameter is required because the input slot
is highlighted when the command is prompted.</p>
</li>
</ul>
<p>User-specified values are marked with a special symbol (<strong>&gt;</strong>)
in front of the values in both selective and regular prompting. If a user-specified
value on the parameter prompt is not preceded by this symbol, the command
default is passed to the command processing program.</p>
<p>If PASSATR(*YES)
is specified on the PARM, ELEM, or QUAL command definition statement, and
the default value is changed using the <span class="cmdname">Change Command Definition
(CHGCMDDFT)</span> command, the default value is shown as a user-specified
value (using the &gt; symbol) and not a default value. If a default value
of a changed PARM, ELEM, or QUAL command definition statement is changed back
to its original default value, the &gt; symbol is removed.</p>
<p>You can press
F5 while you are using selective prompting to again display those values initially
shown on the display.</p>
<p>If a CL variable is used to specify a value for
a parameter which is to be displayed through selective prompting, you can
change the value on the prompt, and the changed value is used when the command
is run. The value of the variable in the procedure or program is not changed.
If a CL procedure contains the following: </p>
<pre>OVRDBF ?*FILE(FILEA) ??TOFILE(&amp;FILENAME) ??MBR(MBR1)</pre>
<p>the three parameters, FILE, TOFILE, and MBR is shown on the
prompt display. The value specified for the FILE parameter cannot be changed
by you, but the values for the TOFILE and MBR parameters can be changed.
Assume that the CL variable &amp;FILENAME has a value of FILE1, and you change
it to FILE2. When the command is run, the value of FILE2 is used, but the
value of &amp;FILENAME is not changed in the procedure. The following tables
list the various selective prompting characters and the resulting action.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" valign="bottom" width="25.954198473282442%" id="d0e132">You Enter</th>
<th align="left" valign="bottom" width="18.3206106870229%" id="d0e134">Value Displayed</th>
<th align="left" valign="bottom" width="18.3206106870229%" id="d0e136">Protected</th>
<th align="left" valign="bottom" width="18.702290076335878%" id="d0e138">Value Passed to CPP if Nothing Specified</th>
<th align="left" valign="bottom" width="18.702290076335878%" id="d0e140">Marked with &gt; Symbol</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">??KEYWORD()</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Default</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">No</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">??KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Value</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">No</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Value</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">Yes</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?*KEYWORD()</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Default</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">Yes</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?*KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Value</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">Yes</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Value</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">Yes</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?&lt;KEYWORD()</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Default</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">No</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?&lt;KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Value</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">No</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?/KEYWORD()</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Default</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">Yes</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?/KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Value</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">Yes</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?-KEYWORD()</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">None</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">N/A</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">N/A</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?-KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">None</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">N/A</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Value</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">N/A</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?&amp;KEYWORD()</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Default</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">No</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?&amp;KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Value</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">No</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?%KEYWORD()</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Default</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">Yes</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
<tr><td align="left" valign="top" width="25.954198473282442%" headers="d0e132 "><samp class="codeph">?%KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e134 ">Value</td>
<td align="left" valign="top" width="18.3206106870229%" headers="d0e136 ">Yes</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e138 ">Default</td>
<td align="left" valign="top" width="18.702290076335878%" headers="d0e140 ">No</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" valign="bottom" width="28.51851851851852%" id="d0e318">You Enter</th>
<th align="left" valign="bottom" width="36.851851851851855%" id="d0e320">Display Value When F5 Pressed or Blanked
Out</th>
<th align="left" valign="bottom" width="34.629629629629626%" id="d0e322">Description</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">??KEYWORD()</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Default</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Normal keyword prompt with command default.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">??KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Value</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Normal keyword prompt with program specified
default.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?*KEYWORD()</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Default</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Show protected prompt (as information) where
command default is the only value used.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?*KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Value</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Show protected prompt (as information) where
program specified value is the only value used. For example, when a value
should be shown as information but not changed.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?&lt;KEYWORD()</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Default</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Normal keyword prompt with command default.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?&lt;KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Value</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Normal keyword prompt with program specified
default.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?/KEYWORD()</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Default</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Reserved for IBM<sup>®</sup> use.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?/KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Value</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Reserved for IBM use.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?&amp;KEYWORD()</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Default</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Normal keyword prompt with command default.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?&amp;KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Value</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Normal keyword prompt with program specified
default.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?%KEYWORD()</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Default</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Show protected prompt (as information) where
command default is the only value used.</td>
</tr>
<tr><td align="left" valign="top" width="28.51851851851852%" headers="d0e318 "><samp class="codeph">?%KEYWORD(VALUE)</samp></td>
<td align="left" valign="top" width="36.851851851851855%" headers="d0e320 ">Value</td>
<td align="left" valign="top" width="34.629629629629626%" headers="d0e322 ">Show protected prompt (as information) where
program specified value is the only value used. For example, when a value
should be shown as information but not changed.</td>
</tr>
</tbody>
</table>
</div>
<p>Selective prompting can be used with the QCMDEXC or QCMDCHK program.
The format of the call is: </p>
<pre>CALL PGM(QCMDEXC or QCMDCHK) PARM(command command-length)</pre>
<p>Following is a brief description of the selective prompting
characters:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" valign="bottom" width="38.7037037037037%" id="d0e439">Selective Prompting Character</th>
<th align="left" valign="bottom" width="61.29629629629629%" id="d0e441">Description</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="38.7037037037037%" headers="d0e439 "><samp class="codeph">??</samp></td>
<td align="left" valign="top" width="61.29629629629629%" headers="d0e441 ">The parameter is displayed and input-capable.</td>
</tr>
<tr><td align="left" valign="top" width="38.7037037037037%" headers="d0e439 "><samp class="codeph">?*</samp></td>
<td align="left" valign="top" width="61.29629629629629%" headers="d0e441 ">The parameter is displayed but is not input-capable.
Any user-specified value is passed to the command processing program.</td>
</tr>
<tr><td align="left" valign="top" width="38.7037037037037%" headers="d0e439 "><samp class="codeph">?&lt;</samp></td>
<td align="left" valign="top" width="61.29629629629629%" headers="d0e441 ">The parameter is displayed and is input-capable,
but the command default is sent to the CPP unless the value displayed on the
parameter is changed.</td>
</tr>
<tr><td align="left" valign="top" width="38.7037037037037%" headers="d0e439 "><samp class="codeph">?/</samp></td>
<td align="left" valign="top" width="61.29629629629629%" headers="d0e441 ">Reserved for IBM use.</td>
</tr>
<tr><td align="left" valign="top" width="38.7037037037037%" headers="d0e439 "><samp class="codeph">?</samp></td>
<td align="left" valign="top" width="61.29629629629629%" headers="d0e441 ">The parameter is not displayed. The specified
value (or default) is passed to the CPP. Not allowed in prompt override programs.</td>
</tr>
<tr><td align="left" valign="top" width="38.7037037037037%" headers="d0e439 "><samp class="codeph">?&amp;</samp></td>
<td align="left" valign="top" width="61.29629629629629%" headers="d0e441 ">The parameter is not displayed until F9=All
parameters is pressed. Once displayed, it is input-capable. The command default
is sent to the CPP unless the value displayed on the parameter is changed.</td>
</tr>
<tr><td align="left" valign="top" width="38.7037037037037%" headers="d0e439 "><samp class="codeph">?%</samp></td>
<td align="left" valign="top" width="61.29629629629629%" headers="d0e441 ">The parameter is not displayed until F9=All
parameters is pressed. Once displayed, it is not input-capable. The command
default is sent to the CPP.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="allow.htm" title="You can prompt the workstation user for input to a CL procedure or program.">Prompt for user input at runtime</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="passinfo.htm" title="Based on the values passed, the prompt override program retrieves the current values for the parameters that are not key parameters.">Information returned from the prompt override program</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="execp.htm" title="Execute Command (QCMDEXC) is an IBM-supplied program that runs a single command.">QCMDEXC program</a></div>
<div><a href="chckp.htm" title="QCMDCHK is an IBM-supplied program that performs syntax checking for a single command, and optionally prompts for the command.">QCMDCHK program</a></div>
</div>
</div>
</body>
</html>