work on missing value handling
[pspp] / doc / language.texi
index a5ef4b69d6e338084847b97278a1357d8478ebaa..1c9a4f0105245a5550f7ad71f577be5db2be0c53 100644 (file)
@@ -1,10 +1,19 @@
+@c PSPP - a program for statistical analysis.
+@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;
+@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+@c A copy of the license is included in the section entitled "GNU
+@c Free Documentation License".
+@c
 @node Language
-@chapter The PSPP language
-@cindex language, PSPP
-@cindex PSPP, language
+@chapter The @pspp{} language
+@cindex language, @pspp{}
+@cindex @pspp{}, language
 
-This chapter discusses elements common to many PSPP commands.
-Later chapters will describe individual commands in detail.
+This chapter discusses elements common to many @pspp{} commands.
+Later chapters describe individual commands in detail.
 
 @menu
 * Tokens::                      Characters combine to form tokens.
@@ -14,7 +23,7 @@ Later chapters will describe individual commands in detail.
 * Order of Commands::           Commands combine to form syntax files.
 * Missing Observations::        Handling missing observations.
 * Datasets::                    Data organization.
-* Files::                       Files used by PSPP.
+* Files::                       Files used by @pspp{}.
 * File Handles::                How files are named.
 * BNF::                         How command syntax is described.
 @end menu
@@ -27,10 +36,10 @@ Later chapters will describe individual commands in detail.
 @cindex tokens
 @cindex lexical analysis
 
-PSPP divides most syntax file lines into series of short chunks
+@pspp{} divides most syntax file lines into series of short chunks
 called @dfn{tokens}.
 Tokens are then grouped to form commands, each of which tells
-PSPP to take some action---read in data, write out data, perform
+@pspp{} to take some action---read in data, write out data, perform
 a statistical procedure, etc.  Each type of token is
 described below.
 
@@ -95,7 +104,7 @@ number.
 No white space is allowed within a number token, except for horizontal
 white space between @samp{-} and the rest of the number.
 
-The last example above, @samp{8945.} will be interpreted as two
+The last example above, @samp{8945.} is interpreted as two
 tokens, @samp{8945} and @samp{.}, if it is the last token on a line.
 @xref{Commands, , Forming commands of tokens}.
 
