@sasjs/core 4.27.1 → 4.27.4
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/base/mp_abort.sas
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
@file
|
|
3
|
-
@brief Create
|
|
2
|
+
@file
|
|
3
|
+
@brief Create an empty dataset from a metadata definition
|
|
4
4
|
@details This macro was built to support viewing empty tables in
|
|
5
|
-
|
|
6
|
-
contacting the author (Allan Bowe).
|
|
5
|
+
https://datacontroller.io
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
The table can be retrieved using LIBRARY.DATASET reference, or directly
|
|
8
|
+
using the metadata URI.
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
The dataset is written to the WORK library.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
Usage:
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
%mm_createdataset(libds=metlib.some_dataset)
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
or
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
%mm_createdataset(tableuri=G5X8AFW1.BE00015Y)
|
|
20
19
|
|
|
21
20
|
<h4> SAS Macros </h4>
|
|
22
21
|
@li mm_getlibs.sas
|
|
@@ -26,9 +25,9 @@
|
|
|
26
25
|
@param libds= library.dataset metadata source. Note - table names in metadata
|
|
27
26
|
can be longer than 32 chars (just fyi, not an issue here)
|
|
28
27
|
@param tableuri= Metadata URI of the table to be created
|
|
29
|
-
@param outds= The dataset to create
|
|
30
|
-
|
|
31
|
-
@param mdebug=
|
|
28
|
+
@param outds= (work.mm_createdataset) The dataset to create. The table name
|
|
29
|
+
needs to be 32 chars or less as per SAS naming rules.
|
|
30
|
+
@param mdebug= (0) Set to 1 to enable DEBUG messages
|
|
32
31
|
|
|
33
32
|
@version 9.4
|
|
34
33
|
@author Allan Bowe
|
|
@@ -54,14 +53,23 @@
|
|
|
54
53
|
%mm_gettables(uri=&liburi,outds=&tempds2)
|
|
55
54
|
data _null_;
|
|
56
55
|
set &tempds2;
|
|
57
|
-
|
|
56
|
+
where upcase(tablename)="%upcase(%scan(&libds,2,.))";
|
|
57
|
+
&dbg putlog tableuri=;
|
|
58
58
|
call symputx('tableuri',tableuri);
|
|
59
59
|
run;
|
|
60
60
|
%end;
|
|
61
61
|
|
|
62
|
-
data;run
|
|
62
|
+
data;run;
|
|
63
|
+
%let tempds3=&syslast;
|
|
63
64
|
%mm_getcols(tableuri=&tableuri,outds=&tempds3)
|
|
64
65
|
|
|
66
|
+
%if %mf_nobs(&tempds3)=0 %then %do;
|
|
67
|
+
%put &libds (&tableuri) has no columns defined!!;
|
|
68
|
+
data &outds;
|
|
69
|
+
run;
|
|
70
|
+
%return;
|
|
71
|
+
%end;
|
|
72
|
+
|
|
65
73
|
data _null_;
|
|
66
74
|
set &tempds3 end=last;
|
|
67
75
|
if _n_=1 then call execute('data &outds;');
|
package/package.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
@file mx_createwebservice.sas
|
|
3
3
|
@brief Create a web service in SAS 9, Viya or SASjs
|
|
4
4
|
@details Creates a SASJS ready Stored Process in SAS 9, a Job Execution
|
|
5
|
-
Service in SAS Viya,
|
|
5
|
+
Service in SAS Viya, or a Stored Program on SASjs Server - depending on the
|
|
6
|
+
executing environment.
|
|
6
7
|
|
|
7
8
|
Usage:
|
|
8
9
|
|
|
@@ -24,7 +25,9 @@ Usage:
|
|
|
24
25
|
%webout(OBJ,example2) * Object format, easier to work with ;
|
|
25
26
|
%webout(CLOSE)
|
|
26
27
|
;;;;
|
|
27
|
-
|
|
28
|
+
|
|
29
|
+
%* create the service (including webout macro and dependencies);
|
|
30
|
+
%mx_createwebservice(path=/Public/app/common,name=appInit,replace=YES)
|
|
28
31
|
|
|
29
32
|
<h4> SAS Macros </h4>
|
|
30
33
|
@li mf_getplatform.sas
|
|
@@ -43,7 +46,6 @@ Usage:
|
|
|
43
46
|
location
|
|
44
47
|
@param [in] mDebug= (0) set to 1 to show debug messages in the log
|
|
45
48
|
|
|
46
|
-
@version 9.2
|
|
47
49
|
@author Allan Bowe
|
|
48
50
|
|
|
49
51
|
**/
|