pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SPSS file record layout type 2 vs type 3


From: Pascal Heus
Subject: Re: SPSS file record layout type 2 vs type 3
Date: Mon, 03 Mar 2008 11:34:17 -0500
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

ben:
thanks for the feedback. SPSS format documentation is pretty sparse (only good paper I found is at http://www.wotsit.org/list.asp?search=sav&button=GO!) and I have this in my notes (after browsing the web for a while).   Also, the sfm-read.c file I have in the pspp source code seem to expect a layout_code 2 (around line 650). My source code may be outdated though.
I'm using this check in a Java SPSS Reader but will then just change the code to accept both 2 and 3. I likewise found no difference in the test files I have received.
best
Pascal

 /* Check endianness. */
  if (hdr.layout_code == 2)
    r->reverse_endian = 0;
  else
    {
      bswap_int32 (&hdr.layout_code);
      if (hdr.layout_code != 2)
    lose ((ME, _("%s: File layout code has unexpected value %d.  Value "
                     "should be 2, in big-endian or little-endian format."),
           handle_get_filename (r->fh), hdr.layout_code));


Ben Pfaff wrote:
Pascal Heus <address@hidden> writes:

  
Does anyone now the exact meaning of the record layout type byte
present in the SPSS .sav file header? This is byte #65 that follows
the $FL2 signature and the 60-byte information string. According to
the documentation I found and based on source codes, the only allowed
values are 2=SPSS file and 3=portable file. Problem is that I have
recently received a few files produced I think with SPSS 12 or 13 that
have a layout code = 3 (not sure why) but look exactly like a record
layout 2 file. I'm trying to figure out where this difference comes
    

What source have you found that says 3 = portable file?  I do not
recall reading that anywhere.

I have a fairly extensive library of .sav files that I have found
around the net.  A few of them have record layout 3; most of them
have record layout 2.  There does not seem to be any difference
in the format of the rest of the file based on the record layout
byte.

PSPP currently just uses the presence of a value 2 or 3 in this
field to detect whether the file is little-endian or big-endian
and otherwise ignores it.
  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]