mirror of
https://github.com/sasjs/core.git
synced 2025-12-11 06:24:35 +00:00
feat: adding varinitchk=ERROR to mp_init. Closes #110. Also updated the comments / documentation
This commit is contained in:
@@ -1,15 +1,25 @@
|
||||
/**
|
||||
@file
|
||||
@brief Initialise session with useful settings and variables
|
||||
@details Implements a set of recommended options for general SAS use. This
|
||||
macro is NOT used elsewhere within the core library (other than in tests),
|
||||
but it is used by the SASjs team when building web services for
|
||||
SAS-Powered applications elsewhere.
|
||||
@details 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.
|
||||
|
||||
If you have a good idea for an option, setting, or useful global variable -
|
||||
feel free to [raise an issue](https://github.com/sasjs/core/issues/new)!
|
||||
This macro is recommended to be compiled and invoked in the `initProgram`
|
||||
for SASjs [Jobs](https://cli.sasjs.io/sasjsconfig.html#jobConfig_initProgram
|
||||
), [Services](
|
||||
https://cli.sasjs.io/sasjsconfig.html#serviceConfig_initProgram) and [Tests]
|
||||
(https://cli.sasjs.io/sasjsconfig.html#testConfig_initProgram).
|
||||
|
||||
All global variables are prefixed with "SASJS_" (unless modfied with the
|
||||
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](
|
||||
https://github.com/sasjs/core/issues/new)!
|
||||
|
||||
All global variables are prefixed with "SASJS" (unless modified with the
|
||||
prefix parameter).
|
||||
|
||||
@param [in] prefix= (SASJS) The prefix to apply to the global macro variables
|
||||
@@ -39,15 +49,16 @@
|
||||
autocorrect /* disallow mis-spelled procedure names */
|
||||
compress=CHAR /* default is none so ensure we have something! */
|
||||
datastmtchk=ALLKEYWORDS /* protection from overwriting input datasets */
|
||||
errorcheck=STRICT /* catch errors in libname/filename statements */
|
||||
fmterr /* ensure err when a format cannot be found */
|
||||
mergenoby=%str(ERR)OR /* Throw err when a merge has no BY variables */
|
||||
missing=. /* some sites change this which causes hard to detect errors */
|
||||
errorcheck=STRICT /* catch errs in libname/filename statements */
|
||||
fmterr /* ensure err when a format cannot be found */
|
||||
mergenoby=%str(ERR)OR /* throw err when a merge has no BY variables */
|
||||
missing=. /* changing this can cause hard to detect errs */
|
||||
noquotelenmax /* avoid warnings for long strings */
|
||||
noreplace /* avoid overwriting permanent datasets */
|
||||
ps=max /* reduce log size slightly */
|
||||
validmemname=COMPATIBLE /* avoid special characters etc in table names */
|
||||
validvarname=V7 /* avoid special characters etc in variable names */
|
||||
varinitchk=%str(ERR)OR /* avoid data mistakes from variable name typos */
|
||||
varlenchk=%str(ERR)OR /* fail hard if truncation (data loss) can result */
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user