@@ -106,7 +115,7 @@ tokens, @samp{8945} and @samp{.}, if it is the last token on a line.
 @cindex case-sensitivity
 Strings are literal sequences of characters enclosed in pairs of
 single quotes (@samp{'}) or double quotes (@samp{"}).  To include the
-character used for quoting in the string, double it, e.g.@:
+character used for quoting in the string, double it, @i{e.g.}@:
 @samp{'it''s an apostrophe'}.  White space and case of letters are
 significant inside strings.
 
@@ -149,17 +158,17 @@ Most of these appear within the syntax of commands, but the period
 punctuator only as the last character on a line (except white space).
 When it is the last non-space character on a line, a period is not
 treated as part of another token, even if it would otherwise be part
-of, e.g.@:, an identifier or a floating-point number.
+of, @i{e.g.}@:, an identifier or a floating-point number.
 @end table
 
 @node Commands
 @section Forming commands of tokens
 
-@cindex PSPP, command structure
+@cindex @pspp{}, command structure
 @cindex language, command structure
 @cindex commands, structure
 
-Most PSPP commands share a common structure.  A command begins with a
+Most @pspp{} commands share a common structure.  A command begins with a
 command name, such as @cmd{FREQUENCIES}, @cmd{DATA LIST}, or @cmd{N OF
 CASES}.  The command name may be abbreviated to its first word, and
 each word in the command name may be abbreviated to its first three
@@ -207,23 +216,23 @@ accepted regardless of syntax mode.
 The default mode for reading commands from a file is @dfn{auto mode}.
 It is the same as batch mode, except that a line with a non-blank in
 the leftmost column only starts a new command if that line begins with
-the name of a PSPP command.  This correctly interprets most valid PSPP
+the name of a @pspp{} command.  This correctly interprets most valid @pspp{}
 syntax files regardless of the syntax mode for which they are
 intended.
 
 The @option{--interactive} (or @option{-i}) or @option{--batch} (or
-@option{-b}) options set the syntax mode for files listed on the PSPP
+@option{-b}) options set the syntax mode for files listed on the @pspp{}
 command line.  @xref{Main Options}, for more details.
 
 @node Types of Commands
 @section Types of Commands
 
-Commands in PSPP are divided roughly into six categories:
+Commands in @pspp{} are divided roughly into six categories:
 
 @table @strong
 @item Utility commands
 @cindex utility commands
-Set or display various global options that affect PSPP operations.
+Set or display various global options that affect @pspp{} operations.
 May appear anywhere in a syntax file.  @xref{Utilities, , Utility
 commands}.
 
@@ -243,7 +252,7 @@ in arbitrary textual or binary formats.  @xref{INPUT PROGRAM}.
 @item Transformations
 @cindex transformations
 Perform operations on data and write data to output files.  Transformations
-are not carried out until a procedure is executed.  
+are not carried out until a procedure is executed.
 
 @item Restricted transformations
 @cindex restricted transformations
@@ -263,17 +272,17 @@ active dataset (the data) to be read.
 @cindex commands, ordering
 @cindex order of commands
 
-PSPP does not place many restrictions on ordering of commands.  The
+@pspp{} does not place many restrictions on ordering of commands.  The
 main restriction is that variables must be defined before they are otherwise
 referenced.  This section describes the details of command ordering,
 but most users will have no need to refer to them.
 
-PSPP possesses five internal states, called initial, INPUT PROGRAM,
-FILE TYPE, transformation, and procedure states.  (Please note the
+@pspp{} possesses five internal states, called @dfn{initial}, @dfn{input-program}
+@dfn{file-type}, @dfn{transformation}, and @dfn{procedure} states.  (Please note the
 distinction between the @cmd{INPUT PROGRAM} and @cmd{FILE TYPE}
-@emph{commands} and the INPUT PROGRAM and FILE TYPE @emph{states}.)
+@emph{commands} and the @dfn{input-program} and @dfn{file-type} @emph{states}.)
 
-PSPP starts in the initial state.  Each successful completion
+@pspp{} starts in the initial state.  Each successful completion
 of a command may cause a state transition.  Each type of command has its
 own rules for state transitions:
 
@@ -294,7 +303,7 @@ transformation state.
 Valid in any state.
 @item
 When executed in the initial or procedure state, causes a transition to
-the transformation state.  
+the transformation state.
 @item
 Clears the active dataset if executed in the procedure or transformation
 state.
@@ -303,9 +312,9 @@ state.
 @item @cmd{INPUT PROGRAM}
 @itemize @bullet
 @item
-Invalid in INPUT PROGRAM and FILE TYPE states.
+Invalid in input-program and file-type states.
 @item
-Causes a transition to the INPUT PROGRAM state.  
+Causes a transition to the intput-program state.
 @item
 Clears the active dataset.
 @end itemize
@@ -313,9 +322,9 @@ Clears the active dataset.
 @item @cmd{FILE TYPE}
 @itemize @bullet
 @item
-Invalid in INPUT PROGRAM and FILE TYPE states.
+Invalid in intput-program and file-type states.
 @item
-Causes a transition to the FILE TYPE state.
+Causes a transition to the file-type state.
 @item
 Clears the active dataset.
 @end itemize
@@ -323,7 +332,7 @@ Clears the active dataset.
 @item Other file definition commands
 @itemize @bullet
 @item
-Invalid in INPUT PROGRAM and FILE TYPE states.
+Invalid in input-program and file-type states.
 @item
 Cause a transition to the transformation state.
 @item
@@ -334,7 +343,7 @@ and @cmd{UPDATE}.
 @item Transformations
 @itemize @bullet
 @item
-Invalid in initial and FILE TYPE states.
+Invalid in initial and file-type states.
 @item
 Cause a transition to the transformation state.
 @end itemize
@@ -342,7 +351,7 @@ Cause a transition to the transformation state.
 @item Restricted transformations
 @itemize @bullet
 @item
-Invalid in initial, INPUT PROGRAM, and FILE TYPE states.
+Invalid in initial, input-program, and file-type states.
 @item
 Cause a transition to the transformation state.
 @end itemize
@@ -350,7 +359,7 @@ Cause a transition to the transformation state.
 @item Procedures
 @itemize @bullet
 @item
-Invalid in initial, INPUT PROGRAM, and FILE TYPE states.
+Invalid in initial, input-program, and file-type states.
 @item
 Cause a transition to the procedure state.
 @end itemize
@@ -361,7 +370,7 @@ Cause a transition to the procedure state.
 @cindex missing values
 @cindex values, missing
 
-PSPP includes special support for unknown numeric data values.
+@pspp{} includes special support for unknown numeric data values.
 Missing observations are assigned a special value, called the
 @dfn{system-missing value}.  This ``value'' actually indicates the
 absence of a value; it means that the actual value is unknown.  Procedures
@@ -390,14 +399,14 @@ handle missing values.
 @cindex variable
 @cindex dictionary
 
-PSPP works with data organized into @dfn{datasets}.  A dataset
+@pspp{} works with data organized into @dfn{datasets}.  A dataset
 consists of a set of @dfn{variables}, which taken together are said to
 form a @dfn{dictionary}, and one or more @dfn{cases}, each of which
 has one value for each variable.
 
-At any given time PSPP has exactly one distinguished dataset, called
-the @dfn{active dataset}.  Most PSPP commands work only with the
-active dataset.  In addition to the active dataset, PSPP also supports
+At any given time @pspp{} has exactly one distinguished dataset, called
+the @dfn{active dataset}.  Most @pspp{} commands work only with the
+active dataset.  In addition to the active dataset, @pspp{} also supports
 any number of additional open datasets.  The @cmd{DATASET} commands
 can choose a new active dataset from among those that are open, as
 well as create and destroy datasets (@pxref{DATASET}).
@@ -406,7 +415,7 @@ The sections below describe variables in more detail.
 
 @menu
 * Attributes::                  Attributes of variables.
-* System Variables::            Variables automatically defined by PSPP.
+* System Variables::            Variables automatically defined by @pspp{}.
 * Sets of Variables::           Lists of variable names.
 * Input and Output Formats::    Input and output formats.
 * Scratch Variables::           Variables deleted by procedures.
@@ -431,16 +440,16 @@ variables' names may not begin with @samp{$}.
 @cindex variable names, ending with period
 The final character in a variable name should not be @samp{.}, because
 such an identifier will be misinterpreted when it is the final token
-on a line: @code{FOO.} will be divided into two separate tokens,
+on a line: @code{FOO.} is divided into two separate tokens,
 @samp{FOO} and @samp{.}, indicating end-of-command.  @xref{Tokens}.
 
 @cindex @samp{_}
 The final character in a variable name should not be @samp{_}, because
-some such identifiers are used for special purposes by PSPP
+some such identifiers are used for special purposes by @pspp{}
 procedures.
 
-As with all PSPP identifiers, variable names are not case-sensitive.
-PSPP capitalizes variable names on output the same way they were
+As with all @pspp{} identifiers, variable names are not case-sensitive.
+@pspp{} capitalizes variable names on output the same way they were
 capitalized at their point of definition in the input.
 
 @cindex variables, type
@@ -498,14 +507,48 @@ they are displayed.  Example: a width of 8, with 2 decimal places.
 Similar to print format, but used by the @cmd{WRITE} command
 (@pxref{WRITE}).
 
+@cindex measurement level
+@item Measurement level
+One of the following:
+
+@table @asis
+@item Nominal
+Each value of a nominal variable represents a distinct category.  The
+possible categories are finite and often have value labels.  The order
+of categories is not significant.  Political parties, US states, and
+yes/no choices are nominal.  Numeric and string variables can be
+nominal.
+
+@item Ordinal
+Ordinal variables also represent distinct categories, but their values
+are arranged according to some natural order.  Likert scales, e.g.@:
+from strongly disagree to strongly agree, are ordinal.  Data grouped
+into ranges, e.g.@: age groups or income groups, are ordinal.  Both
+numeric and string variables can be ordinal.  String values are
+ordered alphabetically, so letter grades from A to F will work as
+expected, but @code{poor}, @code{satisfactory}, @code{excellent} will
+not.
+
+@item Scale
+Scale variables are ones for which differences and ratios are
+meaningful.  These are often values which have a natural unit
+attached, such as age in years, income in dollars, or distance in
+miles.  Only numeric variables are scalar.
+@end table
+
 @cindex custom attributes
 @item Custom attributes
 User-defined associations between names and values.  @xref{VARIABLE
 ATTRIBUTE}.
+
+@cindex variable role
+@item Role
+The intended role of a variable for use in dialog boxes in graphical
+user interfaces.  @xref{VARIABLE ROLE}.
 @end table
 
 @node System Variables
-@subsection Variables Automatically Defined by PSPP
+@subsection Variables Automatically Defined by @pspp{}
 @cindex system variables
 @cindex variables, system
 
@@ -522,12 +565,17 @@ shuffled around.
 
 @cindex @code{$DATE}
 @item $DATE
-Date the PSPP process was started, in format A9, following the
-pattern @code{DD MMM YY}.
+Date the @pspp{} process was started, in format A9, following the
+pattern @code{DD-MMM-YY}.
+
+@cindex @code{$DATE11}
+@item $DATE11
+Date the @pspp{} process was started, in format A11, following the
+pattern @code{DD-MMM-YYYY}.
 
 @cindex @code{$JDATE}
 @item $JDATE
-Number of days between 15 Oct 1582 and the time the PSPP process
+Number of days between 15 Oct 1582 and the time the @pspp{} process
 was started.
 
 @cindex @code{$LENGTH}
@@ -586,7 +634,7 @@ input field as a number or a string.  It might specify that the field
 contains an ordinary decimal number, a time or date, a number in binary
 or hexadecimal notation, or one of several other notations.  Input
 formats are used by commands such as @cmd{DATA LIST} that read data or
-syntax files into the PSPP active dataset.
+syntax files into the @pspp{} active dataset.
 
 Every input format corresponds to a default @dfn{output format} that
 specifies the formatting used when the value is output later.  It is
@@ -605,24 +653,25 @@ created variables have identical print and write formats, and
 most of the time, the distinction between print and write formats is
 unimportant.
 
-Input and output formats are specified to PSPP with a @dfn{format
-specification} of the form @code{TYPEw} or @code{TYPEw.d}, where
-@code{TYPE} is one of the format types described later, @code{w} is a
-field width measured in columns, and @code{d} is an optional number of
-decimal places.  If @code{d} is omitted, a value of 0 is assumed.  Some
-formats do not allow a nonzero @code{d} to be specified.
+Input and output formats are specified to @pspp{} with
+a @dfn{format specification} of the
+form @subcmd{@var{TYPE}@var{w}} or @code{TYPE@var{w}.@var{d}}, where
+@var{TYPE} is one of the format types described later, @var{w} is a
+field width measured in columns, and @var{d} is an optional number of
+decimal places.  If @var{d} is omitted, a value of 0 is assumed.  Some
+formats do not allow a nonzero @var{d} to be specified.
 
 The following sections describe the input and output formats supported
-by PSPP.
+by @pspp{}.
 
 @menu
-* Basic Numeric Formats::       
-* Custom Currency Formats::     
-* Legacy Numeric Formats::      
-* Binary and Hexadecimal Numeric Formats::  
-* Time and Date Formats::       
-* Date Component Formats::      
-* String Formats::              
+* Basic Numeric Formats::
+* Custom Currency Formats::
+* Legacy Numeric Formats::
+* Binary and Hexadecimal Numeric Formats::
+* Time and Date Formats::
+* Date Component Formats::
+* String Formats::
 @end menu
 
 @node Basic Numeric Formats
@@ -798,7 +847,7 @@ In scientific notation, the exponent is output as @samp{E} followed by
 @samp{+} or @samp{-} and exactly three digits.  Numbers with magnitude
 less than 10**-999 or larger than 10**999 are not supported by most
 computers, but if they are supported then their output is considered
-to overflow the field and will be output as asterisks.
+to overflow the field and they are output as asterisks.
 
 @item
 On most computers, no more than 15 decimal digits are significant in
@@ -811,7 +860,7 @@ calculations may also reduce precision of output.
 Special values such as infinities and ``not a number'' values are
 usually converted to the system-missing value before printing.  In a few
 circumstances, these values are output directly.  In fields of width 3
-or greater, special values are output as however many characters will
+or greater, special values are output as however many characters
 fit from @code{+Infinity} or @code{-Infinity} for infinities, from
 @code{NaN} for ``not a number,'' or from @code{Unknown} for other values
 (if any are supported by the system).  In fields under 3 columns wide,
@@ -828,15 +877,15 @@ SET command configures custom currency formats, using the syntax
 @display
 SET CC@var{x}=@t{"}@var{string}@t{"}.
 @end display
-@noindent 
+@noindent
 where @var{x} is A, B, C, D, or E, and @var{string} is no more than 16
 characters long.
 
 @var{string} must contain exactly three commas or exactly three periods
 (but not both), except that a single quote character may be used to
 ``escape'' a following comma, period, or single quote.  If three commas
-are used, commas will be used for grouping in output, and a period will
-be used as the decimal point.  Uses of periods reverses these roles.
+are used, commas are used for grouping in output, and a period
+is used as the decimal point.  Uses of periods reverses these roles.
 
 The commas or periods divide @var{string} into four fields, called the
 @dfn{negative prefix}, @dfn{prefix}, @dfn{suffix}, and @dfn{negative
@@ -1038,7 +1087,7 @@ WRB}).
 The recommended field width depends on the floating-point format.
 NATIVE (the default format), IDL, IDB, VD, VG, and ZL formats should use
 a field width of 8.  ISL, ISB, VF, and ZS formats should use a field
