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 (January 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 18 Jan 2010 05:26:25 -0800
Reply-To:     Emil <remilah@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Emil <remilah@GMAIL.COM>
Organization: http://groups.google.com
Subject:      problem with automatic categorization of variables
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

hi I need to categorize variable (let it be 'b'). I wrote this code and i don't know what is wrong :(

data z1; input p $ d t $ ; cards; 3 1 a1 3 5 a3 3 7 a8 3 9 a5 3 6 g2 3 . t1 . 0 . . . . 1 4 g2 2 1 f1 2 4 1 run; ----------------------------------------------- and my macro ---------------------------------------------- I would have 1 category (variable 'b') every 2 units (variable 'd') ======================================= %macro pod( n=, l=); data new; set z1; %do i=1 %to &n %by 2; %do j=&i+2 %to &n; %do k=1 %to &l; if &i < d < &j then b=&k; %end; %end; %end; run; %MEND pod;


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