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 (August 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 24 Aug 2008 18:20:07 -0700
Reply-To:   Patrick <patrick.matter@GMX.CH>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Patrick <patrick.matter@GMX.CH>
Subject:   Re: Conditional Reporting (one for data and Other Empty data set
Comments:   To:
Content-Type:   text/plain; charset=ISO-8859-1

Hi SAS_learner You could do something like in the code below. Even if there should be a possibility I don't think you should try to pack everything into a single PROC REPORT without any macro coding because: The syntax would become quite complicated and a little change in the requirements could mean a huge change for coding. HTH Patrick

data have; msg='No Data to Report'; do vara=1 to 10; varb=ranuni(0); output; end; run;

%macro report(ds=,clause=); %local report; %let report=0;

data report; set have; if &clause; call symput('report','1'); stop; run;

proc print data=have; %if &report=1 %then %do; where &clause; var vara varb; %end; %else %do; where vara=1; var msg; %end; run;


title1 'clause=vara>5'; %report(ds=have,clause=vara>5)

title1 'clause=vara>15'; %report(ds=have,clause=vara>15)

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