Transferring data to Triple-S
You can transfer data to Triple-S files by using the Triple-S DSC. The Triple-S DSC can output files that meet version 1.2 or version 2.0 of the Triple-S standard. Version 2.0 of the standard supports case data files that contain either fixed-format fields or comma-separated values, while version 1.2 of the standard supports only fixed-format fields. However, the Triple-S DSC cannot output hierarchical data (which was introduced in the version 2.0 standard). For more information, see
Triple-S DSC.
Writing to new files
If the Triple-S metadata and case data files you specify in the
OutputDataSource section do not exist, the Triple-S DSC will create new files.
Writing to existing files
The Triple-S DSC will append data to an existing file that has the same name as the Triple-S case data file to be written, but does not attempt to check whether the format and structure of the existing data and the new data are the same.
The Triple-S DSC always overwrites an existing file that has the same name as the Triple-S metadata file to be written.
Specifying the format of the Triple-S case data
By default, the Triple-S DSC outputs fixed-format fields. To specify that you want comma-separated values, you must include the
MR Init Custom connection property in the connection string for the OutputDataSource: see
Exporting to Triple-S files.
Output metadata
Typically, you will want to write the metadata to a Triple-S metadata file, so that the case data and metadata can be read together by a third-party application that supports Triple-S. However, you can also (or instead) output a metadata document (.mdd) file, which you might want to do if you plan to read the Triple-S case data using another UNICOM Intelligence product. In general though, it is better to use a UNICOM Intelligence Data File to store “offline” interview data.
Exporting to Triple-S files
In the connection string in the
OutputDataSource section, specify
mrTripleSDsc for the
Data Source and the
MR Init MDSC connection properties. Specify the name and location of the Triple-S case data file, which will normally have a .
asc, .
dat, or .
csv extension, for the
Location connection property. Then specify the name and location of the Triple-S metadata file, which will normally have a .
sss or .
xml extension, for the
Initial Catalog connection property.
Finally, if you want the case data to consist of comma-separated values instead of fixed-format fields, you must include the MR Init Custom connection property, as shown in the following example:
OutputDataSource(Output, "The output data source")
ConnectionString = "Provider=mrOleDB.Provider.2; _
Data Source = mrTripleSDsc; _
Location = <Name and location of .asc, .dat, or .csv file>; _
Initial Catalog = <Name and location of .sss or .xml file>; _
MR Init MDSC = mrTripleSDsc; _
MR Init Custom = 'SssFormat = csv'"
End OutputDataSource
To export fixed-format fields, either omit the MR Init Custom property, or set the value of SssFormat to “fixed” instead of “csv”.
If you do not require a Triple-S metadata file, omit the Initial Catalog and MR Init MDSC connection properties. To create a metadata document (.mdd) file instead, add a MetaDataOutputName statement to the OutputDataSource section. For example:
OutputDataSource(Output, "The output data source")
ConnectionString = "Provider=mrOleDB.Provider.2; _
Data Source=mrTripleSDsc; _
Location=C:\Program Files\UNICOM\Intelligence\<version>\DDL\Output\MyTripleSData.asc"
MetaDataOutputName = "C:\Program Files\UNICOM\Intelligence\<version>\DDL\Output\MyTripleSData_asc.mdd"
End OutputDataSource
Example
This example has two OutputDataSource sections, which create two Triple-S case data files containing fixed-format fields and comma-separated values:
OutputDataSource(myOutputDataSource1, "Output metadata and fixed-format case data")
ConnectionString = "Provider=mrOleDB.Provider.2; _
Data Source=mrTripleSDsc; _
Location=C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Output\RDBToTripleS.asc; _
MR Init MDSC = mrTripleSDsc; _
Initial Catalog = C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Output\RDBToTripleS_asc.xml; _
MR Init Custom = 'SssFormat = fixed'"
End OutputDataSource
' Output the Triple-S metadata file
' and comma-separated case data file
OutputDataSource(myOutputDataSource2, "Output metadata and comma-separated case data")
ConnectionString = "Provider=mrOleDB.Provider.2; _
Data Source=mrTripleSDsc; _
Location=C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Output\RDBToTripleS.csv; _
MR Init MDSC = mrTripleSDsc; _
Initial Catalog = C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Output\RDBToTripleS_csv.xml; _
MR Init Custom = 'SssFormat = csv'"
End OutputDataSource
This example is taken from the
RDBToTripleS.dms sample file, which is installed with the UNICOM Intelligence Developer Documentation Library. For more information, see
Sample DMS files.
See