Date: Fri, 22 Nov 2002 18:29:32 +0000
Reply-To: sashole@bellsouth.net
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Paul Dorfman <paul_dorfman@HOTMAIL.COM>
Subject: Re: Parsing a comma delimited column
Content-Type: text/plain; format=flowed
----Original Message Follows----
From: Larry Bertolini <bertolini.1@OSU.EDU>
But looking at these two expressions (and assuming that we have
already specified "length foo $6;"):
foo = substr('1234567890123456', 1) ;
foo = put ('1234567890123456', $6.) ;
It seems that, in both cases, we only want the first 6 characters;
in which case, why not just:
foo = '1234567890123456';
which, on my system, takes only 40% of the CPU as
the "put" function.
Larry,
Absolutely true, but of course in general we would have a string variable as
the first argument to SUBSTR() rather than a character literal. It would
rarely make any sense to use any function to manipulate a literal string
value, except for the REPEAT().
Kind regards,
----------------------
Paul M. Dorfman
Jacksonville, FL
----------------------
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
|