@sasjs/core 6.1.2 → 6.1.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.
- package/.sasjslint +11 -4
- package/base/mf_existds.sas +1 -2
- package/base/mf_existfeature.sas +1 -0
- package/base/mf_existfunction.sas +1 -0
- package/base/mf_getattrc.sas +1 -0
- package/base/mf_getattrn.sas +1 -0
- package/base/mf_getengine.sas +1 -2
- package/base/mf_getschema.sas +1 -2
- package/base/mf_mimetype.sas +1 -0
- package/base/mf_verifymacvars.sas +3 -4
- package/base/mf_wordsinstr1andstr2.sas +1 -2
- package/base/mp_applyformats.sas +2 -4
- package/base/mp_derivedvarcheck.sas +200 -0
- package/base/mp_derivedvars.sas +113 -62
- package/base/mp_dictionary.sas +1 -0
- package/base/mp_dirlist.sas +2 -4
- package/base/mp_ds2ddl.sas +2 -0
- package/base/mp_dsmeta.sas +1 -0
- package/base/mp_filtercheck.sas +1 -0
- package/base/mp_filtergenerate.sas +1 -0
- package/base/mp_filterstore.sas +1 -0
- package/base/mp_filtervalidate.sas +1 -3
- package/base/mp_getcols.sas +1 -0
- package/base/mp_getconstraints.sas +1 -0
- package/base/mp_getformats.sas +1 -0
- package/base/mp_getpk.sas +1 -0
- package/base/mp_gitlog.sas +1 -0
- package/base/mp_gitstatus.sas +1 -0
- package/base/mp_guesspk.sas +1 -0
- package/base/mp_include.sas +1 -0
- package/base/mp_lib2cards.sas +1 -0
- package/base/mp_resetoption.sas +1 -0
- package/base/mp_stackdiffs.sas +1 -0
- package/base/mp_tree.sas +1 -0
- package/base/mp_unzip.sas +1 -0
- package/base/mp_wait4file.sas +1 -0
- package/fcmp/mcf_string2file.sas +1 -3
- package/lua/ml_json.sas +1 -0
- package/meta/mm_adduser2group.sas +1 -0
- package/meta/mm_createapplication.sas +1 -4
- package/meta/mm_createdataset.sas +1 -0
- package/meta/mm_createfolder.sas +1 -0
- package/meta/mm_createwebservice.sas +1 -0
- package/meta/mm_getauthinfo.sas +1 -0
- package/meta/mm_getlibmetadiffs.sas +1 -0
- package/meta/mm_getlibs.sas +1 -3
- package/meta/mm_getobjects.sas +1 -3
- package/meta/mm_getpublictypes.sas +1 -0
- package/meta/mm_getrepos.sas +1 -3
- package/meta/mm_getroles.sas +1 -2
- package/meta/mm_getservercontexts.sas +1 -2
- package/meta/mm_getstpinfo.sas +1 -0
- package/meta/mm_gettypes.sas +1 -3
- package/meta/mm_getwebappsrvprops.sas +1 -2
- package/metax/mmx_deletemetafolder.sas +1 -0
- package/package.json +1 -1
- package/server/ms_createwebservice.sas +1 -0
- package/server/ms_triggerstp.sas +1 -0
- package/viya/mv_createjob.sas +1 -0
- package/viya/mv_createwebservice.sas +1 -0
- package/viya/mv_deletefoldermember.sas +1 -0
- package/viya/mv_deletejes.sas +1 -0
- package/viya/mv_getclients.sas +1 -0
- package/viya/mv_getfoldermembers.sas +1 -0
- package/viya/mv_getjoblog.sas +4 -7
- package/viya/mv_getjobstate.sas +1 -0
- package/viya/mv_jobflow.sas +1 -0
- package/viya/mv_jobwaitfor.sas +2 -3
- package/viya/mv_registerclient.sas +1 -0
- package/xplatform/mx_execute.sas +1 -0
package/base/mp_dsmeta.sas
CHANGED
package/base/mp_filtercheck.sas
CHANGED
package/base/mp_filterstore.sas
CHANGED
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
|
|
26
26
|
%mp_filtervalidate(myfilter,sashelp.class)
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
@returns The SYSCC value will be 1008 if there are validation issues.
|
|
30
29
|
|
|
31
30
|
@param [in] inref The input fileref to validate (generated by
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
@param [in] targetds The target dataset against which to verify the query
|
|
34
33
|
@param [out] abort= (YES) If YES will call mp_abort.sas on any exceptions
|
|
35
34
|
@param [out] outds= (work.mp_filtervalidate) Output dataset containing the
|
|
36
|
-
|
|
35
|
+
diagnostic message, if one exists. If this table contains any rows,
|
|
37
36
|
there are problems!
|
|
38
37
|
|
|
39
38
|
<h4> SAS Macros </h4>
|
|
@@ -48,7 +47,6 @@
|
|
|
48
47
|
@version 9.3
|
|
49
48
|
@author Allan Bowe
|
|
50
49
|
|
|
51
|
-
@sasjslint {"noBannedStrings": false}
|
|
52
50
|
**/
|
|
53
51
|
|
|
54
52
|
%macro mp_filtervalidate(inref,targetds,abort=YES,outds=work.mp_filtervalidate);
|
package/base/mp_getcols.sas
CHANGED
package/base/mp_getformats.sas
CHANGED
package/base/mp_getpk.sas
CHANGED
package/base/mp_gitlog.sas
CHANGED
|
@@ -49,6 +49,7 @@ https://documentation.sas.com/doc/ko/pgmsascdc/v_033/lefunctionsref/n1qo5miyvry1
|
|
|
49
49
|
@li mp_gitreleaseinfo.sas
|
|
50
50
|
@li mp_gitstatus.sas
|
|
51
51
|
|
|
52
|
+
@sasjslint {"maxLineLength": 100}
|
|
52
53
|
**/
|
|
53
54
|
|
|
54
55
|
%macro mp_gitlog(gitdir,outds=work.mp_gitlog,mdebug=0,filter=BRANCHONLY,nobs=0);
|
package/base/mp_gitstatus.sas
CHANGED
package/base/mp_guesspk.sas
CHANGED
package/base/mp_include.sas
CHANGED
package/base/mp_lib2cards.sas
CHANGED
package/base/mp_resetoption.sas
CHANGED
package/base/mp_stackdiffs.sas
CHANGED
package/base/mp_tree.sas
CHANGED
package/base/mp_unzip.sas
CHANGED
package/base/mp_wait4file.sas
CHANGED
package/fcmp/mcf_string2file.sas
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| string $ | string to add to the file |
|
|
13
13
|
| mode $ | mode of the output - either APPEND (default) or CREATE |
|
|
14
14
|
|
|
15
|
-
It returns 0 if successful, or -1 if
|
|
15
|
+
It returns 0 if successful, or -1 if it fails.
|
|
16
16
|
|
|
17
17
|
Usage:
|
|
18
18
|
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
@li mcf_stpsrv_header.test.sas
|
|
45
45
|
@li mp_init.sas
|
|
46
46
|
|
|
47
|
-
@sasjslint {"noBannedStrings": false}
|
|
48
47
|
**/
|
|
49
48
|
|
|
50
49
|
%macro mcf_string2file(wrap=YES
|
|
@@ -74,7 +73,6 @@ function mcf_string2file(filepath $, string $, mode $);
|
|
|
74
73
|
return(0);
|
|
75
74
|
endsub;
|
|
76
75
|
|
|
77
|
-
|
|
78
76
|
%if &wrap=YES %then %do;
|
|
79
77
|
quit;
|
|
80
78
|
%end;
|
package/lua/ml_json.sas
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
,params= name1=value1
name2=value2
emptyvalue=
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
@
|
|
16
|
+
@note application components do not get deleted when removing the container
|
|
17
17
|
folder! be sure you have the administrative priviliges to remove this kind of
|
|
18
18
|
metadata from the SMC plugin (or be ready to do to so programmatically).
|
|
19
19
|
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
|
|
43
43
|
@author Allan Bowe
|
|
44
44
|
|
|
45
|
-
@sasjslint {"noBannedStrings": false}
|
|
46
45
|
**/
|
|
47
46
|
|
|
48
47
|
%macro mm_createapplication(
|
|
@@ -101,7 +100,6 @@ run;
|
|
|
101
100
|
,msg=Application &name already exists in &tree!
|
|
102
101
|
)
|
|
103
102
|
|
|
104
|
-
|
|
105
103
|
/**
|
|
106
104
|
* Now we can create the application
|
|
107
105
|
*/
|
|
@@ -158,5 +156,4 @@ run;
|
|
|
158
156
|
%end;
|
|
159
157
|
%else %put NOTE: Application (&name) successfully created in (&tree)!;
|
|
160
158
|
|
|
161
|
-
|
|
162
159
|
%mend mm_createapplication;
|
package/meta/mm_createfolder.sas
CHANGED
package/meta/mm_getauthinfo.sas
CHANGED
package/meta/mm_getlibs.sas
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- LibraryRef
|
|
15
15
|
- Engine
|
|
16
16
|
|
|
17
|
-
@
|
|
17
|
+
@note The following filenames are created and then de-assigned:
|
|
18
18
|
|
|
19
19
|
filename sxlemap clear;
|
|
20
20
|
filename response clear;
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
@version 9.2
|
|
24
24
|
@author Allan Bowe
|
|
25
25
|
|
|
26
|
-
@sasjslint {"noBannedStrings": false}
|
|
27
26
|
**/
|
|
28
27
|
|
|
29
28
|
%macro mm_getlibs(
|
|
@@ -89,7 +88,6 @@ proc sort data=_XML_.saslibrary out=&outds;
|
|
|
89
88
|
by libraryname;
|
|
90
89
|
run;
|
|
91
90
|
|
|
92
|
-
|
|
93
91
|
/* clear references */
|
|
94
92
|
filename sxlemap clear;
|
|
95
93
|
filename response clear;
|
package/meta/mm_getobjects.sas
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
@returns outds dataset containing all objects
|
|
9
9
|
|
|
10
|
-
@
|
|
10
|
+
@note The following filenames are created and then de-assigned:
|
|
11
11
|
|
|
12
12
|
filename sxlemap clear;
|
|
13
13
|
filename response clear;
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
@version 9.2
|
|
17
17
|
@author Allan Bowe
|
|
18
18
|
|
|
19
|
-
@sasjslint {"noBannedStrings": false}
|
|
20
19
|
**/
|
|
21
20
|
|
|
22
21
|
%macro mm_getobjects(
|
|
@@ -24,7 +23,6 @@
|
|
|
24
23
|
,outds=work.mm_getobjects
|
|
25
24
|
)/*/STORE SOURCE*/;
|
|
26
25
|
|
|
27
|
-
|
|
28
26
|
* use a temporary fileref to hold the response;
|
|
29
27
|
filename response temp;
|
|
30
28
|
/* get list of libraries */
|
package/meta/mm_getrepos.sas
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
@returns outds dataset containing all repositories
|
|
9
9
|
|
|
10
|
-
@
|
|
10
|
+
@note The following filenames are created and then de-assigned:
|
|
11
11
|
|
|
12
12
|
filename sxlemap clear;
|
|
13
13
|
filename response clear;
|
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
@version 9.2
|
|
17
17
|
@author Allan Bowe
|
|
18
18
|
|
|
19
|
-
@sasjslint {"noBannedStrings": false}
|
|
20
19
|
**/
|
|
21
20
|
|
|
22
21
|
%macro mm_getrepos(
|
|
23
22
|
outds=work.mm_getrepos
|
|
24
23
|
)/*/STORE SOURCE*/;
|
|
25
24
|
|
|
26
|
-
|
|
27
25
|
* use a temporary fileref to hold the response;
|
|
28
26
|
filename response temp;
|
|
29
27
|
/* get list of libraries */
|
package/meta/mm_getroles.sas
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- uri
|
|
15
15
|
- name
|
|
16
16
|
|
|
17
|
-
@
|
|
17
|
+
@note The following filenames are created and then de-assigned:
|
|
18
18
|
|
|
19
19
|
filename sxlemap clear;
|
|
20
20
|
filename response clear;
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
@version 9.3
|
|
24
24
|
@author Allan Bowe
|
|
25
25
|
|
|
26
|
-
@sasjslint {"noBannedStrings": false}
|
|
27
26
|
**/
|
|
28
27
|
|
|
29
28
|
%macro mm_getroles(
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
@param [out] outds= (work.mm_getrepos)
|
|
10
10
|
the dataset to create that contains the list
|
|
11
11
|
|
|
12
|
-
@
|
|
12
|
+
@note The following filenames are created and then de-assigned:
|
|
13
13
|
|
|
14
14
|
filename __mc1 clear;
|
|
15
15
|
filename __mc2 clear;
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
@version 9.3
|
|
22
22
|
@author Allan Bowe
|
|
23
23
|
|
|
24
|
-
@sasjslint {"noBannedStrings": false}
|
|
25
24
|
**/
|
|
26
25
|
|
|
27
26
|
%macro mm_getservercontexts(
|
package/meta/mm_getstpinfo.sas
CHANGED
package/meta/mm_gettypes.sas
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@param [in] outds= (work.mm_gettypes)
|
|
9
9
|
The dataset to create that contains the list of types
|
|
10
10
|
@returns outds dataset containing all types
|
|
11
|
-
@
|
|
11
|
+
@note The following filenames are created and then de-assigned:
|
|
12
12
|
|
|
13
13
|
filename sxlemap clear;
|
|
14
14
|
filename response clear;
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
@version 9.2
|
|
18
18
|
@author Allan Bowe
|
|
19
19
|
|
|
20
|
-
@sasjslint {"noBannedStrings": false}
|
|
21
20
|
**/
|
|
22
21
|
|
|
23
22
|
%macro mm_gettypes(
|
|
@@ -68,7 +67,6 @@ proc sort data=_XML_.sastypes out=&outds;
|
|
|
68
67
|
by id;
|
|
69
68
|
run;
|
|
70
69
|
|
|
71
|
-
|
|
72
70
|
/* clear references */
|
|
73
71
|
filename sxlemap clear;
|
|
74
72
|
filename response clear;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
@returns outds dataset containing all properties
|
|
16
16
|
|
|
17
|
-
@
|
|
17
|
+
@note The following filenames are created and then de-assigned:
|
|
18
18
|
|
|
19
19
|
filename __in clear;
|
|
20
20
|
filename __out clear;
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
@version 9.4
|
|
24
24
|
@author Allan Bowe https://github.com/sasjs/core
|
|
25
25
|
|
|
26
|
-
@sasjslint {"noBannedStrings": false}
|
|
27
26
|
**/
|
|
28
27
|
|
|
29
28
|
%macro mm_getwebappsrvprops(
|
package/package.json
CHANGED
package/server/ms_triggerstp.sas
CHANGED
package/viya/mv_createjob.sas
CHANGED
package/viya/mv_deletejes.sas
CHANGED
package/viya/mv_getclients.sas
CHANGED
package/viya/mv_getjoblog.sas
CHANGED
|
@@ -78,7 +78,6 @@
|
|
|
78
78
|
@param [out] outref= The output fileref to which to APPEND the log (is always
|
|
79
79
|
appended).
|
|
80
80
|
|
|
81
|
-
|
|
82
81
|
@version VIYA V.03.04
|
|
83
82
|
@author Allan Bowe, source: https://github.com/sasjs/core
|
|
84
83
|
|
|
@@ -90,7 +89,7 @@
|
|
|
90
89
|
@li mf_getuniquefileref.sas
|
|
91
90
|
@li mf_getuniquelibref.sas
|
|
92
91
|
|
|
93
|
-
@sasjslint {"
|
|
92
|
+
@sasjslint {"maxLineLength": 118}
|
|
94
93
|
**/
|
|
95
94
|
|
|
96
95
|
%macro mv_getjoblog(uri=0,outref=0
|
|
@@ -199,7 +198,7 @@ run;
|
|
|
199
198
|
/* A real loglocation is always a /files/files/<uuid> URI (48+ chars), so
|
|
200
199
|
length<2 unambiguously means the job has no log (empty or SAS missing
|
|
201
200
|
value) - the job likely failed before a compute session was created
|
|
202
|
-
(e.g. 403 on session creation). Read the
|
|
201
|
+
(e.g. 403 on session creation). Read the failure details from the job
|
|
203
202
|
response so the actual failure reason is reported instead of the
|
|
204
203
|
opaque "URI is too short" message. */
|
|
205
204
|
%if &mdebug=1 %then %do;
|
|
@@ -213,7 +212,7 @@ run;
|
|
|
213
212
|
set &libref1..error;
|
|
214
213
|
call symputx('err_httpcode',httpStatusCode,'l');
|
|
215
214
|
call symputx('err_msg',message,'l');
|
|
216
|
-
putlog "&sysmacroname: Job &jobstate -
|
|
215
|
+
putlog "&sysmacroname: Job &jobstate - unexpected response " httpStatusCode ": " message;
|
|
217
216
|
stop;
|
|
218
217
|
run;
|
|
219
218
|
%end;
|
|
@@ -222,7 +221,7 @@ run;
|
|
|
222
221
|
or has zero observations). Include the job URI so the full JSON
|
|
223
222
|
response can be fetched directly via a GET to &base_uri&uri. */
|
|
224
223
|
%let abortmsg=Job &jobstate, no log available. GET &uri;
|
|
225
|
-
%if %length(&err_msg)>0 %then %let abortmsg=Job &jobstate, no log available.
|
|
224
|
+
%if %length(&err_msg)>0 %then %let abortmsg=Job &jobstate, no log available. HTTP &err_httpcode: &err_msg. GET &uri;
|
|
226
225
|
/* A canceled job does not always provide a loglocation (eg a job
|
|
227
226
|
that was aborted by design, or canceled by the server before a
|
|
228
227
|
compute session was created). Aborting here would terminate the
|
|
@@ -344,5 +343,3 @@ run;
|
|
|
344
343
|
%end;
|
|
345
344
|
%mend mv_getjoblog;
|
|
346
345
|
|
|
347
|
-
|
|
348
|
-
|
package/viya/mv_getjobstate.sas
CHANGED
package/viya/mv_jobflow.sas
CHANGED
package/viya/mv_jobwaitfor.sas
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
| completed | no | Job finished - does not mean it was successful. Check stateDetails|
|
|
15
15
|
| failed | no | Job failed to execute, could be a problem when calling the apis|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
## Example
|
|
19
18
|
|
|
20
19
|
First, compile the macros:
|
|
@@ -102,7 +101,7 @@
|
|
|
102
101
|
@li mf_nobs.sas
|
|
103
102
|
@li mv_getjoblog.sas
|
|
104
103
|
|
|
105
|
-
@sasjslint {"
|
|
104
|
+
@sasjslint {"maxLineLength": 109}
|
|
106
105
|
**/
|
|
107
106
|
|
|
108
107
|
%macro mv_jobwaitfor(action
|
|
@@ -167,7 +166,7 @@ data _null_;
|
|
|
167
166
|
job uri (whose root object carries the state field), and
|
|
168
167
|
downstream consumers (mv_getjoblog, the outds) expect the plain
|
|
169
168
|
job uri. Do not truncate: job uris are not a fixed length (a
|
|
170
|
-
definition uri passed in
|
|
169
|
+
definition uri passed in by mistake must fail loudly, not be silently
|
|
171
170
|
corrupted into a 404). */
|
|
172
171
|
if length(strip(uri))>6 and substr(strip(uri),length(strip(uri))-5)='/state'
|
|
173
172
|
then uri=substr(strip(uri),1,length(strip(uri))-6);
|