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 (March 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 28 Mar 2009 18:49:43 -0700
Reply-To:     barry.brian.barrios@GMAIL.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         barry.brian.barrios@GMAIL.COM
Organization: http://groups.google.com
Subject:      SQL selecting macro variables to be included in the table via a
              do loop
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

I was wondering if the fragment of code below is selecting the macro variables which have been created from before via a do loop, is done correctly? I am using the do loop again to call the macro variables and putting them in the same table "Factors" via SQL. For some reason, I don't think this is right what I am doing.

%do i=1 %to &counter;

%macro bygroupexport(portret,excess_port,fact);

PROC SQL;

CREATE TABLE Factors As

SELECT a.*, b.&portret, (b.&portret- a.RF) as &excess_port

From Factors as a, &fact as b

where a.date=MDY(b.month,1,b.year);

quit;

%mend bygroupexport;

%bygroupexport(portret&&byval&i,excess_port&&byval&i,&&byval&i); %end;


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