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 (October 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 24 Oct 2007 17:10:33 -0700
Reply-To:     "Schwarz, Barry A" <>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Schwarz, Barry A" <>
Subject:      Re: How To : Find Max Decimals IN A VAR
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"

Obviously that should have read "are not stored".

-----Original Message----- From: Schwarz, Barry A Sent: Wednesday, October 24, 2007 3:35 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: How To : Find Max Decimals IN A VAR

Are you dealing with numeric or character variables?

You do realize that most fractions, such as .2 and .33 are stored as exact numeric values in the computer. If you specify a sufficient precision, .2 will print as .19999999999968 or some such value depending on how your hardware stores floating point values. How do you intend to distinguish between the two.

-----Original Message----- From: Raj [mailto:snip] Sent: Wednesday, October 24, 2007 10:40 AM To: SAS-L@LISTSERV.UGA.EDU Subject: How To : Find Max Decimals IN A VAR


Say there is a dataset like below, how to find the maximum num of decimal places that variable T has in this dataset and store it into a macro variable

In this case the maximum decimals is 2. Any solutions team..?

data xxxtest; input t ; datalines; 1 2.2 3.33 2.0 4 ; run;

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