Hello Folks,
not taking into account that the former is a macro statement while the later is a data step statement, I was wondering whether there is any difference in the sense of behaviour/performance between:
%ABORT ABEND;
and
data _NULL_;
abort;
run;
I found in the documentation of the two statements
and
that both times it is stated that
"What happens next depends on
the method that you use to submit your SAS statements
the arguments that you use with %ABORT
your operating environment"
Or can they be used interchangeably?
Cheers,
FK1
I also agree with @s_lassen that they do the same thing.
I've found the most useful form is ABORT CANCEL (or %ABORT CANCEL) which stops the current step and cancels all downstream processing.
I have a little macro called Abort_Pgm that I use when I am in open code but don't want to write a DATA step:
%MACRO Abort_Pgm;
%ABORT CANCEL;
%MEND Abort_Pgm;
I have found that macro useful.
Jim
AFAIK, %ABORT and the ABORT statement in a data step do the same.
So this
data _null_;
abort;
run;
is equivalent to this
%abort;
And this
%abort abend;
does exactly the same as
data _null_;
abort abend;
run;
I also agree with @s_lassen that they do the same thing.
I've found the most useful form is ABORT CANCEL (or %ABORT CANCEL) which stops the current step and cancels all downstream processing.
I have a little macro called Abort_Pgm that I use when I am in open code but don't want to write a DATA step:
%MACRO Abort_Pgm;
%ABORT CANCEL;
%MEND Abort_Pgm;
I have found that macro useful.
Jim
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: