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 (September 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 Sep 2010 16:04:58 -0700
Reply-To:     Paul Miller <pjmiller_57@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paul Miller <pjmiller_57@YAHOO.COM>
Subject:      Conditional find and replace in a text string
In-Reply-To:  <201009211846.o8LAnPku012795@willow.cc.uga.edu>
Content-Type: text/plain; charset=iso-8859-1

Hello All,   Below is snippet from a design file for a conjoint analysis.   data test; input text $50.; cards; 1 1 8 25 0 0 2 1 1 1 1 2 3 2 3 5 2 3 3 3 1 1 2 4 2 0 ; run;   I'd like to do a find and replace that changes some of the values in lines with length = 15 (lines 4 and 5 in this example) according to the following set of criteria:   position     action 1              do nothing 2              1=3,2=2,3=1 3              1=3,2=2,3=1 4              do nothing 5              1=3,2=2,3=1 6              1=3,2=2,3=1 7              1=3,2=2,3=1 8              do nothing   where position is the location of the number within the text string.   Does anyone now a good way of doing this?   Thanks,   Paul


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