-width of 4.  Other field widths will not produce useful results.  The
+width of 4.  Other field widths do not produce useful results.  The
 maximum field width is 8.  No decimal places may be specified.
 
 The default output format is F8.2.
@@ -1055,7 +1104,7 @@ lowercase are accepted on input; output is in uppercase.
 Other than the hexadecimal representation, these formats are equivalent
 to PIB and RB formats, respectively.  However, bytes in PIBHEX format
 are always ordered with the most-significant byte first (big-endian
-order), regardless of the host machine's native byte order or PSPP
+order), regardless of the host machine's native byte order or @pspp{}
 settings.
 
 Field widths must be even and between 2 and 16.  RBHEX format allows no
@@ -1067,24 +1116,25 @@ with half the given width.
 
 @cindex time formats
 @cindex date formats
-In PSPP, a @dfn{time} is an interval.  The time formats translate
-between human-friendly descriptions of time intervals and PSPP's
+In @pspp{}, a @dfn{time} is an interval.  The time formats translate
+between human-friendly descriptions of time intervals and @pspp{}'s
 internal representation of time intervals, which is simply the number of
-seconds in the interval.  PSPP has two time formats:
+seconds in the interval.  @pspp{} has three time formats:
 
 @float
-@multitable {Time Format} {@code{dd-mmm-yyyy HH:MM:SS.ss}} {@code{01-OCT-1978 04:31:17.01}}
+@multitable {Time Format} {@code{dd-mmm-yyyy HH:MM:SS.ss}} {@code{01-OCT-1978 01:31:17.01}}
 @headitem Time Format @tab Template                  @tab Example
