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 (September 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 1 Sep 2006 01:24:03 -0700
Reply-To:     Dubro <dubro@DOLIC.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dubro <dubro@DOLIC.DE>
Organization: http://groups.google.com
Subject:      Re: How to remove leading blanks from macro variables
Comments: To: sas-l@uga.edu
In-Reply-To:  <1157098623.712723.265880@i42g2000cwa.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Rune,

try either trim() in your proc sql statement or use $let num_sd_dok_bads_may_be_OK_1 = num_sd_dok_bads_may_be_OK_1;

HTH

Rune Runnestø schrieb:

> How do I remove leading blanks from macro variable values ? > > Here is a snippet of code demonstrating the issue: > > proc sql noprint; > select count(*) into :num_sd_dok_bads_may_be_OK_1 > from &lib..tp33_sd_dok_badrecs_may_be_OK_1; > > select count(*) into :num_sd_dok_bads_not_OK_1 > from &lib..tp33_sd_dok_badrecs_not_OK_1; > quit; > > > %put &num_sd_dok_bads_may_be_OK_1; > %put &num_sd_dok_bads_not_OK_1; > > > >From the log: > > SYMBOLGEN: Macro variable NUM_SD_DOK_BADS_MAY_BE_OK_1 resolves to > 1 > > SYMBOLGEN: Macro variable NUM_SD_DOK_BADS_NOT_OK_1 resolves to > 1 > > As we see, the macro variables have leading blanks. This is > inconveniente > when using them in text strings. How do I get rid of leading blanks in > macro variables ? > > Regards, > Rune


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