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 (April 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 24 Apr 2003 18:42:10 +0000
Reply-To:   Hoff Stuart <hhstuart@RCN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Hoff Stuart <hhstuart@RCN.COM>
Subject:   Re: appending to a string
Content-Type:   text/plain; charset=us-ascii

Sam wrote:

> Hi, > > Is there any way i can append to the string? > > action = ' '; > if actionf = 1 then action = 'nondrug '; > if actionf = 2 then action = 'drug'; > if actionf = 3 then action = 'none'; > > By doing this way , its going to replace action with other variable > .I want to append to the string action like , ACTIONF might be equal > to 1 and 2 then ACTION must be nondrug and drug. If there is any way > to append the string please let me know.Any other method is also > fine.I really appreciate ur answers. > > Thank you

It's not really clear what you are trying to do. Actionf can only have one value so you will only get one value for action. If you want to append characters use double vertical bars -- something like (untested):

Data _null_; length allaction $ 16; actiona = 'drug'; actionb = 'none'; allaction = actiona||actionb; run;


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