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 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 16 Jun 2003 10:28:15 -0700
Reply-To:     Carey Smoak <carey.smoak@ROCHE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Carey Smoak <carey.smoak@ROCHE.COM>
Organization: http://groups.google.com/
Subject:      Re: a problem with string concatenation
Content-Type: text/plain; charset=ISO-8859-1

Daniele,

Try adding the "left" statement and doing the concatenation in one step:

c = trim(left(substr(data_rif,4,4))) || trim(left(substr(data_rif,1,2)));

The result should be c = 199802.

-Carey Smoak carey.smoak@roche.com

"Daniele Monzali" <daniele.monzali@prometeia.it> wrote in message news:<WWkHa.26678$Fr5.565725@tornado.fastwebnet.it>... > hello all > i have encountered the following problem: > i submit > > data pippo; > > length c $20.; > > data_rif='02/1998'; > > anno=trim(substr(data_rif,4,4)); > > mese=trim(substr(data_rif,1,2)); > > c=anno||mese; > > run; > > and somehow the concatenation operator gives back > > '1998 02' > > as a result. > > is this evidence correlated with the fact that in the view of the pippo > dataset the field c features sort of an "autowrapping" of text in more than > one line ? > > thanks a lot > > daniele


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