f



Saving variable view contents

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!
3
santa
11/16/2009 4:02:49 PM
comp.soft-sys.stat.spss 5679 articles. 0 followers. Post Follow

9 Replies
5398 Views

Similar Articles

[PageSpeed] 35

On Nov 16, 11:02=A0am, 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
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
0
Bruce
11/16/2009 6:43:36 PM
On Nov 16, 11:43=A0am, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
> On Nov 16, 11:02=A0am, 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
> "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
0
JKPeck
11/16/2009 11:53:35 PM
On Nov 17, 12:53=A0am, JKPeck <jkp...@gmail.com> wrote:
> On Nov 16, 11:43=A0am, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
>
>
>
>
>
> > On Nov 16, 11:02=A0am, 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
> > "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. =A0No need to rerun the
> syntax. =A0That's Copy Data Properties on the Data menu.
>
> The CODEBOOK command is a newer and =A0nicer 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. =A0For 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?
0
santa
11/17/2009 2:01:38 PM
On Nov 16, 7:43=A0pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
> On Nov 16, 11:02=A0am, 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
> "When all else fails, RTFM."

Thanks Bruce!

Your idea was just fine, I saved them as HTML and now I can use them
as I wish.

Thank you!
0
santa
11/17/2009 2:57:31 PM
On Nov 17, 7:01=A0am, santa claws <rantingn...@gmail.com> wrote:
> On Nov 17, 12:53=A0am, JKPeck <jkp...@gmail.com> wrote:
>
>
>
> > On Nov 16, 11:43=A0am, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
>
> > > On Nov 16, 11:02=A0am, 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, bu=
t
> > > > 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/Ho=
me
> > > "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. =A0No need to rerun the
> > syntax. =A0That's Copy Data Properties on the Data menu.
>
> > The CODEBOOK command is a newer and =A0nicer 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. =A0For 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?

Programmability requires at least SPSS v14, so I'm glad that the html
solution works for you.  CODEBOOK was new in V17.
0
JKPeck
11/17/2009 7:36:45 PM
On Nov 17, 2:36=A0pm, JKPeck <jkp...@gmail.com> wrote:

> Programmability requires at least SPSS v14, so I'm glad that the html
> solution works for you. =A0CODEBOOK 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
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
0
Bruce
11/17/2009 8:58:49 PM
On Nov 17, 1:58=A0pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
> On Nov 17, 2:36=A0pm, JKPeck <jkp...@gmail.com> wrote:
>
> > Programmability requires at least SPSS v14, so I'm glad that the html
> > solution works for you. =A0CODEBOOK was new in V17.
>
> Ah, OK. =A0That explains why I didn't know about CODEBOOK. =A0I'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? =A0 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
> bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/Home
> "When all else fails, RTFM."

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.
0
JKPeck
11/18/2009 4:04:00 AM
What is "OMS" that you mention in step one?




On Nov 16, 1:43=A0pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:
> On Nov 16, 11:02=A0am, 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
> "When all else fails, RTFM."

0
Stephan
12/10/2009 3:49:38 PM
On Dec 10, 10:49=A0am, "Stephan C. Telka" <stephan.te...@gmail.com>
wrote:
> What is "OMS" that you mention in step one?


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
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
0
Bruce
12/10/2009 3:54:25 PM
Reply:

Similar Artilces:

Saving Saved Views
Is there a way of transfering the "saved views" from one file to another? (Other than using a template?) I've created a number of views for capturing 2D pictures for the parts manual, and I would like to keep this same viewing angle for more of the parts within the full assembly. Is there a way to do this? Indyrose mapkey Rose wrote: > Is there a way of transfering the "saved views" from one file to > another? (Other than using a template?) > > I've created a number of views for capturing 2D pictures for the parts > manual, and I ...

save Variables in Gui view
hallo, how can i save the given Variables from the user in GUI-View in case i have more than layout. and want to back to one of them. thnx On Dec 29, 7:31=A0am, "Beshoy Botros" <eng-bes...@hotmail.com> wrote: > hallo, > > how can i save the given Variables from the user =A0in GUI-View in case i= have more than layout. and want to back to one of them. > > thnx =A0 ---------------------- Hints: save() load() getappdata() setappdata() global http://www.mathworks.com/support/solutions/en/data/1-1BAR8/index.html?1-1BA= R8 ...

