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 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 19 Sep 2007 17:22:34 -0400
Reply-To:   Kevin Roland Viel <kviel@EMORY.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Kevin Roland Viel <kviel@EMORY.EDU>
Subject:   Re: Programatically signal the executor to 'Break'
In-Reply-To:   <16FD64291482A34F995D2AF14A5C932C015A786A@MAIL002.prod.ds.russell.com>
Content-Type:   TEXT/PLAIN; charset=US-ASCII

On Wed, 19 Sep 2007, Terjeson, Mark wrote:

> Ah, yes. > > Well, this ain't exactly pretty but > have used this in the past for datasteps. > You'll have to take other measures for > procs and other open code. Also you would > have to take measures for the dataset > created by the STOPped datastep. i.e. > remove it or not, etc. > > > data one; > run; > > data two; > condition=1; > if condition then > do; > call symput('MYSTATE',' cancel '); > stop; > end; > run; > > data three; > run &mystate; > > data four; > run &mystate;

What? Yes, RUN CANCEL is a good construct, but why not just use a macro wrapper, if you are using a macro variable at all and an appropriate (global) command like ENDSAS is not available.

%macro continue_it ;

%if &MYSTATE. ne CANCEL %then %do ;

data three ; run ;

data four ; run ;

%end ;

%mend continue_it ;

%continute_it

Of course, I would prefer a parameter list, but Richard is quite competent to improve the design.

HTH,

Kevin

Kevin Viel, PhD Post-doctoral fellow Department of Genetics Southwest Foundation for Biomedical Research San Antonio, TX 78227


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