@sasjs/core 4.58.2 → 4.59.1
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/package.json +1 -1
- package/viya/mfv_getfolderpath.sas +53 -0
- package/viya/mv_getjoblog.sas +2 -2
- package/viya/mv_jobflow.sas +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@file
|
|
3
|
+
@brief Returns the path of a folder from the URI
|
|
4
|
+
@details Makes use of the SYSMSG() ER8OR response, which resolves the uri,
|
|
5
|
+
seemingly without entering an er8or state.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
|
|
9
|
+
%mv_createfolder(path=/public/demo)
|
|
10
|
+
%let uri=%mfv_getpathuri(/public/demo);
|
|
11
|
+
%put %mfv_getfolderpath(&uri);
|
|
12
|
+
|
|
13
|
+
Notice above the new path has an uppercase P - the correct path.
|
|
14
|
+
|
|
15
|
+
@param [in] uri The uri of the folder -eg /folders/folders/xxxx)
|
|
16
|
+
|
|
17
|
+
<h4> SAS Macros </h4>
|
|
18
|
+
@li mf_getuniquefileref.sas
|
|
19
|
+
|
|
20
|
+
<h4> Related Macros </h4>
|
|
21
|
+
@li mfv_getpathuri.sas
|
|
22
|
+
|
|
23
|
+
@version 4
|
|
24
|
+
@author [Allan Bowe](https://www.linkedin.com/in/allanbowe/)
|
|
25
|
+
**/
|
|
26
|
+
%macro mfv_getfolderpath(uri
|
|
27
|
+
)/*/STORE SOURCE*/;
|
|
28
|
+
|
|
29
|
+
%local fref rc path msg var /* var used to avoid delete timing issue */;
|
|
30
|
+
%let fref=%mf_getuniquefileref();
|
|
31
|
+
%if %quote(%substr(%str(&uri),1,17)) ne %quote(/folders/folders/)
|
|
32
|
+
%then %do;
|
|
33
|
+
%put &sysmacroname: Invalid URI: &uri;
|
|
34
|
+
%end;
|
|
35
|
+
%else %if %sysfunc(filename(fref,,filesrvc,folderuri="&uri" ))=0
|
|
36
|
+
%then %do;
|
|
37
|
+
%let var=_FILESRVC_&fref._URI;
|
|
38
|
+
%local fid ;
|
|
39
|
+
%let fid= %sysfunc(fopen(&fref,I));
|
|
40
|
+
%let msg=%quote(%sysfunc(sysmsg()));
|
|
41
|
+
|
|
42
|
+
%unquote(%scan(&msg,2,%str(,.)))
|
|
43
|
+
|
|
44
|
+
%let rc=%sysfunc(fclose(&fid));
|
|
45
|
+
%let rc=%sysfunc(filename(fref));
|
|
46
|
+
%symdel &var;
|
|
47
|
+
%end;
|
|
48
|
+
%else %do;
|
|
49
|
+
%put &sysmacroname: Not Found: &uri;
|
|
50
|
+
%let syscc=0;
|
|
51
|
+
%end;
|
|
52
|
+
|
|
53
|
+
%mend mfv_getfolderpath ;
|
package/viya/mv_getjoblog.sas
CHANGED
|
@@ -126,7 +126,7 @@ data _null_;
|
|
|
126
126
|
uri=symget('uri');
|
|
127
127
|
if length(uri)<12 then do;
|
|
128
128
|
call symputx('errflg',1);
|
|
129
|
-
call symputx('errmsg',"URI is
|
|
129
|
+
call symputx('errmsg',"URI is too short - "!!uri,'l');
|
|
130
130
|
end;
|
|
131
131
|
if scan(uri,-1)='state' or scan(uri,1) ne 'jobExecution' then do;
|
|
132
132
|
call symputx('errflg',1);
|
|
@@ -191,7 +191,7 @@ data _null_;
|
|
|
191
191
|
uri=symget('loglocation');
|
|
192
192
|
if length(uri)<12 then do;
|
|
193
193
|
call symputx('errflg',1);
|
|
194
|
-
call symputx('errmsg',"URI is
|
|
194
|
+
call symputx('errmsg',"URI is too short - "!!uri,'l');
|
|
195
195
|
end;
|
|
196
196
|
else if (scan(uri,1,'/') ne 'compute' or scan(uri,2,'/') ne 'sessions')
|
|
197
197
|
and (scan(uri,1,'/') ne 'files' or scan(uri,2,'/') ne 'files')
|
package/viya/mv_jobflow.sas
CHANGED
|
@@ -188,6 +188,8 @@
|
|
|
188
188
|
%if %mf_existvarList(&inds,FLOW_ID)=0 %then %do;
|
|
189
189
|
retain FLOW_ID 0;
|
|
190
190
|
%end;
|
|
191
|
+
/* https://github.com/sasjs/adapter/pull/845#issuecomment-2956589644 */
|
|
192
|
+
retain _omitSessionResults "false";
|
|
191
193
|
set &inds;
|
|
192
194
|
&dbg. putlog (_all_)(=);
|
|
193
195
|
run;
|