-@node Data File Format, q2c Input Format, Portable File Format, Top
+@node Data File Format
@appendix Data File Format
PSPP necessarily uses the same format for system files as do the
* Data Record::
@end menu
-@node File Header Record, Variable Record, Data File Format, Data File Format
+@node File Header Record
@section File Header Record
The file header is always the first record in the file.
field is arbitrarily set to @samp{00:00:00}.
@item char file_label[64];
-Set the the file label declared by the user, if any @xref{FILE LABEL}.
+Set the file label declared by the user, if any (@pxref{FILE LABEL}).
Padded on the right with spaces.
@item char padding[3];
length. Set to zeros.
@end table
-@node Variable Record, Value Label Record, File Header Record, Data File Format
+@node Variable Record
@section Variable Record
Immediately following the header must come the variable records. There
@item char name[8];
Variable name. The variable name must begin with a capital letter or
-the at-sign (@samp{@@}). Subsequent characters may also be octothorpes
+the at-sign (@samp{@@}). Subsequent characters may also be digits, octothorpes
(@samp{#}), dollar signs (@samp{$}), underscores (@samp{_}), or full
stops (@samp{.}). The variable name is padded on the right with spaces.
@code{SDATE}
@end table
-@node Value Label Record, Value Label Variable Record, Variable Record, Data File Format
+@node Value Label Record
@section Value Label Record
Value label records must follow the variable records and must precede
label. The remainder of the field is the label itself. The field is
padded on the right to a multiple of 64 bits in length.
-@node Value Label Variable Record, Document Record, Value Label Record, Data File Format
+@node Value Label Variable Record
@section Value Label Variable Record
Every value label variable record must be immediately preceded by a
@item int32 vars[/* variable length */];
A list of variables to which to apply the value labels. There are
-@code{count} elements.
+@code{count} elements. Each element identifies a variable record, where
+the first element is numbered 1 and long string variables are considered
+to occupy multiple indexes.
@end table
-@node Document Record, Machine int32 Info Record, Value Label Variable Record, Data File Format
+@node Document Record
@section Document Record
There must be no more than one document record per system file.
Lines shorter than 80 characters are padded on the right with spaces.
@end table
-@node Machine int32 Info Record, Machine flt64 Info Record, Document Record, Data File Format
+@node Machine int32 Info Record
@section Machine @code{int32} Info Record
There must be no more than one machine @code{int32} info record per
@item int32 character_code;
Character code. 1 indicates EBCDIC, 2 indicates 7-bit ASCII, 3
indicates 8-bit ASCII, 4 indicates DEC Kanji.
+Windows code page numbers are also valid.
@end table
-@node Machine flt64 Info Record, Auxiliary Variable Parameter Record, Machine int32 Info Record, Data File Format
+@node Machine flt64 Info Record
@section Machine @code{flt64} Info Record
There must be no more than one machine @code{flt64} info record per
Record subtype. Always set to 4.
@item int32 size;
-Size of each piece of data in the data part, in bytes. Always set to 4.
+Size of each piece of data in the data part, in bytes. Always set to 8.
@item int32 count;
Number of pieces of data in the data part. Always set to 3.
The value used for LOWEST in missing values.
@end table
-@node Auxiliary Variable Parameter Record, Long Variable Names Record, Machine flt64 Info Record, Data File Format
+@node Auxiliary Variable Parameter Record
@section Auxiliary Variable Parameter Record
There must be no more than one auxiliary variable parameter record per
@item struct aux_params aux_params[];
An array of @code{struct aux_params}. The order of the elements corresponds
-to the order of the variables in the Variable Records. The @code{struct aux_params} type is defined as follows:
+to the order of the variables in the Variable Records. No element
+corresponds to variable records that continue long string variables.
+The @code{struct aux_params} type is defined as follows:
@example
struct aux_params
Continuous Scale
@end table
+Occasionally a value of 0 is seen here. PSPP interprets this to mean
+a nominal scale.
+
@item int32 width
The width of the display column for the variable in characters.
-@node Long Variable Names Record, Very Long String Length Record, Auxiliary Variable Parameter Record, Data File Format
+@node Long Variable Names Record
@section Long Variable Names Record
There must be no more than one long variable names record per
A list of @var{key}--@var{value} tuples, where @var{key} is the name
of a variable, and @var{value} is its long variable name.
The @var{key} field is at most 8 bytes long and must match the
-name of a variable which appears in the variable record @xref{Variable Record}.
+name of a variable which appears in the variable record (@pxref{Variable
+Record}).
The @var{value} field is at most 64 bytes long.
The @var{key} and @var{value} fields are separated by a @samp{=} byte.
Each tuple is separated by a byte whose value is 09. There is no
The total length is @code{count} bytes.
@end table
-@node Very Long String Length Record, Miscellaneous Informational Records, Long Variable Names Record, Data File Format
+@node Very Long String Length Record
@comment node-name, next, previous, up
@section Very Long String Length Record
A list of @var{key}--@var{value} tuples, where @var{key} is the name
of a variable, and @var{value} is its length.
The @var{key} field is at most 8 bytes long and must match the
-name of a variable which appears in the variable record @xref{Variable Record}.
-The @var{value} field is exactly 5 bytes long. It is a zero padded ascii
-encoded, string which is the length of the variable.
+name of a variable which appears in the variable record (@pxref{Variable
+Record}).
+The @var{value} field is exactly 5 bytes long. It is a zero-padded,
+ASCII-encoded string that is the length of the variable.
The @var{key} and @var{value} fields are separated by a @samp{=} byte.
-Tuples are delimeted a two byte sequence @{00, 09@}.
-After the last tuple, there may be a single byte 00, or by @{00, 09@}.
+Tuples are delimited by a two-byte sequence @{00, 09@}.
+After the last tuple, there may be a single byte 00, or @{00, 09@}.
The total length is @code{count} bytes.
@end table
-@node Miscellaneous Informational Records, Dictionary Termination Record, Very Long String Length Record, Data File Format
+@node Miscellaneous Informational Records
@section Miscellaneous Informational Records
Miscellaneous informational records must follow the variable records and
precede the dictionary termination record.
-Miscellaneous informational records are ignored by PSPP when reading
-system files. They are not written by PSPP when writing system files.
+Some specific types of miscellaneous informational records are
+documented here, but others are known to exist. PSPP ignores unknown
+miscellaneous informational records when reading system files.
@example
struct sysfile_misc_info
data.
@end table
-@node Dictionary Termination Record, Data Record, Miscellaneous Informational Records, Data File Format
+@node Dictionary Termination Record
@section Dictionary Termination Record
The dictionary termination record must follow all other records, except
Ignored padding. Should be set to 0.
@end table
-@node Data Record, , Dictionary Termination Record, Data File Format
+@node Data Record
@section Data Record
Data records must follow all other records in the data file. There must