Overview (DATASET CLOSE command)
The DATASET
commands (DATASET NAME
, DATASET ACTIVATE
, DATASET DECLARE
, DATASET COPY
, DATASET CLOSE
) provide the
ability to have multiple data sources open at the same time and control
which open data source is active at any point in the session. Using
defined dataset names, you can then:
- Merge data
(for example,
MATCH FILES
,ADD FILES
,UPDATE
) from multiple different source types (for example, text data, database, spreadsheet) without saving each one as an external IBM® SPSS® Statistics data file first. - Create new datasets that are subsets of open data sources (for example, males in one subset, females in another, people under a certain age in another, or original data in one set and transformed/computed values in another subset).
- Copy and paste variables, cases, and/or variable properties between two or more open data sources in the Data Editor.
The DATASET CLOSE
command closes one or many named datasets.
- If the dataset names specified are not the active dataset, the datasets are closed and no longer available in the session.
- If one of the dataset names specified is the active dataset, or if an asterisk (*) is specified and the active dataset has a name, the association with that name is broken. The active dataset remains active but has no dataset name.
- If
ALL
is specified, all associations with datasets are broken. All the datasets except the active dataset and their data windows are closed and no longer available in the session. This includes datasets that have been declared (DATASET DECLARE
) but have not been used yet. The active dataset remains active but has no name.
Basic Specification
The only specification for DATASET CLOSE
is the command name followed by dataset
name(s), an asterisk (*), or the keyword ALL
.