|
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.
|