Professional > Data management scripting > Samples > Sample batch files
 
Sample batch files
The UNICOM Intelligence Developer Documentation Library has some sample MS-DOS batch files that have been set up to perform various data management-related tasks. By default, the batch files are installed in the [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Scripts\Data Management\Batch folder.
Some of the batch files reference various sample files. If the sample files are stored in a different location on your computer, you must edit the sample batch files accordingly before running them. You must also check that the data files they reference are in the specified locations, and so on.
CategoricalsOnly.bat
This batch file runs the following:
The ListCategoricalVars.mrs sample mrScriptBasic file, which creates a text file that sets up the first part of the select query with the names of all the categorical variables in the Short Drinks sample .mdd file. For more information, see Restricting the variables in the export.
The UNICOM Intelligence Interviewer - Server CategoricalsOnlyToDDF.dms sample DMS file, which uses the output of the ListCategoricalVars.mrs sample as an include file to export all of the categorical variables in the Short Drinks sample database. To run this sample, you need access to a SQL Server installation and appropriate user access rights, and you need to restore the Short Drinks sample. For more information, see The Short Drinks sample.
This file can be run as a scheduled task. For more information, see Using the At command to schedule a DMS file.
CreateRDBDatabase.bat
This batch file uses the SQL Server isql command line utility to create a database called SavToRDB. The SavToRDB.dms sample DMS file uses the ShellExecute function to call this batch file to set up the database prior to the transfer. You need SQL Server Client Tools to run this sample. Before you run this sample, make that the parameters specified for the isql utility are correct for your installation. You must change CreateRDBDatabase.bat to call sqlcmd instead of isql. For more information, see the SQL Server documentation.
RunGlobalSQLVariableExample.bat
This batch file changes to the folder where the DMS sample files are installed and then runs the UseInputAsOutput.dms, GlobalSQLVariableSetup.dms, and GlobalSQLVariable.dms sample files. The batch file ends with a pause statement, which stops the command prompt from closing automatically, so that you can check for error messages.
RunTwoDMSFiles.bat
This batch file changes to the folder where the DMS sample files are installed and then runs the Simple.dms and MDM2Quantum.dms sample files. The batch file ends with a pause statement, which stops the command prompt from closing automatically, so that you can check for error messages.
Requirements
UNICOM Intelligence Professional 7.5
Some files require the use of a SQL Server database
See also
Samples