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:         Tue, 24 Mar 2009 22:35:47 +0530
Reply-To:     Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Subject:      Re: reducing the length of numeric variable
Comments: To: Joe Matise <snoopy369@gmail.com>
In-Reply-To:  <b7a7fa630903240753x478ba111n3fceb7afda4e412a@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Tue, Mar 24, 2009 at 8:23 PM, Joe Matise <snoopy369@gmail.com> wrote: > Small correction to my explanation ... you either want to truncate the > number, or reduce its formatted length; you do not want to reduce the number > of bytes used to store the number (length), as that can have accuracy > complications beyond that of simple truncation. > > -Joe >

I am not sure about the case with SAS, but leaving numeric variables with the default length of 8 bytes might be actually more efficient because of internal architectural issues (I had taken a course many years ago, and may not remember the exact details). As others have pointed out, use formats to display the number with lesser decimal places. Explore the function ROUND if you actually want to change the value contained in the numeric variable.

Regards, Anindya


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