233 lines
11 KiB
HTML
233 lines
11 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 Remote Command (SBMRMTCMD)</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="SBMRMTCMD.Top_Of_Page"></a>
|
|
<h2>Submit Remote Command (SBMRMTCMD)</h2>
|
|
<table width="100%">
|
|
<tr>
|
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
|
<b>Threadsafe: </b>Conditional
|
|
</td>
|
|
<td valign="top" align="right">
|
|
<a href="#SBMRMTCMD.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#SBMRMTCMD.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#SBMRMTCMD.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="SBMRMTCMD"></a>
|
|
<p>The Submit Remote Command (SBMRMTCMD) command sends a CL command through Distributed Data Management (DDM) to be run on the target system specified by a DDM file. The DDM file determines the communications line used, and indirectly identifies the target system that receives the submitted command.
|
|
</p>
|
|
<p>This command sends only CL commands to a remote system which supports the SBMRMTCMD command language. It cannot send non-CL commands to a different system type (for example, OCL commands cannot be sent to a target System/36).
|
|
</p>
|
|
<p>The primary purpose of this command is to allow a source system user or program to perform file management operations and file authorization activities on files located on a target system.
|
|
</p>
|
|
<ul>
|
|
<li>Create or delete physical, logical, device, or source files
|
|
</li>
|
|
<li>Grant or revoke object authority to remote files
|
|
</li>
|
|
<li>Check, rename, or move files or other objects
|
|
</li>
|
|
<li>Save or restore files or other objects
|
|
</li>
|
|
</ul>
|
|
<p><b>Restrictions:</b>
|
|
</p>
|
|
<ul>
|
|
<li>File processing on the target system operates independently of processing on the source system. Commands dependent on a specific recursion level or request level may <i>not</i> function as expected.
|
|
</li>
|
|
<li>Output (such as spooled files) generated by a submitted command exists only on the target system. The output is <i>not</i> sent back to the source system. Therefore display commands or commands that are used to service programs should not be sent because the output results remain at the target system.
|
|
</li>
|
|
<li>Translation is not performed for <i>impromptu</i> messages caused by target system errors, because they are not stored on the system; the text for an impromptu message is sent directly to the source system and displayed. The message identifier of all other message types generated on the remote system is sent back to the source system. The message text that exists for the message identifier on the source system is displayed as it would be for the same error on the source system.
|
|
</li>
|
|
<li>A maximum of 10 messages, generated during the running of a submitted command, can be sent by the target system to the source system. If more than 10 messages are generated, an additional <i>informational</i> message is sent that indicates that the messages exist in the job log for the target job on the target system. If one of those messages is an <i>escape</i> message, the first nine messages of other types are sent, followed by the informational message and the escape message.
|
|
</li>
|
|
<li>In multithreaded jobs, this command is not threadsafe and fails for DDM files of type *SNA.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#SBMRMTCMD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="SBMRMTCMD.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="#SBMRMTCMD.CMD"><b>CMD</b></a></td>
|
|
<td valign="top">Command to run</td>
|
|
<td valign="top"><i>Character value</i></td>
|
|
<td valign="top">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#SBMRMTCMD.DDMFILE"><b>DDMFILE</b></a></td>
|
|
<td valign="top">DDM file</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Required, Positional 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: DDM file</td>
|
|
<td valign="top"><i>Name</i></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr></table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#SBMRMTCMD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="SBMRMTCMD.CMD"></a>
|
|
<h3>Command to run (CMD)</h3>
|
|
<p>Specifies a character string of up to 2000 characters that represents a command that is run on the target system. The command must be allowed in both batch and interactive environments on the target system. The command must be enclosed in apostrophes if it contains embedded blanks or special characters. The command must use the syntax of the target system.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>The normal rule of pairing apostrophes in quoted strings on the local system must be <i>doubled</i> when the same string is submitted to a remote system. This is required to allow coding a quoted string within another quoted string.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#SBMRMTCMD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="SBMRMTCMD.DDMFILE"></a>
|
|
<h3>DDM file (DDMFILE)</h3>
|
|
<p>Specifies the name and library of the Distributed Data Management (DDM) file that is used to submit the command to the target system. The DDM file is used only to determine the remote location representing the target system. The remote file name associated with the DDM file is ignored by this command.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<p>The possible library values are:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>The library list is used to locate the file.
|
|
</dd>
|
|
<dt><b>*CURLIB</b></dt>
|
|
<dd>The current library for the job is used to locate the file. If no library is specified as the current library for the job, the QGPL library is used.
|
|
</dd>
|
|
<dt><b><i>library-name</i></b></dt>
|
|
<dd>Specify the library where the file is located.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#SBMRMTCMD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="SBMRMTCMD.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Deleting a File</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
SBMRMTCMD CMD('DLTF LIBX/FRED') DDMFILE(DENVER)
|
|
</pre>
|
|
</p>
|
|
<p>This command deletes the file named FRED in library LIBX on the target system that is associated with the DDM file named DENVER.
|
|
</p>
|
|
<p><b>Example 2: Creating a Physical File</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
SBMRMTCMD CMD('CRTPF SALES/CAR QGPL/QDDSSRC MASTER')
|
|
DDMFILE(DENVER)
|
|
</pre>
|
|
</p>
|
|
<p>This command creates the physical file CAR in library SALES using the data description specifications (DDS) in the source file QDDSSRC and source member named MASTER in the QGPL library. The DDS must already exist on the target system identified by the DDM file named DENVER in the target job's library list.
|
|
</p>
|
|
<p><b>Example 3: Changing the Text Description</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
SBMRMTCMD CMD('CHGDDMF FILE(LIBX/STANLEY)
|
|
TEXT(''Don''''t forget to pair apostrophes.'')')
|
|
DDMFILE(SMITH)
|
|
</pre>
|
|
</p>
|
|
<p>This command changes the text in the description of the DDM file named STANLEY which is stored in library LIBX. Because the submitted command requires an outside set of single apostrophes (for the CMD parameter), each single or double apostrophe normally required in the TEXT parameter for <i>local</i> system processing must be doubled for <i>remote</i> system processing. The coding above produces a single apostrophe in the text when it is shown or printed on the remote system.
|
|
</p>
|
|
<p><b>Example 4: Creating a DDM File</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
SBMRMTCMD CMD('CRTDDMF FILE(SALES/MONTHLY)
|
|
RMTFILE(*NONSTD ''CAR.SALES(JULY)''
|
|
RMTLOCNAME(DALLAS)')
|
|
DDMFILE(CHICAGO)
|
|
</pre>
|
|
</p>
|
|
<p>This command creates (on the target system identified by the information in the DDM file named CHICAGO) another DDM file named MONTHLY. The new DDM file is stored in a library named SALES on the CHICAGO system. The new DDM file on the CHICAGO system is used to access a file and <i>member</i> on a different system named DALLAS. The accessed file is named SALES/CAR and the member name in the file is JULY.
|
|
</p>
|
|
<p>Note that this CRTDDMF command string contains <i>three</i> sets of single apostrophes: one set to enclose the entire command being submitted, and a double set to enclose the file and member named in the RMTFILE parameter. This is how any i5/OS file <i>member</i> name must be specified on the SBMRMTCMD command, because of the parentheses needed to enclose the member name.
|
|
</p>
|
|
<p><b>Example 5: Replacing a Portion of the Library List</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
SBMRMTCMD CMD('RPLLIBL LIBL(QGPL QTEMP SALES EVANS)')
|
|
DDMFILE(EVANS)
|
|
</pre>
|
|
</p>
|
|
<p>This command replaces the user's portion of the library list being used by the target job associated with the DDM file named EVANS, which is being used by the source job in which this SBMRMTCMD command is being submitted. In that source job, if there are other open DDM files that specify the same device and mode, this library list is used for them also.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#SBMRMTCMD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="SBMRMTCMD.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>CPF9164</b></dt>
|
|
<dd>Target system does not support SBMRMTCMD.
|
|
</dd>
|
|
<dt><b>CPF9165</b></dt>
|
|
<dd>File &1 in library &2 not a DDM File.
|
|
</dd>
|
|
<dt><b>CPF917A</b></dt>
|
|
<dd>Error occurred on distributed file.
|
|
</dd>
|
|
<dt><b>CPF917B</b></dt>
|
|
<dd>Target system &3 not available.
|
|
</dd>
|
|
<dt><b>CPF9172</b></dt>
|
|
<dd>SBMRMTCMD command ended abnormally.
|
|
</dd>
|
|
<dt><b>CPF9174</b></dt>
|
|
<dd>Error on call to user exit program on target system.
|
|
</dd>
|
|
<dt><b>CPF9175</b></dt>
|
|
<dd>Error during processing of user exit program.
|
|
</dd>
|
|
<dt><b>CPF9177</b></dt>
|
|
<dd>User exit program did not complete successfully.
|
|
</dd>
|
|
<dt><b>CPF9178</b></dt>
|
|
<dd>Processing of the command specified by SBMRMTCMD failed.
|
|
</dd>
|
|
<dt><b>CPF9182</b></dt>
|
|
<dd>Cannot start DDM communications.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#SBMRMTCMD.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|