@sasjs/core 4.45.7 → 4.45.9

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.
@@ -81,7 +81,8 @@ run;
81
81
  filename __us2grp temp;
82
82
 
83
83
  proc metadata in= "<UpdateMetadata><Reposid>$METAREPOSITORY</Reposid><Metadata>
84
- <Person Id='&uuri'><IdentityGroups><IdentityGroup ObjRef='&guri' />
84
+ <Person Id='%nrstr(&uuri)'>
85
+ <IdentityGroups><IdentityGroup ObjRef='%nrstr(&guri)' />
85
86
  </IdentityGroups></Person></Metadata>
86
87
  <NS>SAS</NS><Flags>268435456</Flags></UpdateMetadata>"
87
88
  out=__us2grp verbose;
@@ -98,4 +99,4 @@ run;
98
99
 
99
100
  filename __us2grp clear;
100
101
 
101
- %mend mm_adduser2group;
102
+ %mend mm_adduser2group;
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@sasjs/cli": "3.24.0"
37
37
  },
38
- "version": "4.45.7"
38
+ "version": "4.45.9"
39
39
  }
@@ -39,8 +39,9 @@
39
39
 
40
40
  <h4> SAS Macros </h4>
41
41
  @li mf_getuniquefileref.sas
42
- @li mf_getuniquelibref.sas
42
+ @li mf_getuniquename.sas
43
43
  @li mp_abort.sas
44
+ @li mp_chop.sas
44
45
 
45
46
  **/
46
47
 
@@ -153,7 +154,10 @@ run;
153
154
  run;
154
155
  %end;
155
156
 
156
- filename &outref temp lrecl=32767;
157
+ %local resp_path;
158
+ %let resp_path=%sysfunc(pathname(work))/%mf_getuniquename();
159
+ filename &outref "&resp_path" lrecl=32767;
160
+
157
161
  /* prepare request*/
158
162
  proc http method='POST' headerin=&authref in=&mainref out=&outref
159
163
  url="&_sasjs_apiserverurl.&_sasjs_apipath?_program=&pgm%str(&)_debug=131";
@@ -161,6 +165,7 @@ proc http method='POST' headerin=&authref in=&mainref out=&outref
161
165
  debug level=2;
162
166
  %end;
163
167
  run;
168
+
164
169
  %if (&SYS_PROCHTTP_STATUS_CODE ne 200 and &SYS_PROCHTTP_STATUS_CODE ne 201)
165
170
  or &mdebug=1
166
171
  %then %do;
@@ -176,11 +181,22 @@ or &mdebug=1
176
181
  options &optval;
177
182
 
178
183
  %if &outlogds ne _null_ or &mdebug=1 %then %do;
179
- %local dumplib;
180
- %let dumplib=%mf_getuniquelibref();
181
- libname &dumplib json fileref=&outref;
184
+ %local matchstr chopout;
185
+ %let matchstr=SASJS_LOGS_SEPARATOR_163ee17b6ff24f028928972d80a26784;
186
+ %let chopout=%sysfunc(pathname(work))/%mf_getuniquename(prefix=chop);
187
+
188
+ %mp_chop("&resp_path"
189
+ ,matchvar=matchstr
190
+ ,keep=LAST
191
+ ,matchpoint=END
192
+ ,outfile="&chopout"
193
+ ,mdebug=&mdebug
194
+ )
195
+
182
196
  data &outlogds;
183
- set &dumplib..log;
197
+ infile "&chopout" lrecl=2000;
198
+ length line $2000;
199
+ line=_infile_;
184
200
  %if &mdebug=1 %then %do;
185
201
  putlog line=;
186
202
  %end;
@@ -108,47 +108,34 @@ run;
108
108
  )
109
109
 
110
110
 
111
- /* SASjs services have the _webout embedded in wrapper JSON */
112
- /* Files can also be very large - so use a dedicated macro to chop it out */
113
- %local matchstr1 matchstr2 ;
114
- %let matchstr1={"status":"success","_webout":{;
115
- %let matchstr2=},"log":[{;
116
- %let chopout1=%sysfunc(pathname(work))/%mf_getuniquename(prefix=chop1);
117
- %let chopout2=%sysfunc(pathname(work))/%mf_getuniquename(prefix=chop2);
111
+ /* chop out JSON section */
112
+ %local matchstr chopout;
113
+ %let matchstr=SASJS_LOGS_SEPARATOR_163ee17b6ff24f028928972d80a26784;
114
+ %let chopout=%sysfunc(pathname(work))/%mf_getuniquename(prefix=chop);
118
115
 
119
116
  %mp_chop("%sysfunc(pathname(&fref1,F))"
120
- ,matchvar=matchstr1
121
- ,keep=LAST
122
- ,matchpoint=END
123
- ,offset=-1
124
- ,outfile="&chopout1"
125
- ,mdebug=&mdebug
126
- )
127
-
128
- %mp_chop("&chopout1"
129
- ,matchvar=matchstr2
117
+ ,matchvar=matchstr
130
118
  ,keep=FIRST
131
119
  ,matchpoint=START
132
- ,offset=1
133
- ,outfile="&chopout2"
120
+ ,offset=-1
121
+ ,outfile="&chopout"
134
122
  ,mdebug=&mdebug
135
123
  )
136
124
 
137
125
  %if &outlib ne 0 %then %do;
138
- libname &outlib json "&chopout2";
126
+ libname &outlib json "&chopout";
139
127
  %end;
140
128
  %if &outref ne 0 %then %do;
141
- filename &outref "&chopout2";
129
+ filename &outref "&chopout";
142
130
  %end;
143
131
 
144
132
  %if &mdebug=0 %then %do;
145
133
  filename &webref clear;
146
134
  filename &fref1 clear;
147
- filename &fref2 clear;
148
135
  %end;
149
136
  %else %do;
150
137
  %put &sysmacroname exit vars:;
151
138
  %put _local_;
152
139
  %end;
153
140
 
154
- %mend ms_testservice;
141
+ %mend ms_testservice;