Running the mrScriptBasic examples
You can run the mrScriptBasic (.mrs) examples using the mrScript Command Line Runner or, with two exceptions, in UNICOM Intelligence Professional. The exceptions are the fourth and fifth examples, which are designed to be run using the mrScript Command Line Runner with the /m option.
Copy the mrScriptBasic code into UNICOM Intelligence Professional or a text editor and save as a text file with an .mrs filename extension. This is not necessary if you have the UNICOM Intelligence Developer Documentation Library, because all of the examples in this section are supplied as sample files.
Before you run the examples, check that any filenames, and file and folder locations that are referred to in the examples are correct for your system, and if necessary edit the examples accordingly.
Some of the examples use error handling that sets up an error string containing the line number in the script file at which the error occurred and the description of the error. If you run the samples using
mrScript Command Line Runner, use the
/v option to display the final contents of all of the variables, including the error string. This means you can check the contents of the error string to see if there were any errors. If you are using UNICOM Intelligence Professional to run the sample, check the value of the error string in the Locals pane when the script has finished running.
Running the mrScriptBasic samples in UNICOM Intelligence Professional
1 Open UNICOM Intelligence Professional.
2 Open the .mrs file you want to run. (The sample mrScriptBasic files are typically in the [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Scripts\General\mrScriptBasic folder.)
3 Press F5 OR choose Start from the Debug menu OR select the Start tool on the Debugging toolbar.
For more information on editing, running, and debugging mrScriptBasic files in UNICOM Intelligence Professional, see
Using UNICOM Intelligence Professional.
Running the mrScriptBasic samples using the mrScript Command Line Runner
1 Open a Command Prompt. For example, in Windows choose Programs from the Windows Start menu, and then choose Accessories, followed by Command Prompt.
2 Change to the folder in which the sample files are located. This is typically the [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Scripts\General\mrScriptBasic folder.
3 Type mrScriptCL followed by the name of the file you want to run and the options you require. For example, to run the Functions.mrs sample, enter:
mrScriptCl Functions.mrs
See also