|
Dear all,
Could anybody please tell me why this is not working? define !SIM (file=!tok(1)/dep=!tok(1)/ind=!cha('/') /depco=!tok(1)!default(neg)/indco=!tok(1)!default(neg) /depwn=!tok(1)!default(6)/indwn=!tok(1)!default(6) /indsca=!tok(1)!default(5)) set mpr on. datas nam data. mis val !dep(!depwn)!ind(!indwn). <rest of macro body> !SIM(file=sim1 dep=V10031_1 ind= V10031_2 V10031_3 V10031_5 V10032_8 V10032_12 V10032_13/). 1688 0 M> 1689 0 M> . 1690 0 M> set mpr on. 1691 0 M> datas nam data. 1692 0 M> mis val ( 6 ) ( 6 ).
I mean, why does it leave !dep and !ind blanks? Why doesn't it fill in the variables I specified on my macro call?
TIA!
Ruben New Windows 7: Find the right PC for you. Learn more. |
|
|
Thanks, Albert-Jan!
Can python macros accomplish anything that 'define' can? As far as the name is concerned: SIM = Strategic Improvement Matrix, very well known among my colleagues who will -hopefully at some point- use this macro. With regard to the code, I've discovered my own stupidity this time: Wrong way: !SIM(file=sim1 dep=V10031_1 ind= V10031_2 V10031_3 V10031_5 V10032_8 V10032_12 V10032_13/). Right way: !SIMfile=sim1 dep=V10031_1 ind= V10031_2 V10031_3 V10031_5 V10032_8 V10032_12 V10032_13/. CHEERS!! Ruben van den Berg Date: Mon, 14 Dec 2009 06:16:08 -0800 From: [hidden email] Subject: Re: Macro trouble To: [hidden email]
New Windows 7: Simplify what you do everyday. Find the right PC for you. |
|
Python is much more powerful than macros. It is data aware. That is, it can be used to fetch dictionary information such as variable names, formats, and labels; and it can be used to read data stored in those variables. Take a look at the documentation and examples on http://www.spss.com/devcentral/. From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ruben van den Berg Thanks, Albert-Jan! !SIM(file=sim1 dep=V10031_1 ind= V10031_2 V10031_3 V10031_5 V10032_8 V10032_12 V10032_13/).
!SIMfile=sim1 dep=V10031_1 ind= V10031_2 V10031_3 V10031_5 V10032_8 V10032_12 V10032_13/.
Date: Mon, 14 Dec 2009 06:16:08 -0800
New Windows 7: Simplify what you do everyday. Find the right PC for you. |
|
In reply to this post by Ruben Geert van den Berg
|
| Free forum by Nabble | Edit this page |
