work on missing value handling
[pspp] / doc / files.texi
index 4085e386af34d51f17dfa4d1ec228b6f7b0eb637..cc3e6dd1999da8e2ae5495fc39fe522773f055bb 100644 (file)
@@ -1,5 +1,5 @@
 @c PSPP - a program for statistical analysis.
-@c Copyright (C) 2017 Free Software Foundation, Inc.
+@c Copyright (C) 2017, 2020 Free Software Foundation, Inc.
 @c Permission is granted to copy, distribute and/or modify this document
 @c under the terms of the GNU Free Documentation License, Version 1.3
 @c or any later version published by the Free Software Foundation;
@@ -40,37 +40,38 @@ and missing values taken from a file to corresponding
 variables in the active dataset.  In some cases it also updates the
 weighting variable.
 
-Specify a system file or portable file's name, a data set name
-(@pxref{Datasets}), or a file handle name (@pxref{File Handles}).  The
-dictionary in the file will be read, but it will not replace the
-active dataset's dictionary.  The file's data will not be read.
+The @subcmd{FROM} clause is mandatory.  Use it to specify a system
+file or portable file's name in single quotes, a data set name
+(@pxref{Datasets}), or a file handle name (@pxref{File Handles}).
+The dictionary in the file is be read, but it does not replace the active
+dataset's dictionary. The file's data is not read.
 
 Only variables with names that exist in both the active dataset and the
 system file are considered.  Variables with the same name but different
-types (numeric, string) will cause an error message.  Otherwise, the
-system file variables' attributes will replace those in their matching
+types (numeric, string) cause an error message.  Otherwise, the
+system file variables' attributes replace those in their matching
 active dataset variables:
 
 @itemize @bullet
 @item
-If a system file variable has a variable label, then it will replace
+If a system file variable has a variable label, then it replaces
 the variable label of the active dataset variable.  If the system
 file variable does not have a variable label, then the active dataset
-variable's variable label, if any, will be retained.
+variable's variable label, if any, is retained.
 
 @item
 If the system file variable has custom attributes (@pxref{VARIABLE
 ATTRIBUTE}), then those attributes replace the active dataset variable's
 custom attributes.  If the system file variable does not have custom
 attributes, then the active dataset variable's custom attributes, if any,
-will be retained.
+is retained.
 
 @item
 If the active dataset variable is numeric or short string, then value
-labels and missing values, if any, will be copied to the active dataset
+labels and missing values, if any, are copied to the active dataset
 variable.  If the system file variable does not have value labels or
-missing values, then those in the active dataset variable, if any, will not
-be disturbed.
+missing values, then those in the active dataset variable, if any, are not
+disturbed.
 @end itemize
 
 In addition to properties of variables, some properties of the active
@@ -129,7 +130,7 @@ The @subcmd{OUTFILE} subcommand, which is the only required subcommand, specifie
 the portable file to be written as a file name string or
 a file handle (@pxref{File Handles}).
 
-@subcmd{DROP}, @subcmd{KEEP}, and @subcmd{RENAME} follow the same format as the 
+@subcmd{DROP}, @subcmd{KEEP}, and @subcmd{RENAME} follow the same format as the
 @subcmd{SAVE} procedure (@pxref{SAVE}).
 
 The @subcmd{TYPE} subcommand specifies the character set for use in the
@@ -179,7 +180,7 @@ eliminated.  When this is done, only a single variable may be renamed at
 once.  For instance, @subcmd{/RENAME=@var{A}=@var{B}}.  This alternate syntax is
 deprecated.
 
-@subcmd{DROP}, @subcmd{KEEP}, and @subcmd{RENAME} are executed in left-to-right order.  
+@subcmd{DROP}, @subcmd{KEEP}, and @subcmd{RENAME} are executed in left-to-right order.
 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.
