Professional > Data management scripting > DMS Runner
 
DMS Runner
DMS Runner is a command prompt utility that is installed with UNICOM Intelligence Professional. DMS Runner enables you to run a DataManagementScript (DMS) file. Typically DMS files have a .dms filename extension.
You can create your DMS files using UNICOM Intelligence Professional or a standard text editor, such as Notepad. When using a text editor, make sure that you save your DMS files using the Unicode or UTF-8 text format option and not the ANSI option if the files contain non-Western European characters.
By default, DMS Runner validates the DMS file, which involves checking that the correct syntax has been used. For example, DMS Runner checks the connection strings and SQL syntax defined in the InputDataSource and OutputDataSource sections, the mrScriptMetadata defined in the Metadata Section, and the mrScriptBasic syntax in the Event sections. This pre-execution validation checks the mrScriptBasic syntax only and not that the names of any questions referred to in the mrScriptBasic code are correct or that those questions are included in the transformation, for example. However, these things are checked when the file is executed. Use the /novalidate option if you want to run a DMS file without first validating it. However, it is recommended that you use the validate option.
When encountering an mrScriptBasic or mrScriptMetadata error either during the validation process or during the execution of the file, DMS Runner will display a message that includes the approximate line number at which the error was encountered. This represents the line number within the expanded file (that is, after any #Include and #Define statements have been expanded and comments and invalid code between sections have been removed). You can use the /a option to save the expanded file.
What happens when the DMS Runner encounters a record that cannot be written to the output data source depends on whether you are using the option to validate the data. (You choose this option by setting the MR Init Validation connection property to True in the OutputDataSource section. For more information, see Validation options when transferring data.)
When validation is selected, by default DMS Runner displays an “Error writing record: <Record number>” message on the screen and continues with the run. If the DMS file has a Logging section (see also Logging section, DMS Runner also writes the record and the message to the log file. At the end of the run, DMS Runner displays the total number of “bad” records that were encountered. (A “bad” record is a record that fails the validation.) However, you can make the run stop if DMS Runner encounters a record that fails the validation. You do this using the /break option when you run the file.
If validation is not selected, DMS Runner stops if it cannot write a record for any reason.
If you have more than one OutputDataSource section and validation is selected in one (or more) and not in another one (or more), DMS Runner will stop exporting records to the data sources for which validation is not being used when it encounters a record that cannot be written, however, it will continue exporting data to the data source(s) for which validation is selected, unless you select the /break option when you run the file.
DMS Runner automatically sets the current folder to be the location of the DMS file. This means that in your DMS files, you can refer to file locations using a relative path (relative to the location of the DMS file), or no path if the files are in the same folder as the DMS file.
If necessary, you can stop DMS Runner by pressing Ctrl-C. However, when you do this, any output that has been generated is likely to be corrupt or unusable.
Requirements
UNICOM Intelligence Professional
See also
Running a DMS file
Scheduling DMS files
Data management scripting