Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mp_abort.sas File Reference

abort gracefully according to context More...

Go to the source code of this file.

Detailed Description

Configures an abort mechanism according to site specific policies or the particulars of an environment. For instance, can stream custom results back to the client in an STP Web App context, or completely stop in the case of a batch run.

Using SAS Abort Cancel mechanisms can cause hung sessions in some Stored Process environments. This macro takes a unique approach - we set the SAS syscc to 0, run ‘stpsrvset('program error’, 0)` (if SAS 9) and then - we open a macro but don't close it! This provides a graceful abort for SAS web services in all web enabled environments.

Parameters
mac=to contain the name of the calling macro
msg=message to be returned
iftrue=supply a condition under which the macro should be executed.
Version
9.4M3
Author
Allan Bowe

Definition in file mp_abort.sas.