@@ -260,17 +261,17 @@ Gnumeric spreadsheets (@url{http://gnumeric.org}), and spreadsheets
 in OpenDocument format
 (@url{http://libreplanet.org/wiki/Group:OpenDocument/Software})
 can be read using the @cmd{GET DATA} command.
-Use the @subcmd{TYPE} subcommand to indicate the file's format.  
+Use the @subcmd{TYPE} subcommand to indicate the file's format.
 /TYPE=GNM indicates Gnumeric files,
 /TYPE=ODS indicates OpenDocument.
 The @subcmd{FILE} subcommand is mandatory.
-Use it to specify the name file to be read. 
+Use it to specify the name file to be read.
 All other subcommands are optional.
 
-The format of each variable is determined by the format of the spreadsheet 
+The format of each variable is determined by the format of the spreadsheet
 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 
+determined from the length of the string it contains, unless the
 @subcmd{ASSUMEDSTRWIDTH} subcommand is given.
 
 The @subcmd{SHEET} subcommand specifies the sheet within the spreadsheet file to read.
@@ -281,15 +282,15 @@ name of the sheet to read.
 In the second form, @subcmd{/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 @subcmd{SHEET} subcommand is omitted, then the command will read the
+If the @subcmd{SHEET} subcommand is omitted, then the command reads the
 first sheet in the file.
 
 The @subcmd{CELLRANGE} subcommand specifies the range of cells within the sheet to read.
 If the subcommand is given as @subcmd{/CELLRANGE=FULL}, then the entire
 sheet  is read.
-To read only part of a sheet, use the form 
+To read only part of a sheet, use the form
 @subcmd{/CELLRANGE=range '@var{top_left_cell}:@var{bottom_right_cell}'}.
-For example, the subcommand @subcmd{/CELLRANGE=range 'C3:P19'} reads 
+For example, the subcommand @subcmd{/CELLRANGE=range 'C3:P19'} reads
 columns C--P, and rows 3--19 inclusive.
 If no @subcmd{CELLRANGE} subcommand is given, then the entire sheet is read.
 
@@ -301,7 +302,7 @@ used, then the variables  receive automatically assigned names.
 
 The @subcmd{ASSUMEDSTRWIDTH} subcommand specifies the maximum width of string
 variables read  from the file.
-If omitted, the default value is determined from the length of the 
+If omitted, the default value is determined from the length of the
 string in the first spreadsheet cell for each variable.
 
 
@@ -322,13 +323,13 @@ GET DATA /TYPE=PSQL
 
 The PSQL type is used to import data from a postgres database server.
 The server may be located locally or remotely.
-Variables are automatically created based on the table column names 
+Variables are automatically created based on the table column names
 or the names specified in the SQL query.
-Postgres data types of high precision, will loose precision when 
+Postgres data types of high precision, loose precision when
 imported into @pspp{}.
 Not all the postgres data types are able to be represented in @pspp{}.
-If a datum cannot be represented a warning will be issued and that 
-datum will be set to SYSMIS.
+If a datum cannot be represented then @cmd{GET DATA} issues a warning
+and that datum is set to SYSMIS.
 
 The @subcmd{CONNECT} subcommand is mandatory.
 It is a string specifying the parameters of the database server from
@@ -341,15 +342,15 @@ It must be a valid SQL string to retrieve data from the database.
 
 The @subcmd{ASSUMEDSTRWIDTH} subcommand specifies the maximum width of string
 variables read  from the database.
-If omitted, the default value is determined from the length of the 
+If omitted, the default value is determined from the length of the
 string in the first value read for each variable.
 
 The @subcmd{UNENCRYPTED} subcommand allows data to be retrieved over an insecure
 connection.
-If the connection is not encrypted, and the @subcmd{UNENCRYPTED} subcommand is 
-not given, then an error will occur.
+If the connection is not encrypted, and the @subcmd{UNENCRYPTED} subcommand is
+not given, then an error occurs.
 Whether or not the connection is
-encrypted depends upon the underlying psql library and the 
+encrypted depends upon the underlying psql library and the
 capabilities of the database server.
 
 The @subcmd{BSIZE} subcommand serves only to optimise the speed of data transfer.
@@ -358,9 +359,9 @@ number of cases to fetch from the database at once.
 The default value is 4096.
 If your SQL statement fetches a large number of cases but only a small number of
 variables, then the data transfer may be faster if you increase this value.
-Conversely, if the number of variables is large, or if the machine on which 
+Conversely, if the number of variables is large, or if the machine on which
 @pspp{} is running has only a
-small amount of memory, then a smaller value will be better.
+small amount of memory, then a smaller value is probably better.
 
 
 The following syntax is an example:
@@ -389,7 +390,7 @@ GET DATA /TYPE=TXT
 When TYPE=TXT is specified, GET DATA reads data in a delimited or
 fixed columnar format, much like DATA LIST (@pxref{DATA LIST}).
 
-The @subcmd{FILE} subcommand is mandatory.  Specify the file to be read as 
+The @subcmd{FILE} subcommand is mandatory.  Specify the file to be read as
 a string file name or (for textual data only) a
 file handle (@pxref{File Handles}).
 
@@ -610,12 +611,12 @@ value is 1.
 The @subcmd{VARIABLES} subcommand, which is required, specifies the positions
 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.@:
-@samp{F}) or a full format specification (e.g.@: @samp{DOLLAR12.2}).
+(@i{e.g.}@: @samp{0-9}), followed by an input format type (@i{e.g.}@:
+@samp{F}) or a full format specification (@i{e.g.}@: @samp{DOLLAR12.2}).
 For this command, columns are numbered starting from 0 at
 the left column.  Introduce the variables in the second and later
 lines of a case by a slash followed by the number of the line within
-the case, e.g.@: @samp{/2} for the second line.
+the case, @i{e.g.}@: @samp{/2} for the second line.
 
 @subsubheading Examples
 
@@ -748,7 +749,7 @@ 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 @subcmd{RENAME} subcommand.  Variables' names may be swapped using a
-@subcmd{RENAME} subcommand of the 
+@subcmd{RENAME} subcommand of the
 form @subcmd{/RENAME=(@var{A} @var{B}=@var{B} @var{A})}.
 
 Alternate syntax for the @subcmd{RENAME} subcommand allows the parentheses to be
@@ -764,7 +765,7 @@ affect the system file written to disk.
 
 The @subcmd{VERSION} subcommand specifies the version of the file format. Valid
 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
+files, variable names longer than 8 bytes are truncated.  The two
 versions are otherwise identical.
 
 The @subcmd{NAMES} and @subcmd{MAP} subcommands are currently ignored.
@@ -846,7 +847,7 @@ Comma-separated value format,
 Tab-delimited format.
 @end table
 
-By default, @cmd{SAVE TRANSLATE} will not overwrite an existing file.  Use
+By default, @cmd{SAVE TRANSLATE} does not overwrite an existing file.  Use
 @subcmd{REPLACE} to force an existing file to be overwritten.
 
 With MISSING=IGNORE, the default, @subcmd{SAVE TRANSLATE} treats user-missing
@@ -950,7 +951,7 @@ qualifier character that appears within a value is doubled.
 @section SYSFILE INFO
 @vindex SYSFILE INFO
 
-@display 
+@display
 SYSFILE INFO FILE='@var{file_name}' [ENCODING='@var{encoding}'].
 @end display