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 (November 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: bertolini.1@OSU.EDU
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


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