@sasjs/core 2.56.1 → 2.56.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/mp_hashdataset.sas +7 -2
- package/base/mp_init.sas +3 -3
- package/package.json +1 -1
package/base/mp_hashdataset.sas
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
@param [in] libds dataset to hash
|
|
23
23
|
@param [in] salt= Provide a salt (could be, for instance, the dataset name)
|
|
24
|
+
@param [in] iftrue= A condition under which the macro should be executed.
|
|
24
25
|
@param [out] outds= (work.mf_hashdataset) The output dataset to create. This
|
|
25
26
|
will contain one column (hashkey) with one observation (a hex32.
|
|
26
27
|
representation of the input hash)
|
|
@@ -35,10 +36,14 @@
|
|
|
35
36
|
%macro mp_hashdataset(
|
|
36
37
|
libds,
|
|
37
38
|
outds=,
|
|
38
|
-
salt
|
|
39
|
+
salt=,
|
|
40
|
+
iftrue=%str(1=1)
|
|
39
41
|
)/*/STORE SOURCE*/;
|
|
42
|
+
|
|
43
|
+
%if not(%eval(%unquote(&iftrue))) %then %return;
|
|
44
|
+
|
|
40
45
|
%if %mf_getattrn(&libds,NLOBS)=0 %then %do;
|
|
41
|
-
%put %str(WARN)ING: Dataset &libds is empty
|
|
46
|
+
%put %str(WARN)ING: Dataset &libds is empty, or is not a dataset;
|
|
42
47
|
%end;
|
|
43
48
|
%else %if %mf_getattrn(&libds,NLOBS)<0 %then %do;
|
|
44
49
|
%put %str(ERR)OR: Dataset &libds is not a dataset;
|
package/base/mp_init.sas
CHANGED
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
compress=CHAR /* default is none so ensure we have something! */
|
|
41
41
|
datastmtchk=ALLKEYWORDS /* protection from overwriting input datasets */
|
|
42
42
|
errorcheck=STRICT /* catch errors in libname/filename statements */
|
|
43
|
-
fmterr /* ensure
|
|
44
|
-
mergenoby
|
|
43
|
+
fmterr /* ensure err when a format cannot be found */
|
|
44
|
+
mergenoby=%str(ERR)OR /* Throw err when a merge has no BY variables */
|
|
45
45
|
missing=. /* some sites change this which causes hard to detect errors */
|
|
46
46
|
noquotelenmax /* avoid warnings for long strings */
|
|
47
47
|
noreplace /* avoid overwriting permanent datasets */
|
|
48
48
|
ps=max /* reduce log size slightly */
|
|
49
49
|
validmemname=COMPATIBLE /* avoid special characters etc in table names */
|
|
50
50
|
validvarname=V7 /* avoid special characters etc in variable names */
|
|
51
|
-
varlenchk
|
|
51
|
+
varlenchk=%str(ERR)OR /* fail hard if truncation (data loss) can result */
|
|
52
52
|
;
|
|
53
53
|
|
|
54
54
|
%mend mp_init;
|
package/package.json
CHANGED