Next: , Previous: , Up: SPV Light Detail Member Format   [Contents][Index]


D.2.8 Formats

Formats =>
    int32[n-widths] int32*[n-widths]
    string[locale]
    int32[current-layer]
    bool bool bool
    Y0
    CustomCurrency
    count(
      v1(X0?)
      v3(count(X1 count(X2)) count(X3)))
Y0 => int32[epoch] byte[decimal] byte[grouping]
CustomCurrency => int32[n-ccs] string*[n-ccs]

If n-widths is nonzero, then the accompanying integers are column widths as manually adjusted by the user.

locale is a locale including an encoding, such as en_US.windows-1252 or it_IT.windows-1252. The rest of the character strings in the member use this encoding. The encoding string is itself encoded in US-ASCII.

epoch is the year that starts the epoch. A 2-digit year is interpreted as belonging to the 100 years beginning at the epoch. The default epoch year is 69 years prior to the current year; thus, in 2017 this field by default contains 1948. In the corpus, epoch ranges from 1943 to 1948, plus some contain -1.

decimal is the decimal point character. The observed values are ‘.’ and ‘,’.

grouping is the grouping character. Usually, it is ‘,’ if decimal is ‘.’, and vice versa. Other observed values are ‘'’ (apostrophe), ‘ ’ (space), and zero (presumably indicating that digits should not be grouped).

n-ccs is observed as either 0 or 5. When it is 5, the following strings are CCA through CCE format strings. See Custom Currency Formats in PSPP. Most commonly these are all -,,, but other strings occur.

X0

X0 only appears, optionally, in version 1 members.

X0 => byte*14 Y1 Y2
Y1 =>
    string[command] string[command-local]
    string[language] string[charset] string[locale]
    bool bool bool bool
    Y0
Y2 => CustomCurrency byte[missing] bool[x17]

command describes the statistical procedure that generated the output, in English. It is not necessarily the literal syntax name of the procedure: for example, NPAR TESTS becomes “Nonparametric Tests.” command-local is the procedure’s name, translated into the output language; it is often empty and, when it is not, sometimes the same as command.

dataset is the name of the dataset analyzed to produce the output, e.g. DataSet1, and datafile the name of the file it was read from, e.g. C:\Users\foo\bar.sav. The latter is sometimes the empty string.

missing is the character used to indicate that a cell contains a missing value. It is always observed as ‘.’.

X0 repeats decimal, grouping, CustomCurrency, and missing already included in Formats.

A writer may safely use false for x17.

X1

X1 only appears in version 3 members.

X1 =>
    bool byte[x15] bool[x16]
    byte[lang]
    byte[show-variables]
    byte[show-values]
    int32[x18] int32[x19]
    00*17
    bool[x20]
    bool[show-caption]

lang may indicate the language in use. Some values seem to be 0: en, 1: de, 2: es, 3: it, 5: ko, 6: pl, 8: zh-tw, 10: pt_BR, 11: fr. The locale in Formats and the language, charset, and locale in X0 are more likely to be useful in practice.

show-variables determines how variables are displayed by default. A value of 1 means to display variable names, 2 to display variable labels when available, 3 to display both (name followed by label, separated by a space). The most common value is 0, which probably means to use a global default.

show-values is a similar setting for values. A value of 1 means to display the value, 2 to display the value label when available, 3 to display both. Again, the most common value is 0, which probably means to use a global default.

show-caption is true to show the caption, false to hide it.

A writer may safely use false for x14, 1 for x15, false for x16, -1 for x18 and x19, and false for x20.

X2

X2 only appears in version 3 members.

X2 =>
    int32[n-row-heights] int32*[n-row-heights]
    int32[n-style-map] StyleMap*[n-style-map]
    int32[n-styles] StylePair*[n-styles]
    count((i0 i0)?)
StyleMap => int64[cell-index] int16[style-index]

If present, n-row-heights and the accompanying integers are row heights as manually adjusted by the user.

The rest of X2 specifies styles for data cells. At first glance this is odd, because each data cell can have its own style embedded as part of the data, but in practice X2 specifies a style for a cell only if that cell is empty (and thus does not appear in the data at all). Each StyleMap specifies the index of a blank cell, calculated the same was as in the Cells (see SPV Light Member Cells), along with a 0-based index into the accompanying StylePair array.

A writer may safely omit the optional i0 i0 inside the count(…).

X3

X3 only appears in version 3 members.

X3 =>
    01 00 byte[x21] 00 00 00
    Y1
    double[small] 01
    (string[dataset] string[datafile] i0 int32[date] i0)?
    Y2
    (int32[x22] i0)?

date is a date, as seconds since the epoch, i.e. since January 1, 1970. Pivot tables within an SPV file often have dates a few minutes apart, so this is probably a creation date for the table rather than for the file.

X3 repeats decimal, grouping, CustomCurrency, and missing already included in Formats. command, command-local, language, charset, and locale have the same meaning as in X0.

small is a small real number, e.g. .001. Numbers smaller than this in absolute value are displayed in scientific notation.

Sometimes dataset, datafile, and date are present and other times they are absent. The reader can distinguish by assuming that they are present and then checking whether the presumptive dataset contains a null byte (a valid string never will).

x22 is usually 0 or 2000000.

A writer may safely use 4 for x21 and omit x22 and the other optional bytes at the end.


Next: , Previous: , Up: SPV Light Detail Member Format   [Contents][Index]