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 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 3 Sep 2004 14:53:17 -0400
Reply-To:   "Treder, David" <dtreder@GENESEEISD.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Treder, David" <dtreder@GENESEEISD.ORG>
Subject:   Re: Macro Question
Content-Type:   text/plain; charset="us-ascii"

The assistance provided on this site is really quite amazing - thanks to you all who provided such thorough/informative responses to my question.

Dave

===================

Date: Thu, 2 Sep 2004 14:18:10 -0400 Reply-To: "Treder, David" <dtreder@GENESEEISD.ORG> Sender: "SAS(r) Discussion" From: "Treder, David" <dtreder@GENESEEISD.ORG> Subject: Macro Question Content-Type: text/plain; charset="us-ascii"

In the code, below, I'm trying to create 50 data "subsets" of the dataset a1 (and have them numbered data1-data50), where the mean of each of the subsets is less than 170 . It seems like I'm close -- everything works fine, but the proc datasets is "activated" every time, not only when the mean (of ss) is less than 170.

Any suggestions would be GREATLY appreciated.

Dave

--------------------------------------------------------

%let k1 = 0;

%let q1 = 0;

%macro q;

%do %until(&k1 > 50);

%let q1 = %eval(&q1 + 1);

data a2; set a1;

i = ranuni(0);

proc sort data=a2; by i;

data b&q1; set a2 (obs=25);

proc means noprint data=b&q1;

var ss; output out=t3 mean=;

data t4; set t3;

%if (ss < 170) %then %do;

%let k1 = %eval(&k1 + 1);

proc datasets nowarn;

change b&q1 = data&k1;

run; quit;

%end;

%end;

%mend;

%q;


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