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 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 12 May 2004 09:55:16 -0400
Reply-To:     Howard Schreier <howard_schreier@ITA.DOC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Schreier <howard_schreier@ITA.DOC.GOV>
Subject:      Re: aligning and length statement

Leave the TRIM function out. The intermediate result reurned by TRIM has no trailing blanks, so there is no "space" for the RIGHT function to shift.

In other words, RIGHT and TRIM provide alternative ways to get rid of trailing blanks. If you apply one, there is nothing for the other to do.

On Wed, 12 May 2004 02:27:52 GMT, David Wright <David_wright@SPRA.COM> wrote:

>I was helping a client who needed to right align and zero fill a character >field (y). > >I suggested: > >length $20 x; >x=right(trim(y)); > >and then translate the blanks to zeros. > >This turns out to only work if there is no length statement. > >Why is this the case? Doesn't the length statement simply intitalize a >variable? And how can I work around the possiblity x might inititalize with a >length that is too small?


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