AppendCPCommandOutput (Stringlist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 8: Line 8:
<tr><th>%rc</th><td>The return code from the issued CP command.</td></tr>
<tr><th>%rc</th><td>The return code from the issued CP command.</td></tr>
<tr><th>sl</th>
<tr><th>sl</th>
<td>Stringlist to receive output from the CP command.</td></tr>
<td>The <var>Stringlist</var> to receive output from the CP command.</td></tr>
<tr><th>command</th>
<tr><th>command</th>
<td>The CP command to be issued.</td></tr>
<td>The CP command to be issued.</td></tr>
<tr><th><var>BufferSize</var></th>
<tr><th><var>BufferSize</var></th>
<td>The size of the virtual storage buffer to hold the result of the CP command. AppendCpCommandOutput uses Diagnose X'08' to issue the CP command and Diagnose X'08' requires that the output from the command go to a single contiguous output buffer. This buffer is only used as a staging area to hold the command output until it is moved to the output stringlist.</td></tr>
<td>The size of the virtual storage buffer to hold the result of the CP command. <var>AppendCpCommandOutput</var> uses Diagnose X'08' to issue the CP command and Diagnose X'08' requires that the output from the command go to a single contiguous output buffer. This buffer is only used as a staging area to hold the command output until it is moved to the output <var>Stringlist</var>.</td></tr>
</table>
</table>


==Usage notes==
==Usage notes==
<ul><li>Since a CP command can do nasty things to an Online (like set storage or re-IPL the virtual machine), it is restricted to users with system manager privileges.</li>
</ul>
==Examples==
==Examples==
==See also==
==See also==
{{Template:Stringlist:AppendCPCommandOutput footer}}
{{Template:Stringlist:AppendCPCommandOutput footer}}

Revision as of 12:42, 21 September 2011

Add output from CP command to Stringlist (Stringlist class)

[Introduced in Sirius Mods 7.9]


This callable method invokes a CP command in the Online's virtual machine and adds the output from that command to a Stringlist. The AppendCPCommand method accepts one or more arguments and returns a numeric result. Since CP commands are only available in a CMS environment, this method is useless when running under z/OS (MVS) or VSE and will result in request cancellation if invoked under those operating systems.

Syntax

[%rc =] sl:AppendCPCommandOutput( command, [BufferSize= number])

Syntax terms

%rcThe return code from the issued CP command.
sl The Stringlist to receive output from the CP command.
command The CP command to be issued.
BufferSize The size of the virtual storage buffer to hold the result of the CP command. AppendCpCommandOutput uses Diagnose X'08' to issue the CP command and Diagnose X'08' requires that the output from the command go to a single contiguous output buffer. This buffer is only used as a staging area to hold the command output until it is moved to the output Stringlist.

Usage notes

  • Since a CP command can do nasty things to an Online (like set storage or re-IPL the virtual machine), it is restricted to users with system manager privileges.

Examples

See also