232 lines
6.5 KiB
HTML
232 lines
6.5 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>Check Command Syntax (QCMDCHK) 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. -->
|
|
<!-- QCMDCH SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
|
<!-- RCHVMW2 on 5 Feb 1999 at 11:09:35 -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!--File 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 language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<h2>Check Command Syntax (QCMDCHK) 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%">I/O</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 Check Command Syntax (QCMDCHK) API performs syntax checking for a single
|
|
command, and optionally prompts for the command. The command is not run. If
|
|
prompting is requested, the command string is returned to the calling program
|
|
with the updated values as entered through prompting. The QCMDCHK API can be
|
|
called from an HLL program.</p>
|
|
|
|
<p>Typical uses of QCMDCHK are:</p>
|
|
|
|
<ul>
|
|
<li>Prompt the user for a command and then store the command for later
|
|
processing.</li>
|
|
|
|
<li>Determine the parameter values specified by the user.</li>
|
|
|
|
<li>Log the processed command. First, prompt with the QCMDCHK API, run with the
|
|
Execute Command (QCMDEXC) API, and then log the processed command.</li>
|
|
</ul>
|
|
|
|
<p><strong>Notes:</strong></p>
|
|
|
|
<ol>
|
|
<li>Command strings in System/38 syntax can use the QCACHECK API. The QCACHECK
|
|
API accepts the same parameters as QCMDEXC and QCMDCHK.</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 checked is a proxy command, the QCMDCHK 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 checked. The returned
|
|
command string will contain the original proxy command name.</li>
|
|
|
|
<li>Proxy commands will be resolved before the command exit point
|
|
QIBM_QCA_CHG_COMMAND is 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>I/O;CHAR(*)
|
|
|
|
<p>The command you want to check is 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 length of the command string 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.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Optional Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>IGC process control</strong></dt>
|
|
|
|
<dd>INPUT;CHAR(*)
|
|
|
|
<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">
|
|
<tr>
|
|
<th align="left" valign="top">Message ID</th>
|
|
<th align="left" valign="top">Error Message Text</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="15%" valign="top">CPF0005 E</td>
|
|
<td width="85%" valign="top">Returned command string exceeds variable provided
|
|
length.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF0006 E</td>
|
|
<td valign="top">Errors occurred in command.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9872 E</td>
|
|
<td valign="top">Program or service program &1 in library &2 ended.
|
|
Reason code &3.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">xxxnnnn E</td>
|
|
<td 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>
|
|
|
|
<hr>
|
|
API in existance prior to V1R3
|
|
|
|
<hr>
|
|
<center>
|
|
<table 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>
|
|
</center>
|
|
</body>
|
|
</html>
|
|
|