mirror of
https://github.com/sasjs/core.git
synced 2026-01-16 04:50:05 +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
|
@file
|
||||||
@brief Initialise session with useful settings and variables
|
@brief Initialise session with useful settings and variables
|
||||||
@details Implements a set of recommended options for general SAS use. This
|
@details Implements a "strict" set of SAS options for use in defensive
|
||||||
macro is NOT used elsewhere within the core library (other than in tests),
|
programming. Highly recommended, if you want your code to run on some
|
||||||
but it is used by the SASjs team when building web services for
|
other machine.
|
||||||
SAS-Powered applications elsewhere.
|
|
||||||
|
|
||||||
If you have a good idea for an option, setting, or useful global variable -
|
This macro is recommended to be compiled and invoked in the `initProgram`
|
||||||
feel free to [raise an issue](https://github.com/sasjs/core/issues/new)!
|
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).
|
prefix parameter).
|
||||||
|
|
||||||
@param [in] prefix= (SASJS) The prefix to apply to the global macro variables
|
@param [in] prefix= (SASJS) The prefix to apply to the global macro variables
|
||||||
@@ -39,15 +49,16 @@
|
|||||||
autocorrect /* disallow mis-spelled procedure names */
|
autocorrect /* disallow mis-spelled procedure names */
|
||||||
compress=CHAR /* default is none so ensure we have something! */
|
compress=CHAR /* default is none so ensure we have something! */
|
||||||
datastmtchk=ALLKEYWORDS /* protection from overwriting input datasets */
|
datastmtchk=ALLKEYWORDS /* protection from overwriting input datasets */
|
||||||
errorcheck=STRICT /* catch errors in libname/filename statements */
|
errorcheck=STRICT /* catch errs in libname/filename statements */
|
||||||
fmterr /* ensure err when a format cannot be found */
|
fmterr /* ensure err when a format cannot be found */
|
||||||
mergenoby=%str(ERR)OR /* Throw err when a merge has no BY variables */
|
mergenoby=%str(ERR)OR /* throw err when a merge has no BY variables */
|
||||||
missing=. /* some sites change this which causes hard to detect errors */
|
missing=. /* changing this can cause hard to detect errs */
|
||||||
noquotelenmax /* avoid warnings for long strings */
|
noquotelenmax /* avoid warnings for long strings */
|
||||||
noreplace /* avoid overwriting permanent datasets */
|
noreplace /* avoid overwriting permanent datasets */
|
||||||
ps=max /* reduce log size slightly */
|
ps=max /* reduce log size slightly */
|
||||||
validmemname=COMPATIBLE /* avoid special characters etc in table names */
|
validmemname=COMPATIBLE /* avoid special characters etc in table names */
|
||||||
validvarname=V7 /* avoid special characters etc in variable 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 */
|
varlenchk=%str(ERR)OR /* fail hard if truncation (data loss) can result */
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user