131 lines
8.1 KiB
HTML
131 lines
8.1 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="concept" />
|
||
<meta name="DC.Title" content="Information returned from the prompt override program" />
|
||
<meta name="abstract" content="Based on the values passed, the prompt override program retrieves the current values for the parameters that are not key parameters." />
|
||
<meta name="description" content="Based on the values passed, the prompt override program retrieves the current values for the parameters that are not key parameters." />
|
||
<meta name="DC.subject" content="prompt override program, information returned" />
|
||
<meta name="keywords" content="prompt override program, information returned" />
|
||
<meta name="DC.Relation" scheme="URI" content="wrtpop.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="../cl/chgdbg.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="../cl/addpgm.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="secpr.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="sampop.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="passinfo" />
|
||
<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>Information returned from the prompt override program</title>
|
||
</head>
|
||
<body id="passinfo"><a name="passinfo"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Information returned from the prompt override program</h1>
|
||
<div><p>Based on the values passed, the prompt override program retrieves
|
||
the current values for the parameters that are not key parameters.</p>
|
||
<p>These values are placed into a command string, where the length of the
|
||
string is determined and returned.</p>
|
||
<p>Use the following guidelines to ensure your command string is correctly
|
||
defined: </p>
|
||
<ul><li>Use the keyword format for the command string just as you would on the
|
||
command line.</li>
|
||
<li>Do not include the command name and the key parameters in the command
|
||
string.</li>
|
||
<li>Precede each keyword with a selective prompt character to define how to
|
||
display the parameter and what value to pass to the CPP. <p>When using selective
|
||
prompts, do the following: </p>
|
||
<ul><li>If a parameter is defined as MIN(1) in the command definition source (that
|
||
is, the parameter is required), you must use the <samp class="codeph">??</samp> selective
|
||
prompt character for that keyword in the command string from the prompt override
|
||
program.</li>
|
||
<li>Do not use the <samp class="codeph">?-</samp> selective prompt character in the prompt
|
||
override program command string.</li>
|
||
</ul>
|
||
<p>The following example shows a command string returned from a prompt
|
||
override program: </p>
|
||
<pre>??Number(123456) ?<Qualifier(CLIB/CFILE) ?<LIST(ITEM1
|
||
ITEM2 ITEM3) ?<TEXT('Carol's file')</pre>
|
||
</li>
|
||
<li>Make sure that the specified value in the first two bytes of the space
|
||
the program passes is the actual hexadecimal length of the command string. <br /><img src="rbafn501.gif" alt="This example shows a command string returned from a prompt override program." /><br /></li>
|
||
<li>Include only the parameters in the command string whose current values
|
||
you want displayed when the command is prompted. Parameters not included
|
||
in the command string have their defaults displayed.</li>
|
||
<li>Use character form for any numbers that appear in the command string.
|
||
Do not use binary or packed form. Do not include any hexadecimal numbers
|
||
in the command string.</li>
|
||
<li>Do not put blank spaces between the library and the qualifier or the qualifier
|
||
and the object. For example: <dl><dt class="dlterm"><samp class="codeph">??KWD1(library /object)</samp></dt>
|
||
<dd>Not valid</dd>
|
||
<dt class="dlterm"><samp class="codeph">??KWD1(library/ object)</samp></dt>
|
||
<dd>Not valid</dd>
|
||
<dt class="dlterm"><samp class="codeph">??KWD1(library/object)</samp></dt>
|
||
<dd>Valid</dd>
|
||
<dt class="dlterm"><samp class="codeph">??KWD1( library/object )</samp></dt>
|
||
<dd>Valid</dd>
|
||
</dl>
|
||
</li>
|
||
<li>If you use special values or single values, make sure they are translated
|
||
into the from-value defined in the command definition source. <p>For example,
|
||
a keyword has a special value defined as SPCVAL(*SPECIAL *) in the command
|
||
definition source. *SPECIAL is the from-value and * is the to-value. When
|
||
the current value is retrieved for this keyword, * is the value retrieved,
|
||
but *SPECIAL must appear in the command string returned from the prompt override
|
||
program. The correct from-value must be placed into the command string since
|
||
more than one special value or single value can have the same to-value. For
|
||
example, if <samp class="codeph">KWD1 SPCVAL((*SPC *) (*SPECIAL *))</samp> is specified,
|
||
the prompt override program must determine whether * is the to-value for *SPC
|
||
or *SPECIAL.</p>
|
||
</li>
|
||
<li>Define the length of fields used to retrieve text as follows: <pre>(2*(field length defined in command definition source)) + 2</pre>
|
||
<p>This length allows for the maximum number of quotation marks
|
||
allowed in the text field. For example, if the TEXT parameter on the CHGxxx
|
||
command is defined in the command definition source as LEN(50), then the parameter
|
||
is declared as CHAR(102) in its prompt override program.</p>
|
||
<p>If the parameter
|
||
for a text field is not correctly defined in the prompt override program and
|
||
the text string retrieved by the prompt override program contains a quote,
|
||
the command does not prompt correctly.</p>
|
||
</li>
|
||
<li>Make sure that you double any embedded apostrophes, for example: <pre>?<TEXT('Carol''s library')</pre>
|
||
</li>
|
||
</ul>
|
||
<p>Some commands can only be run in certain modes (such as DEBUG) or job status
|
||
(such as *BATCH) but can still be prompted for from other modes or job statuses.
|
||
When the command is prompted, the prompt override program is called regardless
|
||
of the user's environment. If the prompt override program is called in a mode
|
||
or environment that is not valid for the command, the defaults are displayed
|
||
for the command and a value of 0 is returned for the length. Using the debug
|
||
commands <span class="cmdname">Change Debug (CHGDBG)</span> and <span class="cmdname">Add Program
|
||
(ADDPGM)</span> when not in debug mode are examples of this condition.</p>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="wrtpop.htm" title="A prompt override program needs to be passed certain information to return current values when a command is prompted.">Write a prompt override program</a></div>
|
||
</div>
|
||
<div class="relconcepts"><strong>Related concepts</strong><br />
|
||
<div><a href="sampop.htm" title="This example shows the command source for a command and the prompt override program.">Example: Use a prompt override program</a></div>
|
||
</div>
|
||
<div class="reltasks"><strong>Related tasks</strong><br />
|
||
<div><a href="secpr.htm" title="You can request to prompt for selected parameters within a command.">Use selective prompting for CL commands</a></div>
|
||
</div>
|
||
<div class="relinfo"><strong>Related information</strong><br />
|
||
<div><a href="../cl/chgdbg.htm">Change Debug (CHGDBG) command</a></div>
|
||
<div><a href="../cl/addpgm.htm">Add Program (ADDPGM) command</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |