@sasjs/core 4.15.0 → 4.15.3

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.
@@ -33,7 +33,8 @@
33
33
  %else %if %symexist(&metavar) %then %do;
34
34
  %if %length(&&&metavar)=0 %then %let user=&sysuserid;
35
35
  /* sometimes SAS will add @domain extension - remove for consistency */
36
- %else %let user=%scan(&&&metavar,1,@);
36
+ /* but be sure to quote in case of usernames with commas */
37
+ %else %let user=%unquote(%scan(%quote(&&&metavar),1,@));
37
38
  %end;
38
39
  %else %let user=&sysuserid;
39
40
 
@@ -23,7 +23,7 @@
23
23
  @param [in] salt= Provide a salt (could be, for instance, the dataset name)
24
24
  @param [in] iftrue= A condition under which the macro should be executed.
25
25
  @param [out] outds= (work.mf_hashdataset) The output dataset to create. This
26
- will contain one column (hashkey) with one observation (a hex32.
26
+ will contain one column (hashkey) with one observation (a $hex32.
27
27
  representation of the input hash)
28
28
  |hashkey:$32.|
29
29
  |---|
@@ -40,13 +40,13 @@
40
40
  @li mp_abort.sas
41
41
  @li mp_cntlout.sas
42
42
  @li mp_lockanytable.sas
43
+ @li mp_storediffs.sas
43
44
 
44
45
  <h4> Related Macros </h4>
45
46
  @li mddl_dc_difftable.sas
46
47
  @li mddl_dc_locktable.sas
47
48
  @li mp_loadformat.test.sas
48
49
  @li mp_lockanytable.sas
49
- @li mp_storediffs.sas
50
50
  @li mp_stackdiffs.sas
51
51
 
52
52
 
@@ -272,6 +272,9 @@ options ibufsize=&ibufsize;
272
272
  ,mdebug=&mdebug
273
273
  )
274
274
 
275
+ proc append base=&auditlibds data=&storediffs;
276
+ run;
277
+
275
278
  %if &locklibds ne 0 %then %do;
276
279
  %mp_lockanytable(UNLOCK
277
280
  ,lib=%scan(&auditlibds,1,.)
@@ -295,4 +298,4 @@ options ibufsize=&ibufsize;
295
298
  %put &sysmacroname exit vars:;
296
299
  %put _local_;
297
300
  %end;
298
- %mend mp_loadformat;
301
+ %mend mp_loadformat;
package/base/mp_md5.sas CHANGED
@@ -54,5 +54,5 @@ put(md5(
54
54
  &sep put(md5(trim(put(ifn(missing(&var),&var,&var*1),binary64.))),$hex32.)
55
55
  %let sep=!!;
56
56
  %end;
57
- ),hex32.)
57
+ ),$hex32.)
58
58
  %mend mp_md5;
@@ -70,7 +70,7 @@ filename &inref &infile lrecl=1 recfm=n;
70
70
 
71
71
  data &ds1;
72
72
  infile &inref;
73
- input sourcechar $ 1. @@;
73
+ input sourcechar $char1. @@;
74
74
  format sourcechar hex2.;
75
75
  run;
76
76
 
package/package.json CHANGED
@@ -36,5 +36,5 @@
36
36
  "@sasjs/cli": "3.6.0",
37
37
  "@sasjs/core": "4.4.7"
38
38
  },
39
- "version": "4.15.0"
39
+ "version": "4.15.3"
40
40
  }
@@ -32,7 +32,7 @@
32
32
  ,grant_type=sas_services
33
33
  ,outds=work.viyagroups
34
34
  );
35
- %local oauth_bearer;
35
+ %local oauth_bearer base_uri fname1 libref1;
36
36
  %if &grant_type=detect %then %do;
37
37
  %if %symexist(&access_token_var) %then %let grant_type=authorization_code;
38
38
  %else %let grant_type=sas_services;
@@ -50,11 +50,10 @@
50
50
  )
51
51
 
52
52
  options noquotelenmax;
53
- %local base_uri; /* location of rest apis */
53
+ /* location of rest apis */
54
54
  %let base_uri=%mf_getplatform(VIYARESTAPI);
55
55
 
56
56
  /* fetching folder details for provided path */
57
- %local fname1;
58
57
  %let fname1=%mf_getuniquefileref();
59
58
  %let libref1=%mf_getuniquelibref();
60
59
 
@@ -78,9 +77,8 @@ data &outds;
78
77
  run;
79
78
 
80
79
 
81
-
82
80
  /* clear refs */
83
81
  filename &fname1 clear;
84
82
  libname &libref1 clear;
85
83
 
86
- %mend mv_getgroups;
84
+ %mend mv_getgroups;
@@ -45,7 +45,7 @@
45
45
  );
46
46
  %local dbg bufsize varcnt fname1 fname2 errmsg;
47
47
  %if &mdebug=1 %then %do;
48
- %put &sysmacroname entry vars:;
48
+ %put &sysmacroname local entry vars:;
49
49
  %put _local_;
50
50
  %end;
51
51
  %else %let dbg=*;
@@ -112,14 +112,21 @@ proc http method='GET' out=&fname1 &oauth_bearer
112
112
  %end;
113
113
  ;
114
114
  run;
115
- %if &SYS_PROCHTTP_STATUS_CODE ne 200 and &SYS_PROCHTTP_STATUS_CODE ne 201 %then
116
- %do;
117
- data _null_;infile &fname1;input;putlog _infile_;run;
118
- %mp_abort(mac=&sysmacroname
119
- ,msg=%str(&SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE)
120
- )
115
+
116
+ %if &mdebug=1 %then %do;
117
+ data _null_;
118
+ infile &fname1;
119
+ input;
120
+ putlog _infile_;
121
+ run;
121
122
  %end;
122
123
 
124
+ %mp_abort(
125
+ iftrue=(&SYS_PROCHTTP_STATUS_CODE ne 200 and &SYS_PROCHTTP_STATUS_CODE ne 201)
126
+ ,mac=&sysmacroname
127
+ ,msg=%str(&SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE)
128
+ )
129
+
123
130
  %let fname2=%mf_getuniquefileref();
124
131
  filename &fname2 temp ;
125
132
 
@@ -128,7 +135,7 @@ filename &fname2 temp ;
128
135
  data _null_;
129
136
  file &fname2 recfm=n;
130
137
  infile &fname1 lrecl=1 recfm=n;
131
- input sourcechar $ 1. @@;
138
+ input sourcechar $char1. @@;
132
139
  format sourcechar hex2.;
133
140
  retain startwrite 0;
134
141
  if startwrite=0 and sourcechar='"' then do;