= SPSS Dataset = The '''`DATASET`''' command manipulates the active dataset. <> ---- == Usage == === Activate === {{{ dataset activate foo. }}} The specified dataset must already exist. An error will be raised otherwise. If the previous active dataset was not named, it is now removed from memory. By default, SPSS does not restack visible windows when the `DATASET ACTIVATE` command is executed. Add the '''`WINDOW=ASIS`''' option to explicitly allow this behavior, or add the '''`WINDOW=FRONT`''' option to bring the new active dataset to the front. === Close === {{{ dataset close foo. dataset close all. }}} The specified dataset must already exist. An error will be raised otherwise. === Copy === {{{ dataset copy foo. }}} The specified dataset should not already exist. An warning will be raised otherwise, and the old dataset formerly known by the name is removed from memory. By default, SPSS does not restack visible windows when the `DATASET COPY` command is executed. Add the '''`WINDOW=MINIMIZED`''' option to explicitly allow this behavior, or add the '''`WINDOW=FRONT`''' option to bring the new dataset to the front or the '''`WINDOW=HIDDEN`''' option to not display a window. === Declare === {{{ dataset declare foo. }}} By default, SPSS does not restack visible windows when the `DATASET DECLARE` command is executed. Add the '''`WINDOW=MINIMIZED`''' option to explicitly allow this behavior, or add the '''`WINDOW=FRONT`''' option to bring the new dataset to the front or the '''`WINDOW=HIDDEN`''' option to not display a window. === Display === To list the available datasets, try: {{{ dataset display. }}} === Name === {{{ dataset name foo. }}} ---- == Data Model == The `DATASET ACTIVATE` command executes immediately. If there are any pending transformations on a named dataset that is being deactivated, they are executed first. The `DATASET CLOSE`, `DATASET DECLARE`, `DATASET DISPLAY`, and `DATASET NAME` commands execute immediately. Pending transformations do ''not'' execute, and the active dataset is ''not'' read. The `DATASET COPY` command causes all pending transformations to execute, and reads the active dataset. ---- == See also == [[https://www.gnu.org/software/pspp/manual/html_node/DATASET.html|PSPP manual for DATASET]] ---- CategoryRicottone