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 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 27 Feb 2004 15:52:34 -0500
Reply-To:     Pascale.Beaupre@STATCAN.CA
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Pascale Beaupré <Pascale.Beaupre@STATCAN.CA>
Subject:      RESOLVED : Counter
Content-Type: text/plain; charset="iso-8859-1"

Hi,

Code works fine, there was a simple problem with my data. Thank you for your time and precious advice. Have a great week-end !

Pascale.

-----Message d'origine----- De : Chang Y. Chung [mailto:chang_y_chung@hotmail.com] Envoyé : 27 février, 2004 15:39 À : SAS-L@LISTSERV.UGA.EDU Objet : Re: Counter

On Fri, 27 Feb 2004 15:08:35 -0500, Pascale Beaupré <Pascale.Beaupre@STATCAN.CA> wrote:

>Hi SAS-L > >Trying tio create a counter... where TOT_ADOPT would add up each time >CHDTYPi = "2" . With this code (below), TOT_ADOPT stays at 0. Can >someone please help me out in finding what I am doing wrong/ forgetting >? Thank you ! Have a nice day !! > > >Pascale > > > > >DATA TEMP1; > SET MAIN2; > >ARRAY TYPCHD {15} $1 CHDTYP1 CHDTYP2 CHDTYP3 CHDTYP4 CHDTYP5 CHDTYP6 CHDTYP7 > CHDTYP8 CHDTYP9 CHDTYP10 CHDTYP11 CHDTYP12 CHDTYP13 > CHDTYP14 CHDTYP15; > >RETAIN TOT_ADOPT 0; > >DO i = 1 to 15; > IF TYPCHD (I) IN ("2") THEN TOT_ADOPT + 1; >END; > >RUN;


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