System arguments

The following table describes system arguments available for command line invocation of the user interface.

Table 1. System arguments
Argument Behavior/Description
@ <commandFile> The @ character followed by a filename specifies a command list. When modelerclient encounters an argument beginning with @, it operates on the commands in that file as if they had been on the command line. See the topic Combining Multiple Arguments for more information.
-directory <dir> Sets the default working directory. In local mode, this directory is used for both data and output. Example: -directory c:/ or -directory c:\\
-server_directory <dir> Sets the default server directory for data. The working directory, specified by using the -directory flag, is used for output.
-execute After starting, execute any stream, state, or script loaded at startup. If a script is loaded in addition to a stream or state, the script alone will be executed.
-stream <stream> At startup, load the stream specified. Multiple streams can be specified, but the last stream specified will be set as the current stream.
-stream_password <password> At startup, load a stream that's password encrypted. For example, you might run a command such as: clemb.exe -stream enc-stream1.str -stream_password Pass1234 -execute
-script <script> At startup, load the standalone script specified. This can be specified in addition to a stream or state as described below, but only one script can be loaded at startup.
-model <model> At startup, load the generated model (.gm format file) specified.
-state <state> At startup, load the saved state specified.
-project <project> Load the specified project. Only one project can be loaded at startup.
-output <output> At startup, load the saved output object (.cou format file).
-help Display a list of command line arguments. When this option is specified, all other arguments are ignored and the Help screen is displayed.
-P <name>=<value> Used to set a startup parameter. Can also be used to set node properties (slot parameters).
Note: Default directories can also be set in the user interface. To access the options, from the File menu, choose Set Working Directory or Set Server Directory.

Loading multiple files

From the command line, you can load multiple streams, states, and outputs at startup by repeating the relevant argument for each object loaded. For example, to load and run two streams called report.str and train.str, you would use the following command:

modelerclient -stream report.str -stream train.str -execute

Loading objects from the IBM SPSS Collaboration and Deployment Services Repository

Because you can load certain objects from a file or from the IBM® SPSS® Collaboration and Deployment Services Repository (if licensed), the filename prefix spsscr: and, optionally, file: (for objects on disk) tells IBM SPSS Modeler where to look for the object. The prefix works with the following flags:

  • -stream
  • -script
  • -output
  • -model
  • -project

You use the prefix to create a URI that specifies the location of the object—for example, -stream "spsscr:///folder_1/scoring_stream.str". The presence of the spsscr: prefix requires that a valid connection to the IBM SPSS Collaboration and Deployment Services Repository has been specified in the same command. So, for example, the full command would look like this:

modelerclient -spsscr_hostname myhost -spsscr_port 8080 
-spsscr_username myusername -spsscr_password mypassword 
-stream "spsscr:///folder_1/scoring_stream.str" -execute

Note that from the command line, you must use a URI. The simpler REPOSITORY_PATH is not supported. (It works only within scripts.) For more details about URIs for objects in the IBM SPSS Collaboration and Deployment Services Repository, see the topic Accessing Objects in the IBM SPSS Collaboration and Deployment Services Repository.