pspp-dev
[Top][All Lists]
Advanced

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

Re: Suggestions


From: Rémi Dewitte
Subject: Re: Suggestions
Date: Thu, 29 Jan 2009 09:33:26 +0100

John,

What surprises me is that by just removing the truncation it already works for me.

Doing something like the script below with the non-truncating version works. Open this with spss and you have all your long value labels. It might depend on the spss version opening sav files...

Many thanks,
Rémi

Script :

data list /
  a 1-2
.
begin data.
 1
 2
 1
 2
end data.

VARIABLE LABEL a '0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789'

VALUE LABELS a
 1 '0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789'
 2 '0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789'
.

SAVE /OUTFILE='a.sav'.


On Thu, Jan 29, 2009 at 06:41, Ben Pfaff <address@hidden> wrote:
John Darrington <address@hidden> writes:

> Regarding the length of value labels: removing the 60 byte limit will
> cause problems when it comes to writing the data to a .sav file.
> Whilst recent spss versions can read/write value labels of any length,
> it does so by using a special extension to the file format.
>
> There's no fundamental reason why pspp can't also support arbitrary
> length labels, but since one of the goals of pspp is to be compatible
> with spss, before it's done, we would need to support these extensions
> too.  If  you're interested in doing this work, this will require a
> little bit of reverse engineering upon existing spss .sav files to
> discover how very long value labels are encoded
> (test/dissect-sysfile.c  might help you) and add the appropriate code
> to src/data/sys-file-writer.c and src/data/sys-file-reader.c

If anyone can point to some .sav files that have extra-long
labels, then I'll implement support for longer labels myself.
--
"If a person keeps faithfully busy each hour of the working day, he
 can count on waking up some morning to find himself one of the
 competent ones of his generation."
--William James


reply via email to

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