LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 29 Apr 2008 17:35:39 -0400
Reply-To:     "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject:      Re: proc sql macro does not work
In-Reply-To:  <2FE93DA9114E7E4A9A2EB70A77C9FFD336876D@LTA3VS003.ees.hhs.gov>
Content-Type: text/plain; charset=us-ascii

> From: Wong, Lee-Yang (CDC/CCEHIP/NCEH) > I have some simple codes below that used to work, but for some reason > one of the macro variables "munit" does not get resolved any > more. I can > not tell what could go wrong here. Any help will be greatly > appreciated.

> proc sql noprint ;

> SELECT unit, type, year

INTO : Munit, : Mtype, : Myear from x ;

quit;

%Let Munit = &Munit.;%*trim leading spaces; %Let Mtype = &Mtype.;%*trim leading spaces; %Let Myear = &Myear.;%*trim leading spaces;

you have not allocated the length of your Text* variables

%Let Text1 = Geometric mean and selected percentiles of %trim(&mtype) concentrations; %Let Text2 =(in %trim(&munit)) for the total U.S.; %Let Text3 = population aged3 years and older, %trim(&myear).;

data Work.Text; attrib Text1 %length(&Text1.) Text2 %length(&Text2.) Text3 %length(&Text3.);

text1 = "&Text1." ; text2 = "&Text2."; text3 = "&Text3."; output; stop;

> > run ; > proc print data = Work.Text; var Text:; run ;

Ron Fehd the attrib or macro maven CDC Atlanta GA USA RJF2 at cdc dot gov


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