run Statement

Added: build 1

Purpose

Issues the command that runs the analysis.

Applicability

The run statement can be used within RunCommands sections.

Additional Information

Multiple run statements can be used in a single component. It is typically used to execute the program being wrapped. The run statement emulates a single line command at the operating system's prompt, so it can itself accept only a single line.

Syntax

run <command> [ignoreErrors=true|false] [autoChangeDir=true|false] [shell=value]

Arguments

NameDescription
command The command to run. The command, or parts of it, may be specified at run-time by using userVariables. Prior to running the command, the Analysis Server will switch to the directory where the .fileWrapper file is stored. If the exit status of the command is non-zero, the FileWrapper will report a failure when the command is run.

Options

NameDescription
ignoreErrors Some programs erroneously indicate that they have failed when they run. If you are sure that the program is succeeding, but the Analysis Server is indicating that the program is failing, you may need to set this value to true. The default is false.
autoChangeDir Prior to running the command, the Analysis Server first tries to switch to the directory where the .fileWrapper file is stored. In some rare circumstances, this may interfere with the program. In this case you can try to set this option to false and fully specify all required paths in the command. The default for this command is true.
shell New for build 204. For UNIX installations the value specifies the shell used to run the command. The default is "sh". For machines running Java 1.3 or later the value of "none" may be used. The value will cause the Analysis Server to issue the command directly rather than creating a shell. The "none" value applies to UNIX and non-UNIX systems.

Example

Suppose we have an executable named myProg that is located in the same directory as the .fileWrapper file. Issuing the following command on the command line will result in file1.in being used as the input file and file2.out being created as the output file.
myProg file1.in file2.out
To perform the same task inside the FileWrapper system, the following should be included in the RunCommands section of the FileWrapper file.
run "myProg file1.in file2.out"

See also Analysis Server | FileWrapper | FileWrapper Statements