Data Model > Available DSCs > UNICOM Intelligence Data File CDSC > Transferring hierarchical data to a UNICOM Intelligence Data File
 
Transferring hierarchical data to a UNICOM Intelligence Data File
You transfer hierarchical data to a UNICOM Intelligence Data File by using a Data Management Script (.dms) to. Select the input data source via HDATA. This will transfer unbounded loops to a UNICOM Intelligence Data File. The advantage of this method is that it allows you to add processing script in the various event sections. To do so you only need to create a SELECT QUERY such as SELECT * FROM HDATA. For more information, see Data Management Script (DMS) file.
In previous UNICOM Intelligence releases it was not always possible to use a Data Management Script or SQL Server Data Transformation Services (DTS) to transfer a hierarchical data source successfully to a UNICOM Intelligence Data File when the case data was represented in the metadata as an unbounded loop.
You can still transfer hierarchical data that contains unbounded loops to a UNICOM Intelligence Data File, by running an mrScriptBasic script called CdscHdataTransfer.mrs, which is supplied with the UNICOM Intelligence Developer Documentation Library.
To run CdscHdataTransfer.mrs
1 Open a Command Prompt. For example, in the Windows XP Start menu, choose: Programs > Accessories > Command Prompt
2 Change to the folder that CdscHdataTransfer.mrs is in. By default, this is:
[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Scripts\General\mrScriptBasic
3 Enter mrscriptcl CdscHdataTransfer.mrs.
This executes the script, which opens a Data Link Properties dialog box.
4 On the Connection tab, enter the details of the metadata and case data that you want to transfer. For example, to transfer the Household sample data set that is supplied with the DDL, enter the following:
Metadata Type
Intelligence Metadata Document
Metadata Location
[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\XML\household.mdd
Case Data Type
Intelligence XML Data File (read-write)
Case Data Location
household.xml
For more information, see Data Link Properties: Connection.
5 Click OK.
The Data Link Properties dialog box opens again so that you can enter the target data source.
6 On the Connection tab, enter the following:
Metadata Type
(none)
Case Data Type
UNICOM Intelligence Data File (read-write)
Case Data Location
The name and location of the UNICOM Intelligence Data File, for example, [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Output\household.ddf
7 Click OK.
The dialog box closes and when the script has finished running the command prompt reappears. The data has been transferred to the UNICOM Intelligence Data File.
See also
UNICOM Intelligence Data File CDSC