[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sav files with attributes
From: |
John Darrington |
Subject: |
Re: sav files with attributes |
Date: |
Wed, 3 Sep 2008 10:48:05 +0800 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Tue, Sep 02, 2008 at 10:44:37AM -0700, Ben Pfaff wrote:
SPSS 14 added the DATAFILE ATTRIBUTE and VARIABLE ATTRIBUTE
commands, which added two new extension records (subtypes 17 and
18) to the .sav file format. My current idea for the new output
subsystem involves metadata added via these attributes, so as a
first step I'm adding support for attributes to PSPP. This
should not be hard. But so far, I've only been able to find 3
.sav files in the wild (via web searches) that have attributes in
them. Do you have any around?
If you don't have any, but do have a copy of SPSS to experiment
with, I would like to look at a .sav file that contains
attributes that have the following in them: double quotes ("),
unbalanced single quotes ('), and line feeds. I think that the
following syntax would be sufficient:
DATA LIST /dummy 1.
BEGIN DATA.
1
END DATA.
DATAFILE ATTRIBUTE
ATTRIBUTE=dquote1('"x"')
dquote2('"y')
squote1("'x'"),
squote2("'y"),
linefeed(X'4142430A444546').
SAVE OUTFILE='x.sav'.
Spss doesn't like the line beginning "linefeed...", but if I delete
that, then that syntax is accepted ok.
Here's a tarball containing some of the experiments I tried.
Hopefully you can work out what I did.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
attributes.tar.gz
Description: Binary data
signature.asc
Description: Digital signature