Desktop User Guides > Professional > Data management scripting > Transferring data using a DMS file > Writing data > Transferring data to a UNICOM Intelligence Data File
 
Transferring data to a UNICOM Intelligence Data File
This topic provides some notes on using a DMS file to transfer case data to a UNICOM Intelligence Data File (.ddf or .dzf). The DMS file uses the UNICOM Intelligence Data File CDSC to write the data to the UNICOM Intelligence Data File.
Writing to a new file
If the UNICOM Intelligence Data File you specify in the OutputDataSource section does not exist, the UNICOM Intelligence Data File CDSC will create a new file.
Writing to an existing file
The UNICOM Intelligence Data File CDSC can write data to an existing UNICOM Intelligence Data File. If the structure of the data has changed, the UNICOM Intelligence Data File CDSC will update the structure in the existing file whenever possible. You can update data that was transferred previously only if you include the UseInputAsOutput option in the OutputDataSource section. Otherwise, the DMS file merely appends the new case data records to the end of the UNICOM Intelligence Data File. You should therefore be careful not to create duplicate records in the UNICOM Intelligence Data File by exporting the same case data more than once.
Setting up weighting
The UNICOM Intelligence Data File CDSC can update existing records and so you can use the Weight component to set up weighting in the UNICOM Intelligence Data File. For an example of doing this, see Setting up weighting in a DMS file.
Limitations
Each level can have a maximum of 32,674 fields; this limit is because of the underlying SQLITE maximum columns setting. The limit is based on the number of fields at a level, not the number of variable instances. It applies to both read and export. If this limit is exceeded, a “Failed to create the column 'column_name'” error occurs.
Exporting to a UNICOM Intelligence Data File
In the connection string in the OutputDataSource section, specify mrDataFileDsc for the Data Source property and the name and location of the UNICOM Intelligence Data File for the Location property. For example:
OutputDataSource(Output,"The output data source")
  ConnectionString = "Provider=mrOleDB.Provider.2; _
      Data Source=mrDataFileDsc; _
      Location=[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\ _
          Output\AnalysisData.ddf;
      MetaDataOutputName =
          [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\ _
          Output\AnalysisData.mdd"
End OutputDataSource
Exporting to a compressed file
Follow the instructions in Exporting to a UNICOM Intelligence Data File, but specify the .dzf file extension instead of .ddf. For example:
OutputDataSource(Output,"The output data source")
  ConnectionString = "Provider=mrOleDB.Provider.2; _
    Data Source=mrDataFileDsc; _
    Location=[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\
    Output\AnalysisData.dzf;
    MetaDataOutputName = _
      [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\ _
Output\AnalysisData.mdd"
End OutputDataSource
The UNICOM Intelligence Developer Documentation Library includes some sample DMS files that transfer data to a UNICOM Intelligence Data File. For more information, see Sample DMS files.
See
Writing data