LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2009)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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]


Back to: Top of message | Previous page | Main SPSSX-L page