Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
CMD | Command | Character value, *NOLOGCMD | Required, Positional 1 |
SERVER | Server | Character value | Required, Positional 2 |
NOLOGCMD | Command (not logged) | Character value | Optional |
SVRTYPE | Server type | *NWSUSRA, *NWSA, *WINDOWS, *NETWARE, *WINDOWSNT | Optional |
CMDTYPE | Command type | *SVRTYPE, *WINDOWS, *NETWARE, *WINDOWSNT | Optional |
LODUSRPRF | Load user profile | *YES, *NO | Optional |
AUTDMN | Authentication domain | Character value, *PRIMARY, *LOCAL | Optional |
CMDSTDOUT | Command standard output | Path name, *JOBLOG, *PRINT | Optional |
CVTSTDOUT | Convert standard output | *YES, *NO | Optional |
Top |
Specifies the command submitted to the network server. The syntax of the command string specified for this parameter is not checked.
This is a required parameter.
Top |
Specifies the name of the server to which the command is submitted.
This is a required parameter.
Top |
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.
Note: 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.
Top |
Specifies the type of server to which the command is sent.
Note: *WINDOWS should be used in V5R4 and later releases. The *WINDOWSNT value is supported for compatibility with releases prior to V5R4.
Top |
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.
Note: This parameter is ignored.
Note: *WINDOWS should be used in V5R4 and later releases. The *WINDOWSNT value is supported for compatibility with releases prior to V5R4.
Top |
Specifies whether or not to load the user profile on the remote server as part of the login environment.
Note: This parameter is only valid when SVRTYPE(*WINDOWS) or (*WINDOWSNT) is specified.
Top |
Specifies the Windows domain where the user is authenticated.
Note: This parameter is only valid when SVRTYPE(*WINDOWS) or (*WINDOWSNT) is specified.
Top |
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.
Note: This parameter is only valid when SVRTYPE(*WINDOWS) or (*WINDOWSNT) is specified.
Top |
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.
Note: This parameter is only valid when CMDSTDOUT(*PRINT) or CMDSTDOUT(stream-file-path-name) is specified.
Top |
Example 1: Submitting a Windows Command
SBMNWSCMD CMD('net config server') SERVER(WINSVR) CMDSTDOUT(*JOBLOG)
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.
Example 2: Submitting a NetWare command
SBMNWSCMD CMD('CONFIG') SERVER(NTW01) SVRTYPE(*NETWARE)
This command submits the NetWare CONFIG command to run on the server named NTW01. Output is returned to the job log.
Top |
*ESCAPE Messages
Top |