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 (December 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 20 Dec 2004 05:54:47 -0500
Reply-To:     Holger Bargen <holger.bargen@GAB-BIOTECH.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Holger Bargen <holger.bargen@GAB-BIOTECH.DE>
Subject:      conditional macro start

Dear all, I want to conduct different tests depending on the number of Doses, which are included in the data set. I wrote a program code as you'll find below. The tests are conducted correctly, but the maximum Level seems not to be detected correctly, which could be caused by incorrect definition of the maximum level ("ly") or the ly - value is not correctly available for the if - statement. Maybe I programmed complet nonsense. I am a newby in programming macro codes. Has anyone an idea of how I could solve the problem? Thanks and best regards, Holger

data morty; input Level Dose$ @; do i= 1 to 5; input mortyr @; output; end; drop i; cards; 1 Control 8.7 12.5 9.0 9.5 8.2 2 V1 9.9 8.6 2.8 5.5 11.5 run;

Here is the code of Macro caseA and caseB, conducting different statistically analysis depending if the problem is pairwise or multiple.

%Macro uni; proc univariate data=morty; var Level; output max = ly; run; %mend uni;

%Macro runny; %uni; %if ly > 2 %then %do; %caseA; %end; %else %do; %caseB; %end; %mend runny;

%runny;


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