Variables + arrays contents view.
Dear all, I used to program on various C - C++ Borland compilers and I have found very useful a utility which allowed me to view the contents of variables and arrays (in another window) while I stepped into a program in the process of debugging it. Can any version of Logo do that? Many thanks, Gianluca Gianluca7281@aol.com wrote: > I used to program on various C - C++ Borland compilers and I have > found very useful a utility which allowed me to view the contents of > variables and arrays (in another window) while I stepped into a > program in the process of debugging it. >...

Contents of variable as variable name
I know that sounds a bit crazy, but is there a way to do that? -- Posted via http://www.ruby-forum.com/. On 7/15/07, Rob Kerfia <redct@openfish.info> wrote: > I know that sounds a bit crazy, but is there a way to do that? > One way of doing it is: irb(main):025:0> a = "foo" "foo" irb(main):026:0> eval "#{a}=1" 1 irb(main):027:0> foo 1 Although eval is normally discouraged and must be used sparingly. Rob Kerfia said the following on 07/14/2007 11:10 PM: > I know that sounds a bit crazy, but is there a way to do that? > > oh...

Sending Variable content, not Variable name
Here's what I'm trying to do: I have a large number of pages that call a pop-up survey page. It is important to know what page the survey is referring to - so I am passing the name of the referring page through the URL. The problem I'm having is that when the data on the survey page is submitted through formmail, I can't seem to get the referring page's name sent too - I keep getting the variable name itself, not the contents of the variable. So for instance, if the referring page is 123.htm, and I assign it to variable "external_url", I get the name "ext...

Getting a variables contents from a string of the variables name
Hi, Is there a function or way to write one, that takes an input of, say 'a' and then returns the variable called a? say, for instance I want to, if a variable doesn't exist set a default value instead, for many variables. Instead of writing the checking code every time, I could just say newvar = isthisvalid('a'); isthisvalid would use the string to check with exist if 'a', then if it does get the value of 'a'. Is there a way? Look at help exist help eval -Matt Matthew Carson wrote: > > > Look at > > help exist > h...

creating variable with names determinded by contents of other variables
is there a way to create variables during data set excution using macros or data from other variables? I'm trying to use the value of a variable in a dataset for creating new variables using that value is the new variable name. Any ideas? thanks, Issac ...

How to: referencing variables using the contents of otehr variables.
I am using SUN Java, jdk1.6.0_13 Is there a way to reference a variable using the contents of another variable? I have a variable, primitive data type char, that can contain many different values. For each of these values, there is a corresponding array of the same name as the contents of the char variable. For example, the char variable named P can have the value 'K', and there is also a two dimensional array named K[][] of type String. I want to be able to access the array directly, without using a switch (P) and explicitly having a case for each possible value of P. Thanks! ...

Annotation views
I have been trying to learn how to use annotation views but I am not sure I understand how it is supposed to work. I am trying to create a section view of my assembly and save it in the assembly so that the section view is available to use in any drawing referencing that assembly. I thought using annotation views would accomplish that but so far I am not getting it to work. I can create the section view, click save as in the prop manager, select to save it as an annotation view and everything seems fine. Create a drawing, in the task pane I switch to the view pallette tab and from the drop d...

save command can not save variable name?
Hello, I used save -ASCII results rc re lt rho_c_m2 rho_c_cm2 r... pad_distance to save the variables in to file results, but it turned out that the numbers stored in the file results does not have variable names before them, it is not convenient to see which variable corresponds to which data. I read the help but did not find any switch to turn on this function. Thanks for your help. Zhengquan In article <f9d690d9-b5eb-4622-bcbe-5254e145fd4f@i12g2000prf.googlegroups.com>, zhengquan <zhang.zhengquan@gmail.com> wrote: >I used >save -ASCII results rc re lt rho_c_m2 rh...

