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 (June 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 2 Jun 2009 10:34:38 -0700
Reply-To:     "Anderson, James" <James.Anderson@UCSF.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Anderson, James" <James.Anderson@UCSF.EDU>
Subject:      Re: Where Should It Stop?
Comments: To: Chang Chung <chang_y_chung@HOTMAIL.COM>
In-Reply-To:  <200906021715.n52AkfQk010668@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Chang,

The advantage of the variable length string is that it is more flexible -- the variable holds whatever value you put in it. Today it may be 10 characters, tomorrow 20. With variable length strings I write less code, I have to think less and I get my hand slapped less. Most popular languages today use variable length strings.

One recurring problem I have is merging 2 datasets where each is imported from excel. The lengths of the by variables is determined by the maximum lengths in each sheet, often different between sheets. SAS squawks at me. I can either do more work and stop the squawk or ignore the squawk. Big waste of time and focus.

Jim

-----Original Message----- From: Chang Chung [mailto:chang_y_chung@HOTMAIL.COM] Sent: Tuesday, June 02, 2009 10:16 AM To: SAS-L@LISTSERV.UGA.EDU; Anderson, James Subject: Re: Where Should It Stop?

On Tue, 2 Jun 2009 09:23:14 -0700, Anderson, James <James.Anderson@UCSF.EDU> wrote: > Yes!

to this question by Ian: >>> SAS character variables are a fixed length. This fact permeates the >>> entire language. Should SI embark on rewriting the system to use >>> variable length strings? ... @Jim. Why? I have always thought that the main reason for using the variable length string type is because it saves memory. but the storage and memory are getting cheaper. If not this, then what's the reason(s) for using the var len str type? chang


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