Thanks!
I don't know if there is a more straightforward method, but you could
do this:
1. Use OMS to send the output from DISPLAY DICTIONARY to a couple of
SPSS datasets (one containing the "Variable Information" table, the
other containing the "Variable Values" table).
2. Merge those files (with MATCH FILES).
3. Re-order the variables if desired (and delete any that are not
wanted).
4. Export the data to a tab-delimited text file.
--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
Note that if you want to save the metadata to use with another
dataset, you can just use Apply Dictionary. No need to rerun the
syntax. That's Copy Data Properties on the Data menu.
The CODEBOOK command is a newer and nicer alternative to DISPLAY
DATA, although that command certainly works.
If you use programmability, you can easily write an xml description of
the entire dictionary to a file. For example,
begin program.
import spss
spss.CreateXPathDictionary('mydict")
spss.GetXmlUtf16("mydict", "c:/temp/mydict.xml")
end program.
It will have all the dictionary information, but you can't use it
directly in SPSS to create a new dictionary.
HTH,
Jon Peck
Thanks Jon!
Unfortunately, I am using v13, and I can't find a way of using your
script... I am a newbie though... Am I missing something?
Thanks Bruce!
Your idea was just fine, I saved them as HTML and now I can use them
as I wish.
Thank you!
Programmability requires at least SPSS v14, so I'm glad that the html
solution works for you. CODEBOOK was new in V17.
> Programmability requires at least SPSS v14, so I'm glad that the html
> solution works for you. CODEBOOK was new in V17.
Ah, OK. That explains why I didn't know about CODEBOOK. I've only
had v17 for a short time.
Jon, how feasible would it be to add to the "Overview" help screens
(under Help - Topics - Index) a note indicating when a command was
added, and perhaps which module it belongs to? The latter info
appears in the Command Syntax Reference manual in the form "X is
available in the Y option" (e.g., MIXED is available in the Advanced
Statistics option"), but opening the PDF file takes longer than going
to the other Help windows.
Cheers,
Bruce
--
Bruce Weaver
bwe...@lakeheadu.ca
I've passed your suggestion on to the Pubs team. Personally, I like
using the PDF, but I know many other like the alternative form.
On Nov 16, 1:43 pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
> On Nov 16, 11:02 am, santa claws <rantingn...@gmail.com> wrote:
>
> > Hi! I have a simple question: how do I export the whole content of
> > variable view to a tab delimited file? I can export all my data, but
> > what about variable view? I'd like to save all the contents, value
> > labels included... saving to a file from the view doesn't do the
> > job...
>
> > Thanks!
>
> I don't know if there is a more straightforward method, but you could
> do this:
>
> 1. Use OMS to send the output from DISPLAY DICTIONARY to a couple of
> SPSS datasets (one containing the "Variable Information" table, the
> other containing the "Variable Values" table).
>
> 2. Merge those files (with MATCH FILES).
>
> 3. Re-order the variables if desired (and delete any that are not
> wanted).
>
> 4. Export the data to a tab-delimited text file.
>
> --
> Bruce Weaver
> bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/Home
OMS is short for Output Management System. The GUI interface for
using it is found in the Utilities menu (OMS Control Panel, and OMS
Identifiers). I believe there are examples of how to use OMS in
Raynald's Data Management book, which is freely available as a PDF on
the SPSS website.
--
Bruce Weaver
bwe...@lakeheadu.ca