|
This post was updated on .
Hi there -
Is there a way to "export" variable labels from the viewer to a separate file? I tried playing around with oms but without success. Thanks! Sven |
|
Have you looked into APPLY DICTIONARY? It can copy variable labels and other metadata from one dataset to another or within a dataset. Regards, Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Hi there - I am trying to write a macro that generates a new macro, which contains the variable labels of specific variables I am interested in. This new macro could be used to (re-) label variables with a minimum of syntax needed, including NOT having to write out all variable labels. Alternatively there may be a way to "export" variable labels from the viewer to a separate file? I tried playing around with oms but without success. Thanks! Sven -- View this message in context: http://old.nabble.com/Macro-that-generates-macro-containing-%28all%29-variable-labels-or-saving-variable-labels-to-file-tp27705398p27705398.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Thanks Jon -
the problem with that approach is that it applies it to all variables. You also need to have the same variable names in both files and do not have any flexibility in adding to the variable labels - such as adding a "recoded" statement to all of them if you do not have a variable containing the variable names .... hm. Sven
|
|
Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Thanks Jon - the problem with that approach is that it applies it to all variables. You also need to have the same variable names in both files and do not have any flexibility in adding to the variable labels - such as adding a "recoded" statement to all of them if you do not have a variable containing the variable names .... hm. Sven >>>Not so. Since around V13 or 14 you can select the variables, and you can match up variables with different names. Try the Data>Copy Data Properties wizard to get started. Jon K Peck wrote: > > Have you looked into APPLY DICTIONARY? It can copy variable labels and > other metadata from one dataset to another or within a dataset. > > Regards, > > Jon Peck > SPSS, an IBM Company > [hidden email] > 312-651-3435 > > > > From: > ksven <[hidden email]> > To: > [hidden email] > Date: > 02/23/2010 08:56 AM > Subject: > [SPSSX-L] Macro that generates macro containing (all) variable labels/or > saving variable labels to file > Sent by: > "SPSSX(r) Discussion" <[hidden email]> > > > > Hi there - > I am trying to write a macro that generates a new macro, which contains > the > variable labels of specific variables I am interested in. This new macro > could be used to (re-) label variables with a minimum of syntax needed, > including NOT having to write out all variable labels. > Alternatively there may be a way to "export" variable labels from the > viewer > to a separate file? I tried playing around with oms but without success. > Thanks! > Sven > -- > View this message in context: > http://old.nabble.com/Macro-that-generates-macro-containing-%28all%29-variable-labels-or-saving-variable-labels-to-file-tp27705398p27705398.html > > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > > > > -- View this message in context: http://old.nabble.com/Macro-that-generates-macro-containing-%28all%29-variable-labels-or-saving-variable-labels-to-file-tp27705398p27705997.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
OK -
this is a clumsy way but it works (assuming you want the variable labels of I1 to I3 as a unique variables in a new spss file): OMS /SELECT TABLES /IF COMMANDS = ["Frequencies"] subtypes=["Frequencies"] /DESTINATION FORMAT = SAV OUTFILE = 'P:\vars.sav'. freq VAR=I1 I2 I3. omsend. get 'P:\vars.sav' /keep=label_ var2. ***Var 2 gets created and by selecting 1.00 you delete all other duplicates. sel if (var2="1.00"). save outfile='P:\vars.sav' /keep=label_. exe. Best, Sven |
| Free forum by Nabble | Edit this page |
