220 lines
6.6 KiB
HTML
220 lines
6.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Execute Command (QCMDEXC) API</title>
|
|
<!-- Begin Header Records ========================================== -->
|
|
<!-- 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. -->
|
|
<!-- QCMDEX SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
|
<!-- RCHVMW2 on 5 Feb 1999 at 11:07:36 -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!--Edited by Kersten Nov 2001 -->
|
|
<!--End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="Top_Of_Page"></a>
|
|
<!-- Java sync-link -->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<h2>Execute Command (QCMDEXC) API</h2>
|
|
|
|
<div class="box" style="width: 70%;">
|
|
<br>
|
|
Required Parameter Group:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">1</td>
|
|
<td align="left" valign="top" width="50%">Command string</td>
|
|
<td align="left" valign="top" width="20%">Input</td>
|
|
<td align="left" valign="top" width="20%">Char(*)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">Length of command string</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Packed (15,5)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Optional Parameter:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">3</td>
|
|
<td align="left" valign="top" width="50%">IGC process control</td>
|
|
<td align="left" valign="top" width="20%">INPUT</td>
|
|
<td align="left" valign="top" width="20%">Char(3)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes.<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
See <a href="#usage_notes">Usage Notes</a> for command considerations.<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The Execute Command (QCMDEXC) API runs a single command. It is used to run a
|
|
command from within a high-level language (HLL) program or from within a CL
|
|
program where it is not known at compile time what command is to be run or what
|
|
parameters are to be used.</p>
|
|
|
|
<p>QCMDEXC is called from within your HLL program and the command it runs is
|
|
passed to it as a parameter on the CALL command.</p>
|
|
|
|
<p>After the command runs, control returns to your HLL program.</p>
|
|
|
|
<p><strong>Notes:</strong></p>
|
|
|
|
<ol>
|
|
<li>Command strings in System/38 syntax can use the QCAEXEC API. The QCAEXEC
|
|
API accepts the same parameters as QCMDEXC.</li>
|
|
|
|
<li>The Process Commands (QCAPCMD) API also provides similar functions.</li>
|
|
|
|
<IMG SRC="delta.gif" WIDTH="53" HEIGHT="9">
|
|
<li>If the command to be executed is a proxy command, the QCMDEXC API will resolve
|
|
to the target command. If the target command is also a proxy, the process repeats
|
|
until either a non-proxy command is found, or the proxy chain becomes greater than
|
|
the allowed maximum. Once a non-proxy command is found, the resolved command will
|
|
replace the proxy command in the command string to be executed.</li>
|
|
|
|
<li>Proxy commands will be resolved before the command exit points
|
|
QIBM_QCA_CHG_COMMAND and QIBM_QCA_RTV_COMMAND are called.</li>
|
|
<IMG SRC="deltaend.gif" WIDTH="53" HEIGHT="9">
|
|
</ol>
|
|
|
|
<br>
|
|
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<dl>
|
|
<dt><em>Any Command</em></dt>
|
|
|
|
<dd>*USE</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Command string</strong></dt>
|
|
|
|
<dd>INPUT;CHAR(*)
|
|
|
|
<p>The command you want to run entered as a character string. If the command
|
|
contains blanks, it must be enclosed in apostrophes. The maximum length of the
|
|
character string is 32,702 characters; delimiters (the apostrophes enclosing
|
|
the string) are not counted as part of the string.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of command string</strong></dt>
|
|
|
|
<dd>INPUT;PACKED(15,5)
|
|
|
|
<p>The maximum length being passed. If the command string is passed as a quoted
|
|
string, the command length is exactly the length of the quoted string. If the
|
|
command string is passed in a variable, the command length is the length of the
|
|
variable. It is not necessary to reduce the command length to the actual length
|
|
of the command string in the variable, although it is permissible to do so.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
<h3>Optional Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>IGC process control</strong></dt>
|
|
|
|
<dd>INPUT;CHAR(3)
|
|
|
|
<p>The IGC process control instructs the system to accept double-byte data. The
|
|
only value supported is IGC. IGC must be entered using all uppercase
|
|
letters.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
<h3><a name="usage_notes">Usage Notes</a></h3>
|
|
|
|
<p>While this API is threadsafe, it should not be used to run a command that is
|
|
not threadsafe in a job that has multiple threads. Use the Display Command
|
|
(DSPCMD) command to determine whether a command is threadsafe.</p>
|
|
|
|
<br>
|
|
|
|
<h3>Error Messages</h3>
|
|
|
|
<table width="100%" cellpadding="5">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<th align="left" valign="top" nowrap>Message ID</th>
|
|
<th align="left" valign="top">Error Message Text</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF0005 E</td>
|
|
<td align="left" valign="top">Returned command string exceeds variable provided
|
|
length</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF0006 E</td>
|
|
<td align="left" valign="top">Errors occurred in command.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3C90 E</td>
|
|
<td align="left" valign="top">Literal value cannot be changed.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9872 E</td>
|
|
<td align="left" valign="top">Program or service program &1 in library
|
|
&2 ended. Reason code &3.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">xxxnnnn E</td>
|
|
<td align="left" valign="top">Any escape message issued by any command may be
|
|
returned. The messages listed previously are those issued by this API. Once the
|
|
API has called the command analyzer, any message issued as an escape message
|
|
may appear.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<hr>
|
|
API in existance prior to V1R3
|
|
|
|
<hr>
|
|
<table align="center" cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"pgm1.htm">Program and CL Command APIs</a> | <a href="aplist.htm">APIs by
|
|
category</a></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|