Overview (HOST command)

The HOST command executes external commands at the operating system level. For a Windows operating system, for example, this is equivalent to running commands from a command prompt in a command window.

  • No output is displayed in a command window. Output is either displayed in the Viewer or redirected as specified in the operating system command.
  • Standard output is either displayed in a text object in the Viewer window or redirected as specified in the operating system command.
  • Standard errors are displayed as text objects in the Viewer.
  • Commands that return a prompt for user input result in an EOF condition without waiting for any user input (unless input has been redirected to read from a file).
  • A command that generates an error condition terminates the HOST command, and no subsequent commands specified on the HOST command are executed.
  • The HOST command runs synchronously. Commands that launch applications result in the suspension of further IBM® SPSS® Statistics processing until the application finishes execution, unless you also specify a time limit (see keyword TIMELIMIT). For example, in Windows operating systems, if a file extension is associated with an application, simply specifying a file a name an extension on the command line will launch the associated application, and no further commands will be executed until the application is closed.
  • The HOST command starts in the current working directory. By default, the initial working directory is the installation directory.
  • In distributed analysis mode (available with IBM SPSS Statistics Server), file paths in command specifications are relative to the remote server.