data to a specified portable file.
By default, cases excluded with FILTER are written to the
data to a specified portable file.
By default, cases excluded with FILTER are written to the
subcommand. Specifying RETAIN makes the default explicit.
Portable files express real numbers in base 30. Integers are always
subcommand. Specifying RETAIN makes the default explicit.
Portable files express real numbers in base 30. Integers are always
Non-integers are, by default, expressed to the machine's maximum
natural precision (approximately 15 decimal digits on many machines).
If many numbers require this many digits, the portable file may
Non-integers are, by default, expressed to the machine's maximum
natural precision (approximately 15 decimal digits on many machines).
If many numbers require this many digits, the portable file may
subcommand may be used to specify the number of decimal digits of
precision to write. DIGITS applies only to non-integers.
subcommand may be used to specify the number of decimal digits of
precision to write. DIGITS applies only to non-integers.
-DROP, KEEP, and RENAME follow the same format as the SAVE procedure
-(@pxref{SAVE}).
+@subcmd{DROP}, @subcmd{KEEP}, and @subcmd{RENAME} follow the same format as the
+@subcmd{SAVE} procedure (@pxref{SAVE}).
@cmd{GET} clears the current dictionary and active dataset and
replaces them with the dictionary and data from a specified file.
@cmd{GET} clears the current dictionary and active dataset and
replaces them with the dictionary and data from a specified file.
file or portable file to be read as a string file name or
a file handle (@pxref{File Handles}).
By default, all the variables in a file are read. The DROP
subcommand can be used to specify a list of variables that are not to be
file or portable file to be read as a string file name or
a file handle (@pxref{File Handles}).
By default, all the variables in a file are read. The DROP
subcommand can be used to specify a list of variables that are not to be
that are to be read, with all other variables not read.
Normally variables in a file retain the names that they were
that are to be read, with all other variables not read.
Normally variables in a file retain the names that they were
within parentheses, a list of variable names followed by an equals sign
(@samp{=}) and the names that they should be renamed to. Multiple
parenthesized groups of variable names can be included on a single
within parentheses, a list of variable names followed by an equals sign
(@samp{=}) and the names that they should be renamed to. Multiple
parenthesized groups of variable names can be included on a single
eliminated. When this is done, only a single variable may be renamed at
once. For instance, @samp{/RENAME=A=B}. This alternate syntax is
deprecated.
eliminated. When this is done, only a single variable may be renamed at
once. For instance, @samp{/RENAME=A=B}. This alternate syntax is
deprecated.
Each may be present any number of times. @cmd{GET} never modifies a
file on disk. Only the active dataset read from the file
is affected by these subcommands.
Each may be present any number of times. @cmd{GET} never modifies a
file on disk. Only the active dataset read from the file
is affected by these subcommands.
@pspp{} tries to automatically detect the encoding of string data in the
file. Sometimes, however, this does not work well encoding,
especially for files written by old versions of SPSS or @pspp{}. Specify
@pspp{} tries to automatically detect the encoding of string data in the
file. Sometimes, however, this does not work well encoding,
especially for files written by old versions of SPSS or @pspp{}. Specify
-the ENCODING subcommand with an IANA character set name as its string
-argument to override the default. The ENCODING subcommand is a @pspp{}
+the @subcmd{ENCODING} subcommand with an IANA character set name as its string
+argument to override the default. The @subcmd{ENCODING} subcommand is a @pspp{}
the current dictionary and active dataset are replaced with variables
and data read from the specified source.
the current dictionary and active dataset are replaced with variables
and data read from the specified source.
specified. It determines the type of the file or source to read.
@pspp{} currently supports the following file types:
specified. It determines the type of the file or source to read.
@pspp{} currently supports the following file types:
in OpenDocument format
(@url{http://libreplanet.org/wiki/Group:OpenDocument/Software})
can be read using the GET DATA command.
in OpenDocument format
(@url{http://libreplanet.org/wiki/Group:OpenDocument/Software})
can be read using the GET DATA command.
/TYPE=GNM indicates Gnumeric files,
/TYPE=ODS indicates OpenDocument.
/TYPE=GNM indicates Gnumeric files,
/TYPE=ODS indicates OpenDocument.
cell containing the first datum for the variable.
If this cell is of string (text) format, then the width of the variable is
determined from the length of the string it contains, unless the
cell containing the first datum for the variable.
If this cell is of string (text) format, then the width of the variable is
determined from the length of the string it contains, unless the
-The SHEET subcommand specifies the sheet within the spreadsheet file to read.
-There are two forms of the SHEET subcommand.
+The @subcmd{SHEET} subcommand specifies the sheet within the spreadsheet file to read.
+There are two forms of the @subcmd{SHEET} subcommand.
In the first form,
@samp{/SHEET=name @var{sheet-name}}, the string @var{sheet-name} is the
name of the sheet to read.
In the second form, @samp{/SHEET=index @var{idx}}, @var{idx} is a
integer which is the index of the sheet to read.
The first sheet has the index 1.
In the first form,
@samp{/SHEET=name @var{sheet-name}}, the string @var{sheet-name} is the
name of the sheet to read.
In the second form, @samp{/SHEET=index @var{idx}}, @var{idx} is a
integer which is the index of the sheet to read.
The first sheet has the index 1.
If the subcommand is given as @samp{/CELLRANGE=FULL}, then the entire
sheet is read.
To read only part of a sheet, use the form
@samp{/CELLRANGE=range '@var{top-left-cell}:@var{bottom-right-cell}'}.
For example, the subcommand @samp{/CELLRANGE=range 'C3:P19'} reads
columns C--P, and rows 3--19 inclusive.
If the subcommand is given as @samp{/CELLRANGE=FULL}, then the entire
sheet is read.
To read only part of a sheet, use the form
@samp{/CELLRANGE=range '@var{top-left-cell}:@var{bottom-right-cell}'}.
For example, the subcommand @samp{/CELLRANGE=range 'C3:P19'} reads
columns C--P, and rows 3--19 inclusive.
If @samp{/READNAMES=ON} is specified, then the contents of cells of
the first row are used as the names of the variables in which to store
If @samp{/READNAMES=ON} is specified, then the contents of cells of
the first row are used as the names of the variables in which to store
If @samp{/READNAMES=OFF} is
used, then the variables receive automatically assigned names.
If @samp{/READNAMES=OFF} is
used, then the variables receive automatically assigned names.
variables read from the file.
If omitted, the default value is determined from the length of the
string in the first spreadsheet cell for each variable.
variables read from the file.
If omitted, the default value is determined from the length of the
string in the first spreadsheet cell for each variable.
It is a string specifying the parameters of the database server from
which the data should be fetched.
The format of the string is given in the postgres manual
@url{http://www.postgresql.org/docs/8.0/static/libpq.html#LIBPQ-CONNECT}.
It is a string specifying the parameters of the database server from
which the data should be fetched.
The format of the string is given in the postgres manual
@url{http://www.postgresql.org/docs/8.0/static/libpq.html#LIBPQ-CONNECT}.
variables read from the database.
If omitted, the default value is determined from the length of the
string in the first value read for each variable.
variables read from the database.
If omitted, the default value is determined from the length of the
string in the first value read for each variable.
given, then an error will occur.
Whether or not the connection is
encrypted depends upon the underlying psql library and the
capabilities of the database server.
given, then an error will occur.
Whether or not the connection is
encrypted depends upon the underlying psql library and the
capabilities of the database server.
It specifies an upper limit on
number of cases to fetch from the database at once.
The default value is 4096.
It specifies an upper limit on
number of cases to fetch from the database at once.
The default value is 4096.
When TYPE=TXT is specified, GET DATA reads data in a delimited or
fixed columnar format, much like DATA LIST (@pxref{DATA LIST}).
When TYPE=TXT is specified, GET DATA reads data in a delimited or
fixed columnar format, much like DATA LIST (@pxref{DATA LIST}).
DELIMITED, the default setting, specifies that fields in the input
data are separated by spaces, tabs, or other user-specified
delimiters. FIXED specifies that fields in the input data appear at
particular fixed column positions within records of a case.
By default, cases are read from the input file starting from the first
DELIMITED, the default setting, specifies that fields in the input
data are separated by spaces, tabs, or other user-specified
delimiters. FIXED specifies that fields in the input data appear at
particular fixed column positions within records of a case.
By default, cases are read from the input file starting from the first
to the number of the first line to read: 2 to skip the first line, 3
to skip the first two lines, and so on.
to the number of the first line to read: 2 to skip the first line, 3
to skip the first two lines, and so on.
input file. With the default setting, ALL, all cases in the file are
read. Specify FIRST @i{max_cases} to read at most @i{max_cases} cases
from the file. Use PERCENT @i{percent} to read only @i{percent}
input file. With the default setting, ALL, all cases in the file are
read. Specify FIRST @i{max_cases} to read at most @i{max_cases} cases
from the file. Use PERCENT @i{percent} to read only @i{percent}
number of cases in some kinds of unusual files cannot be estimated;
@pspp{} will read all cases in such files.)
number of cases in some kinds of unusual files cannot be estimated;
@pspp{} will read all cases in such files.)
data. The remaining subcommands, which apply only to one of the two file
arrangements, are described below.
data. The remaining subcommands, which apply only to one of the two file
arrangements, are described below.
-DELIMITERS separates one field from the next. The end of a line also
-separates fields, regardless of DELIMITERS. Two consecutive
+@subcmd{DELIMITERS} separates one field from the next. The end of a line also
+separates fields, regardless of @subcmd{DELIMITERS}. Two consecutive
delimiters in the input yield an empty field, as does a delimiter at
the end of a line. A space character as a delimiter is an exception:
consecutive spaces do not yield an empty field and neither does any
number of spaces at the end of a line.
To use a tab as a delimiter, specify @samp{\t} at the beginning of the
delimiters in the input yield an empty field, as does a delimiter at
the end of a line. A space character as a delimiter is an exception:
consecutive spaces do not yield an empty field and neither does any
number of spaces at the end of a line.
To use a tab as a delimiter, specify @samp{\t} at the beginning of the
@samp{\\} as the first delimiter or, if a tab should also be a
delimiter, immediately following @samp{\t}. To read a data file in
which each field appears on a separate line, specify the empty string
@samp{\\} as the first delimiter or, if a tab should also be a
delimiter, immediately following @samp{\t}. To read a data file in
which each field appears on a separate line, specify the empty string
can be used to quote values within fields in the input. A field that
begins with one of the specified quote characters ends at the next
matching quote. Intervening delimiters become part of the field,
instead of terminating it. The ability to specify more than one quote
character is a @pspp{} extension.
can be used to quote values within fields in the input. A field that
begins with one of the specified quote characters ends at the next
matching quote. Intervening delimiters become part of the field,
instead of terminating it. The ability to specify more than one quote
character is a @pspp{} extension.
embedded within a field that it quotes, because the quote character
always terminates the quoted field. With ESCAPE, however, a doubled
quote character within a quoted field inserts a single instance of the
quote into the field. For example, if @samp{'} is specified on
embedded within a field that it quotes, because the quote character
always terminates the quoted field. With ESCAPE, however, a doubled
quote character within a quoted field inserts a single instance of the
quote into the field. For example, if @samp{'} is specified on
fields that contain @samp{a} and @samp{b}, but with ESCAPE it
specifies a single field that contains @samp{a'b}. ESCAPE is a @pspp{}
extension.
fields that contain @samp{a} and @samp{b}, but with ESCAPE it
specifies a single field that contains @samp{a'b}. ESCAPE is a @pspp{}
extension.
the data file. With LINE, the default setting, each line must contain
all the data for exactly one case. For additional flexibility, to
allow a single case to be split among lines or multiple cases to be
contained on a single line, specify VARIABLES @i{n_variables}, where
@i{n_variables} is the number of variables per case.
the data file. With LINE, the default setting, each line must contain
all the data for exactly one case. For additional flexibility, to
allow a single case to be split among lines or multiple cases to be
contained on a single line, specify VARIABLES @i{n_variables}, where
@i{n_variables} is the number of variables per case.
Specify the name of each variable and its input format (@pxref{Input
and Output Formats}) in the order they should be read from the input
file.
Specify the name of each variable and its input format (@pxref{Input
and Output Formats}) in the order they should be read from the input
file.
capabilities are similar to those of DATA LIST FIXED (@pxref{DATA LIST
FIXED}), with a few enhancements.
capabilities are similar to those of DATA LIST FIXED (@pxref{DATA LIST
FIXED}), with a few enhancements.
at which each variable can be found. For each variable, specify its
name, followed by its start and end column separated by @samp{-}
(e.g.@: @samp{0-9}), followed by an input format type (e.g.@:
at which each variable can be found. For each variable, specify its
name, followed by its start and end column separated by @samp{-}
(e.g.@: @samp{0-9}), followed by an input format type (e.g.@:
data is read later, when a procedure is executed.
Use of @cmd{IMPORT} to read a system file is a @pspp{} extension.
data is read later, when a procedure is executed.
Use of @cmd{IMPORT} to read a system file is a @pspp{} extension.
-These can be excluded by specifying DELETE on the UNSELECTED
-subcommand. Specifying RETAIN makes the default explicit.
+These can be excluded by specifying @subcmd{DELETE} on the @subcmd{UNSELECTED}
+subcommand. Specifying @subcmd{RETAIN} makes the default explicit.
system file is compressed. By default, system files are compressed.
This default can be changed with the SET command (@pxref{SET}).
system file is compressed. By default, system files are compressed.
This default can be changed with the SET command (@pxref{SET}).
file. WRITEABLE, the default, creates the file with read and write
permission. READONLY creates the file for read-only access.
By default, all the variables in the active dataset dictionary are written
file. WRITEABLE, the default, creates the file with read and write
permission. READONLY creates the file for read-only access.
By default, all the variables in the active dataset dictionary are written
of variables not to be written. In contrast, KEEP specifies variables
to be written, with all variables not specified not written.
Normally variables are saved to a system file under the same names they
of variables not to be written. In contrast, KEEP specifies variables
to be written, with all variables not specified not written.
Normally variables are saved to a system file under the same names they
Specify, within parentheses, a list of variable names followed by an
equals sign (@samp{=}) and the names that they should be renamed to.
Multiple parenthesized groups of variable names can be included on a
Specify, within parentheses, a list of variable names followed by an
equals sign (@samp{=}) and the names that they should be renamed to.
Multiple parenthesized groups of variable names can be included on a
-single RENAME subcommand. Variables' names may be swapped using a
-RENAME subcommand of the form @samp{/RENAME=(A B=B A)}.
+single @subcmd{RENAME} subcommand. Variables' names may be swapped using a
+@subcmd{RENAME} subcommand of the form @samp{/RENAME=(A B=B A)}.
eliminated. When this is done, only a single variable may be renamed at
once. For instance, @samp{/RENAME=A=B}. This alternate syntax is
deprecated.
eliminated. When this is done, only a single variable may be renamed at
once. For instance, @samp{/RENAME=A=B}. This alternate syntax is
deprecated.
versions are 2 and 3. The default version is 3. In version 2 system
files, variable names longer than 8 bytes will be truncated. The two
versions are otherwise identical.
versions are 2 and 3. The default version is 3. In version 2 system
files, variable names longer than 8 bytes will be truncated. The two
versions are otherwise identical.
The @cmd{SAVE TRANSLATE} command is used to save data into various
formats understood by other applications.
The @cmd{SAVE TRANSLATE} command is used to save data into various
formats understood by other applications.
-The OUTFILE and TYPE subcommands are mandatory. OUTFILE specifies the
-file to be written, as a string file name or a file handle
-(@pxref{File Handles}). TYPE determines the type of the file or
+The @subcmd{OUTFILE} and @subcmd{TYPE} subcommands are mandatory.
+@subcmd{OUTFILE} specifies the file to be written, as a string file name or a file handle
+(@pxref{File Handles}). @subcmd{TYPE} determines the type of the file or
-By default, SAVE TRANSLATE will not overwrite an existing file. Use
-REPLACE to force an existing file to be overwritten.
+By default, @cmd{SAVE TRANSLATE} will not overwrite an existing file. Use
+@subcmd{REPLACE} to force an existing file to be overwritten.
values as if they were not missing. Specify MISSING=RECODE to output
numeric user-missing values like system-missing values and string
user-missing values as all spaces.
By default, all the variables in the active dataset dictionary are saved
values as if they were not missing. Specify MISSING=RECODE to output
numeric user-missing values like system-missing values and string
user-missing values as all spaces.
By default, all the variables in the active dataset dictionary are saved
-to the system file, but DROP or KEEP can select a subset of variable
-to save. The RENAME subcommand can also be used to change the names
-under which variables are saved. UNSELECTED determines whether cases
-filtered out by the FILTER command are written to the output file.
+to the system file, but @subcmd{DROP} or @subcmd{KEEP} can select a subset of variable
+to save. The @subcmd{RENAME} subcommand can also be used to change the names
+under which variables are saved. @subcmd{UNSELECTED} determines whether cases
+filtered out by the @cmd{FILTER} command are written to the output file.