I would write a data steps or proc steps that test all macro
parameters, so you can stop before any significant processing has
You can test for existence of variables and data sets with transpose,
plus you can expand SAS Variable Lists.
proc transpose data=&data(obs=0) out=varlist;
%put NOTE: SYSERR=&syserr;
%if &syserr %then %do;
%put %str(ERR)OR: You need to fix...;
%PUT %str(ERR)OR: &sysmacroname ending with errors;
%put NOTE: &sysmacroname ending execution.;
%mymac(var=a b c,data=sashelp.class);
Hours? Perhaps we(SAS-L) need to look at that.
On 3/26/09, joey m <firstname.lastname@example.org> wrote:
> Thanks a lot.
> I'll try to implement that to end my SAS job if rc=0 as soon as my macro
> reads the path...no hours after.
> Have a good day.
> On Thu, Mar 26, 2009 at 10:20 AM, joey m <email@example.com> wrote:
> > Hi:
> > Would you please point out references, etc where I can learn how to stop a
> > SAS routine and get a message (i.e. in a DOS window) when a subdirectory
> > does not exist.
> > Imagine a macro reads a file with parameters, including %let statements
> > defining a path (where a production report is going to be stored). Someone :
> > ) may have made a mistake while keying the path. I would not like to wait
> > until the whole process finishes (i.e. maybe running overnite) and see a
> > message in the log that the directory does not exist...(and neither my
> > file). Thanks in advance for the feedback.
> > Kindest regards,