z/OS Communications Server: IP User's Guide and Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The z/OS UNIX orexec/rexec command—Execute a command on the remote host

z/OS Communications Server: IP User's Guide and Commands
SC27-3662-00

Purpose

Use the z/OS UNIX orexec/rexec command to execute a command on the remote host and receive the results on the local host.

Notes:
  1. The rexec command is a synonym for the orexec command in the z/OS UNIX shell. The rexec command syntax is the same as that for the orexec command.
  2. If the -s parameter is not used to specify the port, the port to be used by the client must be defined in the /etc/services file as an exec entry defined to TCP. For information on /etc/services, Protocol Number and Port Assignments, see the z/OS Communications Server: IP Configuration Reference.

Format

Read syntax diagramSkip visual syntax diagram
>>-orexec--+-----+--+-----+--+-------------+-------------------->
           '- -?-'  '- -d-'  '- -l user_id-'   

                     .- -s port-.                       
>--+--------------+--+----------+--+------+--+------+----------->
   '- -p password-'  '- -s port-'  '- -C -'  '- -V -'   

>--foreign_host--command---------------------------------------><

Note: Enter the orexec parameters -d, -l, -p, and -s in lowercase letters because they are case sensitive. The user_id and password parameters can be case sensitive, depending on the operating system of the remote host.

Parameters

-?
Displays the help message.
-d
Activates debug tracing.
-l user_id
Specifies the user ID on the foreign host.
-p password
Specifies the password for the user ID on the foreign host.
-s port
Specifies the TCP port number of the rexec server on the foreign host. The default is the port number defined in /etc/services.
-C
Forces messages to be displayed in uppercase characters.
-V
Displays the z/OS® Communications Server version and release.
foreign_host
Specifies the name or IP address of the foreign host to which you are sending the orexec command. Specify the foreign host by its host name or IP address. When using IPv6 link-local addresses, scope information can be provided along with the name or IP address, as described in the s upport for scope information in the z/OS Communications Server: IPv6 Network and Application Design Guide.
command
Specifies the command that is sent to the foreign host. The command is composed of one or more words. Coding is assigned after checking the prefixed parameters (-l, -p, -s) and assigning the remaining string as the command. The command you specify must not require a response from you to complete. The orexec command cannot interact with you after you enter data in the command format.

Examples

Use the orexec command to execute a command on a remote host:
 orexec -l user28 -s 512 mvs1 lista
 
 SYS1.HELP
 GIM.SGIMCLS0
 DSN230.DSNCLIST
 USER.CLIST
 BUILD.CLIST
 SYS1.HRFCLST
 USER28.ORSHD5.JOB00160.D0000103.?
.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013
This information center is Built on Eclipse™ ( www.eclipse.org ).