|
What is the easiest way to define and call a simple macro variable in SPSS?
I'm a 10+ year SAS user having to switch to SPSS. In SAS it would go something like this to define it: %let macrovar = 3; And something like this to call it: if var_X = ¯ovar; Any help is greatly appreciated. Michael W. Bates, Operations Research Analyst US Navy Recruiting Command [hidden email] ===================== 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 |
|
Administrator
|
I suggest you take a look at Raynald's SPSS Tools page: http://www.spsstools.net/ . Here's an example of one of the macro utilities he shows there: http://www.spsstools.net/Macros/Utilities/DefinePathByMacro.txt Good luck!
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
I've been trying to search through some saved files to look for some output
that I saved "just in case". My preferred search tool - Funduc Search and Replace - doesn't seem able to search in the .spv files. It can search syntax files without problems, which worked in this case. But I wonder if there are any tools that list members use to search through .spv files? Thanks Mike _________________________________________________________________________ Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410 Helping companies build products that people buy ===================== 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 |
|
In reply to this post by Michael W. Bates
For your simple example:
define !macrovar() 3 !enddefine. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Michael W. Bates Sent: Wednesday, October 21, 2009 8:48 AM To: [hidden email] Subject: SPSS Macro Variables What is the easiest way to define and call a simple macro variable in SPSS? I'm a 10+ year SAS user having to switch to SPSS. In SAS it would go something like this to define it: %let macrovar = 3; And something like this to call it: if var_X = ¯ovar; Any help is greatly appreciated. Michael W. Bates, Operations Research Analyst US Navy Recruiting Command [hidden email] ===================== 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 ===================== 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 |
| Free forum by Nabble | Edit this page |
