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 (December 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 10 Dec 2001 15:13:21 -0500
Reply-To:   "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM>
Subject:   Re: upper(trim(left(myvar)))
Comments:   To: "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Content-Type:   text/plain; charset=iso-8859-1

Venky,

That is exactly what I meant. Additionally, the same can be achieved as

call poke (add, addr(tosubstr)+length(tosubstr), 4) ;

Thus in a DATA step, a concatenation can always be coded in an alternative manner (it may be necessary to declare an extra variable in a LENGTH statement). Outside the DATA step, there are cases where a concatenation could hardly be replaced in a non-contrived way, in particular, when SQL is used to create concatenated lists, and where the concatenation is needed as a volatile expression only.

Kind regards, ====================== Paul M. Dorfman Jacksonville, FL ======================

> -----Original Message----- > From: Chakravarthy, Venky [mailto:Venky.Chakravarthy@PFIZER.COM] > Sent: Monday, December 10, 2001 3:05 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: upper(trim(left(myvar))) > > > Kevin, > > Maybe, just maybe, he meant such usage as below. To the best > of my knowledge > the SUBSTR is the only function that can be used on the left > hand side of an > equation: > > 530 data _null ; > 531 length tosubstr $8 ; > 532 tosubstr = "abcd" ; > 533 put "Before the SUBSTR " tosubstr = ; > 534 add = "efgh" ; > 535 substr(tosubstr,length(tosubstr)+1) = add ; > 536 put "After the SUBSTR " tosubstr = ; > 537 run ; > > Before the SUBSTR TOSUBSTR=abcd > After the SUBSTR TOSUBSTR=abcdefgh > > Hopefully, Paul will chime in soon. He may be thinking in his > inimitable way > to come up with something different. > > Kind Regards, > > Venky > #****************************************# > # E-mail: venky.chakravarthy@pfizer.com # > # swovcc@hotmail.com # > # Phone: (734) 622-1963 # > #****************************************# > > > -----Original Message----- > From: kviel [mailto:kviel@GMCF.ORG] > Sent: Monday, December 10, 2001 2:39 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: upper(trim(left(myvar))) > > > Paul, > > I apologize but could you explain: > > >To that end, the concatenation operator is redundant to begin with, > >since it can always replaced by Substr(). > > Thank you, > > Kevin > > > > Kevin Viel > Georgia Medical Care Foundation > 57 Executive Park South, NE > suite 200 > Atlanta, GA 30329-2224 > >

Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.


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