Running Remote Commands

You can use the cfsend command on the command line to send a command and run it in a remote system.

To run a command remotely, specify the TransferType parameter as C (C stands for command). This parameter can be set on a command line or in templates.

You have to specify both the type of command and the actual command you want to use.

Remote Command Types

Use different parameters to indicate the type of a command:
  • If the remote system is a Windows or UNIX system, the parameter is:

    rcmd|remotecommand

  • If the remote system is a z/OS system, the parameters are:
    • e:|exec: and re:|rexxexec: used for an executable.
    • sj:|subjcl: used for submitting job control language.
    • cj:|calljcl: used for calling programs with JCL linkage.
    • cpg:|callpgm: used for calling a program with standard linkage.
    Note: Each of the parameters must be followed by the command to be used.

Examples: Running Remote Commands

The following example is to run a remote command using the cfsend command:

cfsend n:UNIXNode trtype:C rcmd:"ls -la"