Professional > Data management scripting > Working with UNICOM Intelligence Interviewer - Server data > Exporting UNICOM Intelligence Interviewer - Server data to IBM SPSS Statistics > Exporting UNICOM Intelligence Interviewer - Server Data to IBM SPSS Statistics Using All Versions
 
Exporting UNICOM Intelligence Interviewer - Server Data to IBM SPSS Statistics Using All Versions
If you want to export data for all versions to IBM SPSS Statistics at the end of your project, you can simply select all versions of the metadata and export all of the data in one run. The mrInterviewAllVersionsToSav.dms sample has been designed to cater for this scenario.
mrInterviewAllVersionsToSav.dms
This sample does the following:
In the OnBeforeJobStart Event section, it writes out the highest version number for future reference.
Selects all versions of the metadata for the export.
Exports all non-test data that has the Completed status to IBM SPSS Statistics .sav file.
Saves the output metadata.
This sample is designed to be run once, typically at the end of a project. However, you could use this sample to export data part way through a project and then use it again after collecting more data if there have been no version changes. You would need to change the InputDataSource section to use the output metadata from the previous export and remove the metadata version selection from the InputDataSource section. If there have been version changes, you would need to start a new .sav file. If you want to reuse the same alias names wherever possible use the mrInterviewMoreVersionsToSav.dms sample for the second export.
mrInterviewMoreVersionsToSav.dms
This sample is designed to be run after mrInterviewAllVersionsToSav.dms and after additional versions have been created in the metadata. mrInterviewMoreVersionsToSav.dms creates a new .mdd file for the export by merging in all versions of the project's metadata into the output metadata from mrInterviewAllVersionsToSav.dms. This means that wherever possible the alias names are reused. The sample does not filter the case data according to whether it has already been transferred. However, you could easily modify it to do so using a similar method to that used in the batch export samples.
This sample also writes the highest version number used to a text file for future reference.
If you use this sample more than once, you need to amend it before running it the second and subsequent times to use the output .mdd file from the previous run.
Note The mrInterviewAllVersionsToSav.dms and mrInterviewMoreVersionsToSav.dms sample DMS files are installed with the UNICOM Intelligence Developer Documentation Library. For more information, see Sample DMS files for exporting UNICOM Intelligence Interviewer data.
See also
Exporting UNICOM Intelligence Interviewer - Server data to IBM SPSS Statistics