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 (March 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 10 Mar 2004 07:06:40 -0800
Reply-To:     Vera <vzamniborsch@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Vera <vzamniborsch@HOTMAIL.COM>
Organization: http://groups.google.com
Subject:      help to find the logic
Content-Type: text/plain; charset=ISO-8859-1

I am a student who is trying some SAS. The situation below is not a homework.

I need to find a certain value (provided that it is not the first or consecutive to the first variable)in a series of consecutive variables and then to change it and the rest of the varibales values to something else. I tried array, but I cannot come up with the logic. Could somebody help me, please?

Thank you, Vera.

This is an example, where I need to find "2" that follows "4" (v1=2 and v2=2 are the first ones, so they don't count) and change them and the rest to 100.

data temp; infile cards; input v1-v10; cards; 2 2 4 5 4 2 4 3 2 2 ;

I need to have this: 2 2 4 5 4 100 100 100 100 100


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