Date: Tue, 24 Mar 2009 13:41:53 -0500
Reply-To: Mary <mlhoward@avalon.net>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: reducing the length of numeric variable
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
And I hope you all have not scared the original questioner half to death.
This user EVEN sent me a "thank you" for the answer of:
"see the format statement."
-Mary
----- Original Message -----
From: "Mike Zdeb" <msz03@ALBANY.EDU>
To: <SAS-L@LISTSERV.UGA.EDU>
Sent: Tuesday, March 24, 2009 1:25 PM
Subject: Re: reducing the length of numeric variable
> hi ... it's funny how the original question ...
>
> *****************************
> My cov_4 variable looks like: cov_4 2.3164977635316 3.1546584777797
> 4.4646674776444 5.1646466797979
> I want it to look like: cov4 2.316 3.154 4.464 5.164
> I want to do this because I want to use the output file by some other
> software.
> *****************************
>
> morphed into a discussion of the consequences of changing numeric variable
> lengths in SAS data sets when the original posting just wanted to chop off
> some decimal digits and create a file to use in something other than SAS
>
> seems a bit like the game "telephone"
>
> *****************************
> http://genealogy.about.com/b/2008/12/22/remember-the-telephone-game.htm
>
> Remember the Telephone Game?
> Monday December 22, 2008
> Most of you probably played it as a child. You would whisper a short
> sentence into someone's ear,
> and they would then turn and whisper it to the person seated on their
> other side.
> By the time the message had passed through a dozen people it was so
> different from the original
> it had everyone giggling hysterically.
> *****************************
>
> I'm just not sure if we "giggle hysterically" on SAS-L
>
> --
> Mike Zdeb
> U@Albany School of Public Health
> One University Place
> Rensselaer, New York 12144-3456
> P/518-402-6479 F/630-604-1475
>
>> AND it is dangerous! I'd never do it! Even 8 byte is VERY short (too
>> short) in several environments and make some trouble. And note: 8 byte is
>> not much in comparison to all that "length-of-300-byte-character-
>> variables" (only to be sure that no address, telefonnumber, important
>> information might be truncated!).
>> That without any efficiency thoughts: if you write programs with numerics
>> which might be too short one day, you have no advantages. That could be
>> kind of a time bomb! Only think of going to another platform: eg from zOS
>> to UNIX/PC, the behaviour will not be nice! You could get big troble with
>> short numbers!
>> Gerhard
>>
>>
>> On Tue, 24 Mar 2009 23:24:40 +0530, Anindya Mozumdar
>> <anindya.lugbang@GMAIL.COM> wrote:
>>
>>>> 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).
>>>
>>>It's official :) -
>>>
>>>www.sas.com/offices/NA/canada/downloads/presentations/Vancouver_Fall_2005/
>> SAS_Efficiency_considerations.pdf
>>>
>>>Reducing length of numeric variables decreases I/O but increases CPU
>> usage.
>>>
>>>Regards,
>>>Anindya
>>
>>
|