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 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 17 Dec 1997 15:13:40 -0800
Reply-To:     Erik Scott <escott@SFO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Erik Scott <escott@SFO.COM>
Organization: San Francisco Online (Televolve, Inc.)
Subject:      Re: string concatenation
Content-Type: text/plain; charset=us-ascii

Try this - the trim function removes trailing blanks from a variable - useful in concatenation.

data _NULL_; set test end=eof; retain string; format string $200.; string = trim(left(string)) || trim(vname) ||'/'; put string=; run;

Erik

marieke wrote:

> I was hoping the code returns a concatenated string > name1/name2/name3/ > > what is wrong with the following code? > > thanks > > data test; > input vname $; > cards; > name1 > name2 > name3 > ; > > data _NULL_; > set test end=eof; > retain string ''; > format string $200.; > string = string || FbcName ||'/'; > run;


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