cannot grant permit for view because it is not a single-variable view ?
Hi, Did you see the error message below? Any help would be highly appreciated. Thanks. Frank. create view test_view as select a, b, c, max(d) as e from table_a where f = 'X' group by a, b, c grant select, insert, update on test_view to 'frank' Executing . . . E_PS0553 GRANT/CREATE PERMIT: View 'test_view' is not updateable because it is not a single-variable view or its definition involves aggregates, set operator(s) (UNION) or DISTINCT. 'UPDATE, INSERT' cannot be granted on non-updateable views (Mo...

shell scripting: echoing contents of contents of variable
Hello, Consider the following short example: $ a="foo" $ b="a" $ echo $b a $ echo $$b 9540b I was expecting "foo". Any ideas on how I could get the expected result? Thanks, Neil Neil Zanella <nzanella@cs.mun.ca>: > Consider the following short example: > > $ a="foo" > $ b="a" > $ echo $b > a stefan2@platon:~/test> a="foo" stefan2@platon:~/test> b="$a" stefan2@platon:~/test> echo $a foo stefan2@platon:~/test> echo $b foo Neil Zanella wrote: > Consider the following short examp...

Using the contents of a variable instead of the variable name itself
Hi, I want to delete some rows in a table depending on the contents of a string (which contains the field name in the table). For Instance: DoCmd.RunSQL "DELETE DISTINCTROW [tblQBFTemp].* FROM [tblQBFTemp] WHERE &[strFieldName] < " & lngFrom Obviously &[strFieldName] generates and error and if I use [strFieldName] I will also get an error because strFieldName isn't a field in the table. strFieldName = "postalcode" so I would expect: DoCmd.RunSQL "DELETE DISTINCTROW [tblQBFTemp].* FROM [tblQBFTemp] WHERE [postalcode] < " & lngFrom ...

Re: creating variable with names determinded by contents of other variables
On Wed, 12 May 2004 17:26:08 +0200, jg <jhongalt@INTERMAIL.CO.IL> wrote: >is there a way to create variables during data set excution using macros or >data from other variables? > >I'm trying to use the value of a variable in a dataset for creating new >variables using that value is the new variable name. Any ideas? > >thanks, >Issac Your question rephrased - can the value of a variable be used to name a subsequent variable? If I understand, you should be able to adapt this code for your purposes: Data test1; var1 = "namex"; call symput(...

Web resources about - Saving variable view contents - comp.soft-sys.stat.spss

Variable - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Westpac interest rate rise is one of many variable loan rate rises
WESTPAC is not alone in hitting its owner-occupier customers with a surprise interest rate rise, as dozens of other variable rate home loans ...

Airbnb upgrades variable pricing tool for hosts
Online home rental group Airbnb is rolling out an upgraded variable pricing tool that automatically raises or cuts room rates based on supply ...

Commonwealth Bank raises variable home loan rates
Home owners' mortgage costs are set to rise by hundreds of dollars a year, after the Commonwealth Bank became the latest bank to hike interest ...

CBA lifts variable home loan rates to offset costs associated with stricter capital requirements
The Commonwealth Bank to lift its home loan interest rates independently of the Reserve Bank to partially offset costs associated with stricter ...

Washington Square Signs Spielbergs, Choi Joins Variable and More
... films and an episode of the HBO comedy series "Girls," on which he plays the role of Ray Ploshansky. New York-based creative collective Variable ...

YouTube v10.32 Tweaks Some Interface Elements And Includes Hints About Virtual Reality Content And Variable ...
Forget Update Wednesday! Monday is the new big day. Not only were we treated to the latest M preview release and the official Marshmallow name, ...

Mozilla moves Firefox to variable release schedule
... schedule process "carefully" and learning "a lot" from it in the past years, Mozilla has announced that Firefox is now moving to a variable ...

"You have to ignore many variables to think women are paid less than men. California is happy to try." ...
Writes Sarah Ketterer in The Wall Street Journal in "The ‘Wage Gap’ Myth That Won’t Die" (which you can get to without subscribing if you Google ...

Staley: 'A lot of different variables...been a hard year'
... 41° Navigation Home Giants A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch Staley: 'A lot of different variables...been ...

Resources last updated: 2/9/2016 7:18:17 PM