itzy
itzy

Reputation: 11755

Stop SAS macro execution on error

I am running a macro in SAS that occasionally generates errors like this:

ERROR: Sort execution failure.

The macro continues processing after this error, but I would like to force it to stop further execution. Is there a way to do this?

Upvotes: 1

Views: 1023

Answers (1)

itzy
itzy

Reputation: 11755

Evaluating the automatic macro variable &syserr and conditionally calling %abort looks like it should work.

Upvotes: 2

Related Questions