MicroStrategy ONE

Environment settings

In console mode in the Command Manager command line interface, you can view and change the environment settings with the SHOWENV and SETENV commands.

In the graphical interface, you can set these options from the Options dialog box.

The SETENV command is followed by an environment option and a setting. It changes that option to the specified setting. For example, entering SETENV -stoponerror ON changes the stoponerror setting to ON.

The SHOWENV command is followed by one or more environment options, without settings. It displays the current settings of those options. For example, entering SHOWENV -maxhist -l displays the current maximum number of saved history entries and whether or not file logging is enabled.

SHOWENV can also be used without a list of arguments. In this case it displays the current setting of all environment options.

General environment settings

Copy
-maxhist [number]

Determines the maximum number of history entries saved in memory. This number must be between 1 and 99.

Copy
-stoponerror [ON | OFF]

If ON, execution stops when a script encounters a critical error. If OFF, execution does not stop when a script encounters a critical error. For information about critical errors, see Script errors: Execution errors.

Copy
-suppresshidden [ON | OFF]

If ON, hidden objects are suppressed in the results of any LIST commands. If OFF, hidden objects are shown in the results of any LIST commands.

Logging settings

Copy
-l [ON | OFF]

If ON, script output is logged according to the most recently specified settings for logging. If OFF, script output is not logged.

Using SHOWENV with this setting also displays the names of the log files.

Copy
-o [Outputfile]

Logs results, status messages, and error messages associated with the script to the specified log file. This can include the file's full path. If it contains spaces, it must be enclosed in double quotes (").  If no file is specified, CmdMgr.log is used by default.

Copy
-or [Resultsfile]

Logs results (only) to the specified log file. This can include the file's full path. If it contains spaces, it must be enclosed in double quotes ("). If no file is specified, CmdMgrResults.log is used by default.

Copy
-of [Failedfile]

Logs error messages (only)  to the specified log file. This can include the file's full path. If it contains spaces, it must be enclosed in double quotes ("). If no file is specified, CmdMgrFail.log is used by default.

Copy
os [Successfile]

Logs status messages (only)  to the specified log file. This can include the file's full path. If it contains spaces, it must be enclosed in double quotes ("). If no file is specified, CmdMgrSuccess.log is used by default.

Copy
-i [ON | OFF]

If ON, script statements are included in the log files. If OFF, script statements are not included in the log files.

Copy
-e [ON | OFF]

If ON, error codes are included in the log files. If OFF, error codes are not included in the log files.

Copy
-h [ON | OFF]

If ON, headers are included in the log files. If OFF, headers are not included in the log files.

Examples

Copy
SETENV -l ON

Turns logging on.

Copy
SETENV -or "Script Results.log" -h OFF

Logs the results of scripts to the file Script Results.log, without including the headers.

Copy
SHOWENV -l

Displays whether logging is enabled. If logging is enabled, also displays the names of the log files.

Copy
SHOWENV -maxhist -o -usejava

Lists the maximum number of History List entries, the current log file, and whether Java syntax or Command Manager syntax is used to process scripts.

Copy
SHOWENV

Lists all the current environment settings.

Related Topics

Using the text-based Command Manager interface

Connection instructions

Loading a script

Editing, saving, and executing a script

Options dialog box