Professional > Data management scripting > DMS Runner > Running a DMS file
 
Running a DMS file
1 From the Windows Start menu, choose All Programs > UNICOM Intelligence 7 > Professional > Tools > DMSRun.
2 Type DMSRun followed by the location and name of the file you want to run and the options that you require.
Syntax
DMSRun filename.extension [<options>]
filename.extension specifies the location, name, and filename extension of the DMS file that you want to run. If the file location or filename contains spaces, enclose filename.extension in double quotation marks (" "). If you change to the folder in which your DMS file is located, you do not need to specify the location of the DMS file.
Options
/s
Run in silent mode. This means that progress statements will not be displayed.
/novalidate
Do not validate the DMS file.
/norun
Do not run the DMS file. Does run the OnBeforeJobStart event section. This option is useful when you want to validate a file without running it.
/break
Makes DMS Runner stop the run if it encounters a record that fails validation.
/x
If the run fails when you are using this option, DMS Runner saves the application state to an XML file. This has a filename of the form myFile_exception_yyyymmdd_hhmmss.xml, where yyyy represents the year, mm the month, and so on. If you need to contact UNICOM Intelligence Technical Support because of the failure of a DMS file, you might be asked to run the file again using this option and send the XML file to the support consultant.
/a: filename
Expand any include files and save the expanded DMS file to the name and location specified in filename. This is useful when you are using the include feature and need to debug your code, because the line numbers shown in mrScriptBasic and mrScriptMetadata error messages refer to the line numbers in the expanded file. Similarly, if you are using the text replacement feature, the expanded file enables you to see how the texts were replaced.
/d A
Defines the specified variable A in the expanded DMS file. You can use this option more than once.
/d" A B "
Replaces all occurrences of A in the expanded DMS file with B. Occurrences of A that occur within string literals (quoted strings) are not replaced, however. The search is case‑sensitive. You can use this option more than once to specify multiple texts to be replaced.
/d" A \"B\""
Replaces all occurrences of the specified text A in the expanded DMS file with a specified replacement text B within quotation marks. Occurrences of A that occur within string literals (quoted strings) are not replaced, however. This format is required when double-quotes are needed in the definition, in order to get a text string value. The search is case‑sensitive. You can use this option more than once.
/d" A(x y) f(x, y) "y
Defines the specified variable A in the expanded DMS file as a function of arguments x and y, with a value of f(x, y). You can use this option more than once.
/loc:<location>
Optional. The package extraction destination. If a location is not specified, the default location (C:\Documents and Settings\<User Name>\Temp) is used to extract the .dmz package and execute script.
/p: priority
Set the process priority to the specified value. This controls how fast the process runs. The Idle and BelowNormal values are useful for jobs you want to run overnight, for example, with the minimum impact on other processes that are running. Using the AboveNormal, High, and RealTime priorities can adversely affect the performance of other processes. The default is Normal.
Value
Description
Low
This is the lowest possible priority value.
BelowNormal
Specifies a priority that is one step below the normal.
Normal
Specifies the normal priority. This is the default value.
AboveNormal
Specifies a priority that is one step above the normal.
High
Specifies a high priority.
RealTime
Specifies the highest priority.
/?
Display the syntax and options.
Examples
The following example runs the Simple.dms sample file (see Sample DMS files) using the default options (validation, normal priority, and not silent.) This example assumes that you have already changed to the folder where Simple.dms is located:
DMSRun Simple.dms
The following example runs the same file without validating it:
DMSRun Simple.dms /novalidate
The following example runs the DMSRunExample.dms sample file after replacing all occurrences of the text Target with the text string “MyOutputTestFile”, and also after replacing the text LogSize with the text 350:
DMSRun DMSRunExample.dms /d"Target \"MyOutputTestFile\"" /d"LogSize 350"
If you do not change to the folder where Simple.dms or DMSRunExample.dms is located, you must specify the location of the file. For example:
DMSRun "[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Scripts\Data Management\DMS\Simple.dms"
The following example runs a .dmz package using the default location:
DMSRun "test.dmz"
The following example runs a .dmz package using a specified location:
DMSRun "test.dmz" /loc:"c:\test"
Note You can use the At command or the Windows Scheduled Task wizard to schedule the execution of your DMS files, for example, during the night or at regular intervals. For more information, see Scheduling DMS files.
Tips
If you change to the folder in which your DMS file is located, you do not need to specify the location of the DMS file.
You can run a DMS file in Windows Explorer by dragging it to the folder that DMSRun.exe is in, and then drop it on DMSRun.exe. By default, DMSRun.exe is in:
C:\Program Files\Common Files\IBM\SPSS\DataCollection\<version> DMOM\version
If necessary, you can stop DMS Runner by pressing Ctrl+C. However, if you do this, any output that has been generated is likely to be corrupt or unusable.
You can use the At command or the Windows Scheduled Task wizard to schedule the execution of your DMS files, for example, during the night or at regular intervals. For more information, see Scheduling DMS files.
Requirements
UNICOM Intelligence Professional
See also
DMS Runner