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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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