@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 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;
@cindex @pspp{}, language
This chapter discusses elements common to many @pspp{} commands.
@cindex @pspp{}, language
This chapter discusses elements common to many @pspp{} commands.
No white space is allowed within a number token, except for horizontal
white space between @samp{-} and the rest of the number.
No white space is allowed within a number token, except for horizontal
white space between @samp{-} and the rest of the number.
tokens, @samp{8945} and @samp{.}, if it is the last token on a line.
@xref{Commands, , Forming commands of tokens}.
tokens, @samp{8945} and @samp{.}, if it is the last token on a line.
@xref{Commands, , Forming commands of tokens}.
@cindex case-sensitivity
Strings are literal sequences of characters enclosed in pairs of
single quotes (@samp{'}) or double quotes (@samp{"}). To include the
@cindex case-sensitivity
Strings are literal sequences of characters enclosed in pairs of
single quotes (@samp{'}) or double quotes (@samp{"}). To include the
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
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
@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
@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
-pattern @code{DD MMM YY}.
+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}.
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
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
-* 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::
@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
@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
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
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
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,
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,
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
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
The commas or periods divide @var{string} into four fields, called the
@dfn{negative prefix}, @dfn{prefix}, @dfn{suffix}, and @dfn{negative
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
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
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
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
@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 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}
-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{*}).
-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.
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
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
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.
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.
@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
@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
@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 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
-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.)
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).
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).
@c What about out-of-range values?
The system-missing value is output as a period at the right end of the
@c What about out-of-range values?
The system-missing value is output as a period at the right end of the
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
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
Scratch variables have the same properties as variables left with
@cmd{LEAVE}: they retain their values between cases, and for the first
Scratch variables have the same properties as variables left with
@cmd{LEAVE}: they retain their values between cases, and for the first
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{"}.
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{"}.
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}
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}
In some circumstances, @pspp{} must distinguish whether a file handle
refers to a system file or a portable file. When this is necessary to
In some circumstances, @pspp{} must distinguish whether a file handle
refers to a system file or a portable file. When this is necessary to
decides based on the file's name: if it ends in @samp{.por} (with any
capitalization), then @pspp{} writes a portable file; otherwise, @pspp{}
writes a system file.
decides based on the file's name: if it ends in @samp{.por} (with any
capitalization), then @pspp{} writes a portable file; otherwise, @pspp{}
writes a system file.