ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/sbmnwscmd.htm

320 lines
13 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">
<title>Submit Network Server Command (SBMNWSCMD)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="SBMNWSCMD.Top_Of_Page"></a>
<h2>Submit Network Server Command (SBMNWSCMD)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#SBMNWSCMD.PARAMETERS.TABLE">Parameters</a><br>
<a href="#SBMNWSCMD.COMMAND.EXAMPLES">Examples</a><br>
<a href="#SBMNWSCMD.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="SBMNWSCMD"></a>
<p>The Submit Network Server Command (SBMNWSCMD) command submits a command to run on the designated server. For SVRTYPE(*WINDOWS) or (*WINDOWSNT), command output is directed as specified by the CMDSTDOUT parameter. For all other types, command output is directed to the job log of the job that issues the command.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="SBMNWSCMD.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.CMD"><b>CMD</b></a></td>
<td valign="top">Command</td>
<td valign="top"><i>Character value</i>, *NOLOGCMD</td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.SERVER"><b>SERVER</b></a></td>
<td valign="top">Server</td>
<td valign="top"><i>Character value</i></td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.NOLOGCMD"><b>NOLOGCMD</b></a></td>
<td valign="top">Command (not logged)</td>
<td valign="top"><i>Character value</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.SVRTYPE"><b>SVRTYPE</b></a></td>
<td valign="top">Server type</td>
<td valign="top"><b><u>*NWSUSRA</u></b>, *NWSA, *WINDOWS, *NETWARE, *WINDOWSNT</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.CMDTYPE"><b>CMDTYPE</b></a></td>
<td valign="top">Command type</td>
<td valign="top"><b><u>*SVRTYPE</u></b>, *WINDOWS, *NETWARE, *WINDOWSNT</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.LODUSRPRF"><b>LODUSRPRF</b></a></td>
<td valign="top">Load user profile</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.AUTDMN"><b>AUTDMN</b></a></td>
<td valign="top">Authentication domain</td>
<td valign="top"><i>Character value</i>, <b><u>*PRIMARY</u></b>, *LOCAL</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.CMDSTDOUT"><b>CMDSTDOUT</b></a></td>
<td valign="top">Command standard output</td>
<td valign="top"><i>Path name</i>, <b><u>*JOBLOG</u></b>, *PRINT</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SBMNWSCMD.CVTSTDOUT"><b>CVTSTDOUT</b></a></td>
<td valign="top">Convert standard output</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="SBMNWSCMD.CMD"></a>
<h3>Command (CMD)</h3>
<p>Specifies the command submitted to the network server. The syntax of the command string specified for this parameter is not checked.
</p>
<dl>
<dt><b>*NOLOGCMD</b></dt>
<dd>Specifies the user wants to submit a command string that is not logged in the joblog. This is useful if the command string contains sensitive data such as passwords. If *NOLOGCMD is specified, a command string must be entered on the NOLOGCMD parameter.
</dd>
<dt><b><i>command</i></b></dt>
<dd>The command string that is to be submitted to the network server. This command string will be shown in the joblog.
</dd>
</dl>
<p>This is a required parameter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.SERVER"></a>
<h3>Server (SERVER)</h3>
<p>Specifies the name of the server to which the command is submitted.
</p>
<p>This is a required parameter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.NOLOGCMD"></a>
<h3>Command (not logged) (NOLOGCMD)</h3>
<p>Specifies the command string to be submitted to the network server. This command string will not be echoed to the joblog. Use this parameter to submit commands that contain sensitive data such as passwords. This parameter is required if, and is only allowed when, CMD(*NOLOGCMD) is specified.
</p>
<p>
<b>Note: </b>Since the command is being executed on a server, the presence of this option does not prevent the server from returning the command string as part of the output data. Thus, depending on the command, it may still be returned and displayed in the job log or spool file.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.SVRTYPE"></a>
<h3>Server type (SVRTYPE)</h3>
<p>Specifies the type of server to which the command is sent.
</p>
<dl>
<dt><b><u>*NWSUSRA</u></b></dt>
<dd>The server type specified in the network server attributes (CHGNWSUSRA command) for the user profile running the SBMNWSCMD is used.
</dd>
<dt><b>*NWSA</b></dt>
<dd>The server type specified in the network server attributes (CHGNWSA command) is used.
</dd>
<dt><b>*WINDOWS or *WINDOWSNT</b></dt>
<dd>The server type is Windows. Only Windows commands will run on a local Windows server.
<p>
<b>Note: </b>*WINDOWS should be used in V5R4 and later releases. The *WINDOWSNT value is supported for compatibility with releases prior to V5R4.
</p>
</dd>
<dt><b>*NETWARE</b></dt>
<dd>The server type is NetWare. Only NetWare commands can be sent to a NetWare server.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.CMDTYPE"></a>
<h3>Command type (CMDTYPE)</h3>
<p>Specifies the type of command string specified in the CMD parameter. This is used by the system to determine what type of processing needs to occur for the command string.
</p>
<p>
<b>Note: </b>This parameter is ignored.
</p>
<dl>
<dt><b><u>*SVRTYPE</u></b></dt>
<dd>The command string is processed based on the type of server specified in the SVRTYPE parameter. If the server is a NetWare server, the command string is assumed to be a NetWare command. If the server is a *WINDOWS or a *WINDOWSNT server, the command string is assumed to be a Windows command.
</dd>
<dt><b>*WINDOWS or *WINDOWSNT</b></dt>
<dd>The command string is a Windows command.
<p>
<b>Note: </b>*WINDOWS should be used in V5R4 and later releases. The *WINDOWSNT value is supported for compatibility with releases prior to V5R4.
</p>
</dd>
<dt><b>*NETWARE</b></dt>
<dd>The command string is a NetWare command.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.LODUSRPRF"></a>
<h3>Load user profile (LODUSRPRF)</h3>
<p>Specifies whether or not to load the user profile on the remote server as part of the login environment.
</p>
<p>
<b>Note: </b>This parameter is only valid when SVRTYPE(*WINDOWS) or (*WINDOWSNT) is specified.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>Load the user profile.
</dd>
<dt><b>*NO</b></dt>
<dd>Do not load the user profile.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.AUTDMN"></a>
<h3>Authentication domain (AUTDMN)</h3>
<p>Specifies the Windows domain where the user is authenticated.
</p>
<p>
<b>Note: </b>This parameter is only valid when SVRTYPE(*WINDOWS) or (*WINDOWSNT) is specified.
</p>
<dl>
<dt><b><u>*PRIMARY</u></b></dt>
<dd>The user is authenticated on the primary domain of the server.
</dd>
<dt><b>*LOCAL</b></dt>
<dd>The user is authenticated on the local server.
</dd>
<dt><b><i>'domain-name'</i></b></dt>
<dd>Specify the domain name where the user is authenticated.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.CMDSTDOUT"></a>
<h3>Command standard output (CMDSTDOUT)</h3>
<p>Specifies where the standard output returned from the command is to be stored, if any exists. Standard output can be written to the job log of the job that issues this command, it can be written to a spooled file, or it can be written to a file. The standard error returned from the command is always directed to the job log of the job that issues this command, if any exists.
</p>
<p>
<b>Note: </b>This parameter is only valid when SVRTYPE(*WINDOWS) or (*WINDOWSNT) is specified.
</p>
<dl>
<dt><b><u>*JOBLOG</u></b></dt>
<dd>The standard output of the network server command is directed to the job log of the job that issues this command. It shares the job log with the standard error output of the network server command. Both may be mixed in the job log, depending on the order by which the command writes standard output and standard error information.
</dd>
<dt><b>*PRINT</b></dt>
<dd>The standard output of the network server command is directed to a spooled file. If CVTSTDOUT(*YES) is specified, certain control characters such as line feeds and carriage returns are converted to new lines and other non-displayable control characters such as highlight and underscore are converted to blanks.
</dd>
<dt><b><i>'stream-file-path-name'</i></b></dt>
<dd>Specify the path name of the stream file to which the standard output of the network server command is directed. The specified path must exist. If the stream file doesn't exist, it is created. If the stream file exists, all data is overlaid. Additional information about path name is in the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter book.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SBMNWSCMD.CVTSTDOUT"></a>
<h3>Convert standard output (CVTSTDOUT)</h3>
<p>Specifies whether the standard output will be converted from the server's code set to the CCSID of the i5/OS user profile that submitted the command. For binary output, CVTSTDOUT(*NO) should be specified.
</p>
<p>
<b>Note: </b>This parameter is only valid when CMDSTDOUT(*PRINT) or CMDSTDOUT(stream-file-path-name) is specified.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>The output is converted from the server's code set to the CCSID of the i5/OS user profile that submitted the command.
</dd>
<dt><b>*NO</b></dt>
<dd>The output is not converted from the server's code set.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SBMNWSCMD.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Submitting a Windows Command</b>
</p>
<p>
<pre>
SBMNWSCMD CMD('net config server') SERVER(WINSVR)
CMDSTDOUT(*JOBLOG)
</pre>
</p>
<p>This command will display the Windows Server service settings on the Windows server WINSVR. Standard output from the command is returned to i5/OS and directed to the job log.
</p>
<p><b>Example 2: Submitting a NetWare command</b>
</p>
<p>
<pre>
SBMNWSCMD CMD('CONFIG') SERVER(NTW01) SVRTYPE(*NETWARE)
</pre>
</p>
<p>This command submits the NetWare CONFIG command to run on the server named NTW01. Output is returned to the job log.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SBMNWSCMD.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPFA43F</b></dt>
<dd>Network server command not submitted.
</dd>
<dt><b>CPFA46C</b></dt>
<dd>Unable to complete command processing on server &amp;1.
</dd>
<dt><b>CPFA46F</b></dt>
<dd>Network server description &amp;1 not found.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SBMNWSCMD.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>