Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_init.sas File Reference

Initialise session with useful settings and variables. More...

Go to the source code of this file.

Detailed Description

Implements a "strict" set of SAS options for use in defensive programming. Highly recommended, if you want your code to run on some other machine.

This macro is recommended to be compiled and invoked in the initProgram for SASjs Jobs, Services and [Tests] (https://cli.sasjs.io/sasjsconfig.html#testConfig_initProgram).

For non SASjs projects, you could invoke in the autoexec, or in your own solution initialisation macro.

If you have a good idea for another useful option, setting, or global variable - feel free to raise an issue!

All the system variables this macro creates use the hard-coded _SASJS_ prefix - the same namespace sasjs/server uses in the pre-program it generates for each session (_SASJS_WEBOUT_HEADERS, _SASJS_TOKENFILE, _SASJS_USERNAME ...).

Setting _SASJS_INIT before this macro runs skips it, which is how an autoexec opts out - a second pass would re-apply the options below.

Version
9.2
Author
Allan Bowe

Definition in file mp_init.sas.