7: Running a Data Management script
This example shows how to run a
Data Management Script (DMS) file by using mrScriptBasic. Typically, data management scripts are run directly using UNICOM Intelligence Professional. However, you may want to run a data management script from mrScriptBasic if you are combining several related tasks in a single mrScriptBasic script.
The example uses the Data Management object model to run a sample data management script file called MyFirstTransfer.dms, which is installed with the UNICOM Intelligence Developer Documentation Library.
Dim DMOMJob
Set DMOMJob = CreateObject("DMOM.Job")
DMOMJob.Load("C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Scripts\Data Management\DMS\MyFirstTransfer.dms", null)
DMOMJob.Run()
Note DMOM.Job is the COM class name for the IJob interface, which is part of the .NET namespace called
SPSSMR.Data.Transformations in the Data Management object model. For more information, see
SPSSMR.Data.Transformations in the MDM Object Model Reference.
Directives can be passed to the Data Management Script (DMS) via the IJob.Load function's second parameter:
Dim Directives
Dim DMOMJob
Set Directives = CreateObject("DMOM.StringCollection")
Directives.add("#define INPUTPATH ""C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Data\Data Collection File\""")
Directives.add("#define OUTPUTPATH ""C:\Program Files\SPSSInc\PASWDataCollection5.6\DDL\Output\""")
Set DMOMJob = CreateObject("DMOM.Job")
DMOMJob.Load("C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Scripts\Data Management\DMS\UtilizeOuterDirectives.dms", Directives)
DMOMJob.Run()
See also