Any suggestions?
File->Display Data File Information??
Until know I have no experience with v16.0.1 - use the export function
to excel or editor, modify it, export it back. Maybe this is helpful.
Peter
Thank you for the suggestions. The File>Display Data File Information
displays information for all variables and not just a particular
variable as does 'DISPLAY DICTIONARY /
VAR=VariableIwantInformationAbout.'. It is annoying that when I save
the table to a text file, it contains formatting. It would have
better if it just generated a flat file. But I did what Peter
suggested and save it to excel, modified it and exported it back.
Again thanks.
The easiest way to do this is to use OMS to capture the value label
table with OMS. That gives you many choices for the output format,
including a sav file, plain text, html, and xml, and you can limit the
output to just the value labels table.
Another way would be with a small Python program that reads the value
labels and writes them to a file under any format you want.
HTH,
Jon Peck
i'm probably not understanding the problem but why not use the
VALUELABEL(VAR_NAME) deal? like in this:
string newvar (a12).
compute newvar = valuelabel(month).
exe.
freq newvar.
then edit values? Jim Watts
I hadn't spotted the VALUELABEL function before. That's neat. Here's
a little demo.
* --------------------------------------------------- .
* Demonstration of the VALUELABEL function.
* Write value labels for OLDVAR into a string
* variable called LABELVAR. Then list OLDVAR
* and LABELVAR to get the guts of the VALUE
* LABELS command I want to apply to another
* set of variables.
* --------------------------------------------------- .
* Note that in SPSS 16, the sample datasets are in
* ..\SPSS\Samples\. If you are using an older
* version, the file is likely in the main SPSS folder.
GET
FILE='C:\Program Files\SPSS\Samples\1991 U.S. General Social
Survey.sav' /
keep = sex to region prob1.
freq prob1.
string labelvar (a50).
numeric new1 to new99 (f1.0).
compute labelvar = concat('"',valuelabel(prob1),'"').
exe.
sort cases by prob1.
match files
file = * /
by prob1 /
first = first
.
temp.
select if first.
list prob1 labelvar.
* Copy that listing from the output window and
* paste into the syntax window; use it as the
* main part of the value labels command.
value labels new1 to new99
1 "Health"
2 "Finances"
3 "Lack of Basic Services"
4 "Family"
5 "Personal"
7 "Miscellaneous"
.
* Add some data to NEW1 and NEW99, and test.
compute new1 = prob1.
compute new99 = prob1.
freq new1 new99.
* --------------------------------------------------- .
* Bruce Weaver, bwe...@lakeheadu.ca .
* 01-Feb-2008 .
* --------------------------------------------------- .
--
Bruce Weaver
bwe...@lakeheadu.ca
www.angelfire.com/wv/bwhomedir
"When all else fails, RTFM."