-@item TIME     @tab @code{hh:MM:SS.ss}          @tab @code{04:31:17.01}
+@item MTIME    @tab @code{MM:SS.ss}             @tab @code{91:17.01}
+@item TIME     @tab @code{hh:MM:SS.ss}          @tab @code{01:31:17.01}
 @item DTIME    @tab @code{DD HH:MM:SS.ss}       @tab @code{00 04:31:17.01}
 @end multitable
 @end float
 
-A @dfn{date} is a moment in the past or the future.  Internally, PSPP
+A @dfn{date} is a moment in the past or the future.  Internally, @pspp{}
 represents a date as the number of seconds since the @dfn{epoch},
 midnight, Oct. 14, 1582.  The date formats translate between
-human-readable dates and PSPP's numeric representation of dates and
-times.  PSPP has several date formats:
+human-readable dates and @pspp{}'s numeric representation of dates and
+times.  @pspp{} has several date formats:
 
 @float
 @multitable {Date Format} {@code{dd-mmm-yyyy HH:MM:SS.ss}} {@code{01-OCT-1978 04:31:17.01}}
@@ -1098,6 +1148,7 @@ times.  PSPP has several date formats:
 @item MOYR     @tab @code{mmm yyyy}             @tab @code{OCT 1978}
 @item WKYR     @tab @code{ww WK yyyy}           @tab @code{40 WK 1978}
 @item DATETIME @tab @code{dd-mmm-yyyy HH:MM:SS.ss} @tab @code{01-OCT-1978 04:31:17.01}
