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 (March 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 27 Mar 2008 12:22:08 -0400
Reply-To:     Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject:      Re: Conditional fsedit

On Thu, 27 Mar 2008 10:47:11 -0500, Masuod Pajoh <mpajoh@ODOT.ORG> wrote:

>How can I do an FSEDIT only when the data set has observations? > >Masoud

You can use a macro for that (untested):

%macro ed(ds); %let nobs=0; data _null_; set &ds; call symput("nobs",_n_); stop; run; %if &nobs=0 %then %do; %put no data in &ds; %end; %else %do; proc fsedit data=&ds; run; %end; %mend;

data test; stop; run; %ed(test);

data test; x=1; run; %ed(test);


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