@sasjs/core 4.59.4 → 4.59.5

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.
@@ -148,6 +148,6 @@ data _null_;
148
148
  run;
149
149
 
150
150
  /* END */
151
- *%put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) seconds to run;
151
+ /* %put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) secs to run; */
152
152
 
153
153
  %mend mp_replace;
package/package.json CHANGED
@@ -32,5 +32,5 @@
32
32
  "lint": "npx @sasjs/cli lint",
33
33
  "prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
34
34
  },
35
- "version": "4.59.4"
35
+ "version": "4.59.5"
36
36
  }
@@ -33,12 +33,14 @@
33
33
  msg=Cannot enter mfv_existfolder.sas with syscc=&syscc
34
34
  )
35
35
 
36
- %local fref rc;
36
+ %local fref rc var;
37
37
  %let fref=%mf_getuniquefileref();
38
38
 
39
39
  %if %sysfunc(filename(fref,,filesrvc,folderPath="&path"))=0 %then %do;
40
40
  1
41
+ %let var=_FILESRVC_&fref._URI;
41
42
  %let rc=%sysfunc(filename(fref));
43
+ %symdel &var;
42
44
  %end;
43
45
  %else %do;
44
46
  0
@@ -177,6 +177,11 @@ run;
177
177
  ,mac=MV_CREATEFILE
178
178
  ,msg=%str(File &path/&name already exists and force=&force)
179
179
  )
180
+ %mp_abort(
181
+ iftrue=(&syscc ne 0),
182
+ mac=MV_CREATEFILE182
183
+ msg=syscc=&syscc after mfv_getpathuri
184
+ )
180
185
 
181
186
  %if %mf_isblank(&fileuri)=0 and &force=YES %then %do;
182
187
  proc http method="DELETE" url="&base_uri&fileuri" &oauth_bearer;
@@ -246,8 +251,8 @@ data &outds;
246
251
  end;
247
252
  run;
248
253
 
249
- %put &sysmacroname: &name created at %mfv_getpathuri(&path/&name);%put;
250
- %put &base_uri/SASJobExecution?_file=&path/&name;%put;
254
+ %put &sysmacroname: %trim(&base_uri)%mfv_getpathuri(&path/&name);
255
+ %put /SASJobExecution?_file=&path/&name;%put;
251
256
 
252
257
  %if &mdebug=0 %then %do;
253
258
  /* clear refs */
@@ -117,7 +117,7 @@ options noquotelenmax;
117
117
  %if &SYS_PROCHTTP_STATUS_CODE=401 %then %do;
118
118
  /* relates to: https://github.com/sasjs/core/issues/400 */
119
119
  %put 401 thrown in &sysmacroname;
120
- %put sleeping: %sysfunc(sleep(10,1)) - will try once more;
120
+ %put sleeping: %sysfunc(sleep(12,1)) secs - will try again;
121
121
  proc http method='GET' out=&fname1 &oauth_bearer
122
122
  url="&base_uri/folders/folders/@item?path=&newpath";
123
123
  %if &grant_type=authorization_code %then %do;
@@ -181,7 +181,7 @@ options noquotelenmax;
181
181
  'Content-Type'='application/vnd.sas.content.folder+json'
182
182
  'Accept'='application/vnd.sas.content.folder+json';
183
183
  run;
184
- %if &SYS_PROCHTTP_STATUS_CODE ne 200 %then %do;
184
+ %if &SYS_PROCHTTP_STATUS_CODE ne 201 %then %do;
185
185
  %put &=SYS_PROCHTTP_STATUS_CODE &=SYS_PROCHTTP_STATUS_PHRASE;
186
186
  %end;
187
187
  %mp_abort(iftrue=(&SYS_PROCHTTP_STATUS_CODE ne 201)