BookmarkSubscribeRSS Feed
ThomasH
Calcite | Level 5
Hi all,

I am facing an issue here with the return code passed by a macro %abort. In a specific scenario I would like to return a code of "0" to the system environment, although an %abort was thrown.

However I get the following return codes for the following statements:

%abort -> 3
%abort 0 -> 3
%abort abend 0 -> 5

What do I have to do to get a "0" when using %abort?

Thanks and regards,
Thomas
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
The behavior may vary depending on your OS and the ERRORABEND setting. Also, consider that you have not only a %ABORT statement but also the %RETURN statement to use. And there are optional parameters you can pass to influence the behavior.

A current SAS 9.2. doc link is listed below, but also check the SAS 'companion' for your OS and as well check your SAS version DOC for any behavior differences.


Scott Barry
SBBWorks, Inc.

SAS 9.2 MACRO Language %ABORT Statement
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002475061.htm

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1097 views
  • 0 likes
  • 2 in conversation