168 lines
8.8 KiB
HTML
168 lines
8.8 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="Use the i5/OS prompter within a CL procedure or program" />
|
||
|
<meta name="abstract" content="You can request prompting within the interactive processing of a CL procedure or program." />
|
||
|
<meta name="description" content="You can request prompting within the interactive processing of a CL procedure or program." />
|
||
|
<meta name="DC.subject" content="prompting, in CL procedure, using, QCMDEXC program, call prompter, program, QCMDEXC, prompter, End Program (ENDPGM) command, example, ENDPGM (End Program) command" />
|
||
|
<meta name="keywords" content="prompting, in CL procedure, using, QCMDEXC program, call prompter, program, QCMDEXC, prompter, End Program (ENDPGM) command, example, ENDPGM (End Program) command" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="allow.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="qcaex.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../clfinder/finder.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="prmpt" />
|
||
|
<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 the i5/OS prompter
|
||
|
within a CL procedure or program</title>
|
||
|
</head>
|
||
|
<body id="prmpt"><a name="prmpt"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Use the i5/OS™ prompter
|
||
|
within a CL procedure or program</h1>
|
||
|
<div><p>You can request prompting within the interactive processing of
|
||
|
a CL procedure or program.</p>
|
||
|
<div class="section"> <p>For example, the following procedure can be compiled and run:
|
||
|
</p>
|
||
|
<pre>PGM
|
||
|
.
|
||
|
.
|
||
|
.
|
||
|
?DSPLIB
|
||
|
.
|
||
|
.
|
||
|
.
|
||
|
ENDPGM</pre>
|
||
|
<p>In this case, the prompt for the <span class="cmdname">Display Library (DSPLIB)</span> command
|
||
|
appears on the display during processing of the program. Processing of the <span class="cmdname">Display
|
||
|
Library (DSPLIB)</span> command waits until you have entered values for
|
||
|
required parameters and pressed the Enter key.</p>
|
||
|
<p>Any values specified
|
||
|
in the source procedure cannot be changed directly by the operator (or user).
|
||
|
For example: </p>
|
||
|
<pre>PGM
|
||
|
.
|
||
|
.
|
||
|
.
|
||
|
?SNDMSG TOMSGQ(WS01 WS02)
|
||
|
.
|
||
|
.
|
||
|
.
|
||
|
ENDPGM</pre>
|
||
|
<p>When the procedure is called and the prompt for the <span class="cmdname">Send
|
||
|
Message (SNDMSG)</span> command appears, the operator (or user) can enter
|
||
|
values on the MSG, MSGTYPE, and RPYMSGQ parameters, but cannot alter the values
|
||
|
on the TOMSGQ parameter. For example, the operator (or user) cannot add WS03
|
||
|
or delete WS02. The following restrictions apply to the use of the prompter
|
||
|
within a CL procedure at run time: </p>
|
||
|
<ul><li>When the prompter is called from a CL procedure or program, you cannot
|
||
|
enter a variable name or an expression for a parameter value on the prompt.</li>
|
||
|
<li>Prompting cannot be requested on a command embedded on an IF, ELSE, or
|
||
|
MONMSG command: <pre>Correct Incorrect
|
||
|
|
||
|
IF (&A=5) THEN(DO) IF (&A=5) THEN(?SNDMSG)
|
||
|
?SNDMSG
|
||
|
ENDDO</pre>
|
||
|
</li>
|
||
|
<li>Prompting <em>cannot</em> be used for the following commands at run time:
|
||
|
|
||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="90%" frame="void" border="0" rules="none"><tbody><tr><td valign="top" width="25%"><strong>CALL</strong></td>
|
||
|
<td valign="top" width="25%"><strong>CALLPRC</strong></td>
|
||
|
<td valign="top" width="25%"><strong><img src="./delta.gif" alt="Start of change" />CALLSUBR<img src="./deltaend.gif" alt="End of change" /></strong></td>
|
||
|
<td valign="top" width="25%"><strong>CHGVAR</strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>COPYRIGHT</strong></td>
|
||
|
<td valign="top" width="25%"><strong>DCL</strong></td>
|
||
|
<td valign="top" width="25%"><strong>DCLF</strong></td>
|
||
|
<td valign="top" width="25%"><strong><img src="./delta.gif" alt="Start of change" />DCLR<img src="./deltaend.gif" alt="End of change" /></strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>DO</strong></td>
|
||
|
<td valign="top" width="25%"><strong>DOFOR</strong></td>
|
||
|
<td valign="top" width="25%"><strong>DOUNTIL</strong></td>
|
||
|
<td valign="top" width="25%"><strong>DOWHILE</strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>ELSE</strong></td>
|
||
|
<td valign="top" width="25%"><strong>ENDDO</strong></td>
|
||
|
<td valign="top" width="25%"><strong>ENDPGM</strong></td>
|
||
|
<td valign="top" width="25%"><strong>ENDRCV</strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>ENDSELECT</strong></td>
|
||
|
<td valign="top" width="25%"><strong><img src="./delta.gif" alt="Start of change" />ENDSUBR<img src="./deltaend.gif" alt="End of change" /></strong></td>
|
||
|
<td valign="top" width="25%"><strong>GOTO</strong></td>
|
||
|
<td valign="top" width="25%"><strong>IF</strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>ITERATE</strong></td>
|
||
|
<td valign="top" width="25%"><strong>LEAVE</strong></td>
|
||
|
<td valign="top" width="25%"><strong>MONMSG</strong></td>
|
||
|
<td valign="top" width="25%"><strong>OTHERWISE</strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>PGM</strong></td>
|
||
|
<td valign="top" width="25%"><strong>RCVF</strong></td>
|
||
|
<td valign="top" width="25%"><strong>RETURN</strong></td>
|
||
|
<td valign="top" width="25%"><strong><img src="./delta.gif" alt="Start of change" />RTNSUBR<img src="./deltaend.gif" alt="End of change" /></strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>SELECT</strong></td>
|
||
|
<td valign="top" width="25%"><strong>SNDF</strong></td>
|
||
|
<td valign="top" width="25%"><strong>SNDRCVF</strong></td>
|
||
|
<td valign="top" width="25%"><strong><img src="./delta.gif" alt="Start of change" />SUBR<img src="./deltaend.gif" alt="End of change" /></strong></td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="25%"><strong>WAIT</strong></td>
|
||
|
<td valign="top" width="25%"><strong>WHEN</strong></td>
|
||
|
<td valign="top" width="25%"> </td>
|
||
|
<td valign="top" width="25%"> </td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</li>
|
||
|
<li>Prompting cannot be used in batch jobs.</li>
|
||
|
</ul>
|
||
|
<p>When you enter a prompting request (?) on a command in a CL source
|
||
|
file member, you may receive a diagnostic message on the command and still
|
||
|
have a successful compilation. In this case, you must examine the messages
|
||
|
carefully to see that the errors can be corrected by values entered through
|
||
|
the prompt display when the procedure or program runs.</p>
|
||
|
<p>You can prompt
|
||
|
for all commands you are authorized to in any mode while in an interactive
|
||
|
environment except for the previously listed commands, which cannot be prompted
|
||
|
for during processing of a CL procedure or program. This allows you to prompt
|
||
|
for any command while at a workstation and reduces the need to refer to the
|
||
|
manuals that describe the various commands and their parameters.</p>
|
||
|
<p>If
|
||
|
you press F3 or F12 to cancel the prompted command while running that command,
|
||
|
an escape message (CPF6801) is sent to the CL procedure or program. You can
|
||
|
monitor for this message using the <span class="cmdname">Monitor Message (MONMSG)</span> command
|
||
|
in the CL procedure or program.</p>
|
||
|
<p>When you prompt for a command, your
|
||
|
procedure or program does not receive the command string you entered. To
|
||
|
achieve this, prompt using QCMDCHK, then run the command using QCMDEXC. You
|
||
|
can also use QCAPCMD to prompt and run the command.</p>
|
||
|
</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="reltasks"><strong>Related tasks</strong><br />
|
||
|
<div><a href="qcaex.htm" title="The QCMDEXC program may be used to call the prompter.">Use QCMDEXC with prompting in CL procedures and programs</a></div>
|
||
|
</div>
|
||
|
<div class="relinfo"><strong>Related information</strong><br />
|
||
|
<div><a href="../clfinder/finder.htm">CL command finder</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|