LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 6 Feb 2009 16:29:10 -0600
Reply-To:     Duck-Hye Yang <dyang@CHAPINHALL.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Duck-Hye Yang <dyang@CHAPINHALL.ORG>
Subject:      Programming help: trigger and increase by 1 within a person
Content-Type: text/plain; charset=US-ASCII

Hello,

I wanted to created a new variable. In the following data, if type='DC' the new_variable should increase by 1. In the beginning, the variable starts with 1. Each time DC is encountered, the new_variable needs to increase. If a new person comes in, the process starts all over.

I hope that someone out there will think that this is easy to do!

Thanks, Duckhye

---------------------------------------- person type new_variable A KC 1 A DC 2 A KC 2 A BC 2 A KC 2 A DC 3 A KC 3 A BC 3 B B B


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