+@item YMDHMS   @tab @code{yyyy-mm-dd HH:MM:SS.ss} @tab @code{1978-01-OCT 04:31:17.01}
 @end multitable
 @end float
 
@@ -1116,11 +1167,11 @@ first three letters of an English month name (January, February,
 accepted.
 
 @item yyyy
-Year.  In output, DATETIME always produces a 4-digit year; other
-formats can produce a 2- or 4-digit year.  The century assumed for
-2-digit years depends on the EPOCH setting (@pxref{SET EPOCH}).  In
-output, a year outside the epoch causes the whole field to be filled
-with asterisks (@samp{*}).
+Year.  In output, DATETIME and YMDHMS always produce 4-digit years;
+other formats can produce a 2- or 4-digit year.  The century assumed
+for 2-digit years depends on the EPOCH setting (@pxref{SET EPOCH}).
+In output, a year outside the epoch causes the whole field to be
+filled with asterisks (@samp{*}).
 
 @item jjj
 Day of year (Julian day), from 1 to 366.  This is exactly three digits
@@ -1147,7 +1198,11 @@ two digits.
 Hour of day, from 0 to 23.  Output as exactly two digits.
 
 @item MM
-Minute of hour, from 0 to 59.  Output as exactly two digits.
+In MTIME, count of minutes, which may be positive or negative.  Output
+as at least two digits.
+
+In other formats, minute of hour, from 0 to 59.  Output as exactly two
+digits.
 
 @item SS.ss
 Seconds within minute, from 0 to 59.  The integer part is output as
@@ -1161,7 +1216,7 @@ controls the character accepted and displayed as the decimal point
 For output, the date and time formats use the delimiters indicated in
 the table.  For input, date components may be separated by spaces or by
 one of the characters @samp{-}, @samp{/}, @samp{.}, or @samp{,}, and
-time components may be separated by spaces, @samp{:}, or @samp{.}.  On
+time components may be separated by spaces or @samp{:}.  On
 input, the @samp{Q} separating quarter from year and the @samp{WK}
 separating week from year may be uppercase or lowercase, and the spaces
 around them are optional.
@@ -1175,7 +1230,7 @@ below:
 
 @float
 @multitable {DATETIME} {Min. Input Width} {Min. Output Width} {4-digit year}
-@headitem Format @tab Min. Input Width @tab Min. Output Width @tab Option 
+@headitem Format @tab Min. Input Width @tab Min. Output Width @tab Option
 @item DATE @tab 8 @tab 9 @tab 4-digit year
 @item ADATE @tab 8 @tab 8 @tab 4-digit year
 @item EDATE @tab 8 @tab 8 @tab 4-digit year
@@ -1185,41 +1240,43 @@ below:
 @item MOYR @tab 6 @tab 6 @tab 4-digit year
 @item WKYR @tab 6 @tab 8 @tab 4-digit year
 @item DATETIME @tab 17 @tab 17 @tab seconds
+@item YMDHMS @tab 12 @tab 16 @tab seconds
+@item MTIME @tab 4 @tab 5
 @item TIME @tab 5 @tab 5 @tab seconds
 @item DTIME @tab 8 @tab 8 @tab seconds
 @end multitable
 @end float
-@noindent 
+@noindent
 In the table, ``Option'' describes what increased output width enables:
 
 @table @asis
 @item 4-digit year
-A field 2 columns wider than minimum will include a 4-digit year.
-(DATETIME format always includes a 4-digit year.)
+A field 2 columns wider than the minimum includes a 4-digit year.
+(DATETIME and YMDHMS formats always include a 4-digit year.)
 
 @item seconds
-A field 3 columns wider than minimum will include seconds as well as
+A field 3 columns wider than the minimum includes seconds as well as
 minutes.  A field 5 columns wider than minimum, or more, can also
 include a decimal point and fractional seconds (but no more than allowed
 by the format's decimal places).
 @end table
 
 For the time and date formats, the default output format is the same as
-the input format, except that PSPP increases the field width, if
+the input format, except that @pspp{} increases the field width, if
 necessary, to the minimum allowed for output.
 
 Time or dates narrower than the field width are right-justified within
 the field.
 
 When a time or date exceeds the field width, characters are trimmed from
-the end until it fits.  This can occur in an unusual situation, e.g.@:
+the end until it fits.  This can occur in an unusual situation, @i{e.g.}@:
 with a year greater than 9999 (which adds an extra digit), or for a
-negative value on TIME or DTIME (which adds a leading minus sign).
+negative value on MTIME, TIME, or DTIME (which adds a leading minus sign).
 
 @c What about out-of-range values?
 
 The system-missing value is output as a period at the right end of the
-field.  
+field.
 
 @node Date Component Formats
 @subsubsection Date Component Formats
@@ -1273,7 +1330,7 @@ or to blanks, depending on type.
 However, sometimes it's useful to have a variable that keeps its value
 between cases.  You can do this with @cmd{LEAVE} (@pxref{LEAVE}), or you can
 use a @dfn{scratch variable}.  Scratch variables are variables whose
-names begin with an octothorpe (@samp{#}).  
+names begin with an octothorpe (@samp{#}).
 
 Scratch variables have the same properties as variables left with
 @cmd{LEAVE}: they retain their values between cases, and for the first
@@ -1285,9 +1342,9 @@ to copy its value into an ordinary variable, then use that ordinary
 variable in the analysis.
 
 @node Files
-@section Files Used by PSPP
+@section Files Used by @pspp{}
 
-PSPP makes use of many files each time it runs.  Some of these it
+@pspp{} makes use of many files each time it runs.  Some of these it
 reads, some it writes, some it creates.  Here is a table listing the
 most important of these files:
 
@@ -1299,8 +1356,8 @@ most important of these files:
 @item command file
 @itemx syntax file
 These names (synonyms) refer to the file that contains instructions
-that tell PSPP what to do.  The syntax file's name is specified on
-the PSPP command line.  Syntax files can also be read with
+that tell @pspp{} what to do.  The syntax file's name is specified on
+the @pspp{} command line.  Syntax files can also be read with
 @cmd{INCLUDE} (@pxref{INCLUDE}).
 
 @cindex file, data
@@ -1312,10 +1369,10 @@ be embedded in a syntax file with @cmd{BEGIN DATA} and @cmd{END DATA}.
 @cindex file, output
 @cindex output file
 @item listing file
-One or more output files are created by PSPP each time it is
+One or more output files are created by @pspp{} each time it is
 run.  The output files receive the tables and charts produced by
 statistical procedures.  The output files may be in any number of formats,
-depending on how PSPP is configured.
+depending on how @pspp{} is configured.
 
 @cindex system file
 @cindex file, system
@@ -1335,7 +1392,7 @@ portable files.
 @section File Handles
 @cindex file handles
 
-A @dfn{file handle} is a reference to a data file, system file, or 
+A @dfn{file handle} is a reference to a data file, system file, or
 portable file.  Most often, a file handle is specified as the
 name of a file as a string, that is, enclosed within @samp{'} or
 @samp{"}.
@@ -1343,27 +1400,27 @@ name of a file as a string, that is, enclosed within @samp{'} or
 A file name string that begins or ends with @samp{|} is treated as the
 name of a command to pipe data to or from.  You can use this feature
 to read data over the network using a program such as @samp{curl}
-(e.g.@: @code{GET '|curl -s -S http://example.com/mydata.sav'}), to
+(@i{e.g.}@: @code{GET '|curl -s -S http://example.com/mydata.sav'}), to
 read compressed data from a file using a program such as @samp{zcat}
-(e.g.@: @code{GET '|zcat mydata.sav.gz'}), and for many other
+(@i{e.g.}@: @code{GET '|zcat mydata.sav.gz'}), and for many other
 purposes.
 
-PSPP also supports declaring named file handles with the @cmd{FILE
+@pspp{} also supports declaring named file handles with the @cmd{FILE
 HANDLE} command.  This command associates an identifier of your choice
 (the file handle's name) with a file.  Later, the file handle name can
-be substituted for the name of the file.  When PSPP syntax accesses a
+be substituted for the name of the file.  When @pspp{} syntax accesses a
 file multiple times, declaring a named file handle simplifies updating
 the syntax later to use a different file.  Use of @cmd{FILE HANDLE} is
 also required to read data files in binary formats.  @xref{FILE HANDLE},
 for more information.
 
-In some circumstances, PSPP must distinguish whether a file handle
+In some circumstances, @pspp{} must distinguish whether a file handle
 refers to a system file or a portable file.  When this is necessary to
-read a file, e.g.@: as an input file for @cmd{GET} or @cmd{MATCH FILES},
-PSPP uses the file's contents to decide.  In the context of writing a
-file, e.g.@: as an output file for @cmd{SAVE} or @cmd{AGGREGATE}, PSPP
+read a file, @i{e.g.}@: as an input file for @cmd{GET} or @cmd{MATCH FILES},
+@pspp{} uses the file's contents to decide.  In the context of writing a
+file, @i{e.g.}@: as an output file for @cmd{SAVE} or @cmd{AGGREGATE}, @pspp{}
 decides based on the file's name: if it ends in @samp{.por} (with any
-capitalization), then PSPP writes a portable file; otherwise, PSPP
+capitalization), then @pspp{} writes a portable file; otherwise, @pspp{}
 writes a system file.
 
 INLINE is reserved as a file handle name.  It refers to the ``data
@@ -1382,7 +1439,7 @@ more information.
 @cindex command syntax, description of
 @cindex description of command syntax
 
-The syntax of some parts of the PSPP language is presented in this
+The syntax of some parts of the @pspp{} language is presented in this
 manual using the formalism known as @dfn{Backus-Naur Form}, or BNF. The
 following table describes BNF:
 
@@ -1390,7 +1447,7 @@ following table describes BNF:
 @cindex keywords
 @cindex terminals
 @item
-Words in all-uppercase are PSPP keyword tokens.  In BNF, these are
+Words in all-uppercase are @pspp{} keyword tokens.  In BNF, these are
 often called @dfn{terminals}.  There are some special terminals, which
 are written in lowercase for clarity:
 
@@ -1419,7 +1476,7 @@ Operators and punctuators.
 @cindex @code{.}
 @item @code{.}
 The end of the command.  This is not necessarily an actual dot in the
-syntax file: @xref{Commands}, for more details.
+syntax file (@pxref{Commands}).
 @end table
 
 @item