Overview (SAVE DATA COLLECTION command)
SAVE DATA COLLECTION produces IBM® SPSS® Statistics data files and IBM SPSS Data Collection metadata files that you can use to read the IBM SPSS Statistics data file into IBM SPSS Data Collection applications such as mrTables and mrInterview. This is particularly useful when "roundtripping" data between IBM SPSS Statistics and IBM SPSS Data Collection applications. For example, you can read an IBM SPSS Data Collection Interviewer Server data source into IBM SPSS Statistics, calculate some new variables, and then save the data in a form that can be read by mrTables, without loss of any of the original metadata attributes.
Note: There may be instances where the data cannot be re-loaded to the Data Collection database in the correct format due to the complexity in the structure.
Options
Variable subsets and order. You can use the DROP and KEEP subcommands to save a subset of variables and reorder the variables that are saved.
Filtered cases. If filtering is in effect, you use the UNSELECTED subcommand to specify inclusion or exclusion of filtered cases. By default, all cases are included.
Variable map. To confirm the names and order of the variables that are saved in the IBM SPSS Statistics data file, use the MAP subcommand. MAP displays the variables that are saved in the IBM SPSS Statistics data file next to their corresponding names in the active dataset.
Basic specification
The basic specification is the OUTFILE subcommand that specifies a name for the IBM SPSS Statistics data file to be saved and the METADATA subcommand that specifies the name for the IBM SPSS Data Collection metadata file.
Subcommand order
- Subcommands can be specified in any order.
Syntax rules
- OUTFILE and METADATA are required and can be specified only once.
- KEEP, DROP, MAP, and UNSELECTED are optional.
Operations
For new variables and datasets not created from IBM SPSS Data Collection data sources, IBM SPSS Statistics variable attributes are mapped to IBM SPSS Data Collection metadata attributes in the metadata file according to the methods described in the SAV DSC documentation in the IBM SPSS Data Collection Developer Library.
If the active dataset was created from a IBM SPSS Data Collection data source:
- The new metadata file is created by merging the original metadata attributes with metadata attributes for any new variables, plus any changes to original variables that might affect their metadata attributes (for example, addition of, or changes to, value labels).
- For original variables read from the IBM SPSS Data Collection data source, any metadata attributes not recognized by IBM SPSS Statistics are preserved in their original state. For example, IBM SPSS Statistics converts grid variables to regular IBM SPSS Statistics variables, but the metadata that defines these grid variables is preserved when you save the new metadata file.
- If any IBM SPSS Data Collection variables were automatically renamed to conform to IBM SPSS Statistics variable naming rules, the metadata file maps the converted names back to the original IBM SPSS Data Collection variable names.
The presence or absence of value labels can affect the metadata attributes of variables and consequently the way those variables are read by IBM SPSS Data Collection applications. If value labels have been defined for any nonmissing values of a variable, they should be defined for all nonmissing values of that variable; otherwise, the unlabeled values will be dropped when the data file is read by IBM SPSS Data Collection.
Limitations
This feature is only available with IBM SPSS Statistics installed on Microsoft Windows operating systems, and is only available in local analysis mode. This feature is not available in distributed analysis mode using IBM SPSS Statistics Server.
To write IBM SPSS Data Collection metadata files, you must have the following items installed:
- .NET framework. To obtain the most recent version of the .NET framework, go to http://www.microsoft.com/net.
- IBM SPSS Data Collection Survey Reporter Developer Kit. For information on obtaining a compatible version of IBM SPSS Data Collection Survey Reporter Developer Kit, go to www.ibm.com/support.