Date: Thu, 14 May 2009 11:14:29 -0300
Reply-To: angelina garnica <angelina.work08@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: angelina garnica <angelina.work08@gmail.com>
Subject: Macro Problem
Content-Type: multipart/alternative;
Hi, I´m new using macro. After a lot of trys I write this code, but it
dosen't work.
*////////// PRUEBA_1.
DEFINE !codigos (vnames=!CMDEND)
VECTOR c=v1 TO v5.
VECTOR d=imp_conc1 TO imp_conc5.
!DO !cnt=1 !TO 5
IF (c(!cnt)) = !QUOTE(!vnames).
COMPUTE !CONCAT('c_', !vnames) = d(!cnt).
!DOEND
!ENDDEFINE.
*//////////.
SET MPRINT = ON.
!codigos vnames = 001_001 001_002 001_003.
(I have more than 100 codes)
The idea is repeat this sintax for all codes.
VECTOR c=v1 TO v5.
VECTOR d=imp_conc1 TO imp_conc5.
LOOP cnt=1 TO 5.
DO IF (c(cnt)) = '001-001'.
COMPUTE c_001_001= d(cnt).
END IF.
END LOOP.
EXECUTE.
I hope you can help me.
Angelina
[text/html]