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 (January 2001, 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 Jan 2001 13:49:43 -0600
Reply-To:   Warren Schlechte <wschlech@KTC.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Warren Schlechte <wschlech@KTC.COM>
Subject:   Re: Missing values
Content-Type:   text/plain; charset="iso-8859-1"

This may not be elegant, but it'll work:

Data current; Input age cases; Cards; 1 2 3 2 4 4 10 7 ;

Proc sql; Select max(age) into :max_age /* create macro variable */ From current ;

data new; do age = 1 to &max_age.; /* macro variable */ output; end; run;

proc sort data = current; by age;

proc sort data=new; by age;

data combined; merge new current; by age; cases=max(0,cases); run;

Warren Schlechte Heart of the Hills Research Station HC7 Box 62 Ingram, Texas 78025 Phone: 830.866.3356 Fax: 830.866.3549


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