@sasjs/core 4.15.2 → 4.16.0
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/mf_getuser.sas +2 -1
- package/base/mf_verifymacvars.sas +1 -1
- package/base/mp_loadformat.sas +5 -2
- package/meta/mm_createwebservice.sas +2 -1
- package/meta/mm_deletelibrary.sas +1 -0
- package/meta/mm_spkexport.sas +35 -21
- package/package.json +1 -1
- package/viya/mv_createwebservice.sas +2 -1
package/base/mf_getuser.sas
CHANGED
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
%else %if %symexist(&metavar) %then %do;
|
|
34
34
|
%if %length(&&&metavar)=0 %then %let user=&sysuserid;
|
|
35
35
|
/* sometimes SAS will add @domain extension - remove for consistency */
|
|
36
|
-
|
|
36
|
+
/* but be sure to quote in case of usernames with commas */
|
|
37
|
+
%else %let user=%unquote(%scan(%quote(&&&metavar),1,@));
|
|
37
38
|
%end;
|
|
38
39
|
%else %let user=&sysuserid;
|
|
39
40
|
|
package/base/mp_loadformat.sas
CHANGED
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
@li mp_abort.sas
|
|
41
41
|
@li mp_cntlout.sas
|
|
42
42
|
@li mp_lockanytable.sas
|
|
43
|
+
@li mp_storediffs.sas
|
|
43
44
|
|
|
44
45
|
<h4> Related Macros </h4>
|
|
45
46
|
@li mddl_dc_difftable.sas
|
|
46
47
|
@li mddl_dc_locktable.sas
|
|
47
48
|
@li mp_loadformat.test.sas
|
|
48
49
|
@li mp_lockanytable.sas
|
|
49
|
-
@li mp_storediffs.sas
|
|
50
50
|
@li mp_stackdiffs.sas
|
|
51
51
|
|
|
52
52
|
|
|
@@ -272,6 +272,9 @@ options ibufsize=&ibufsize;
|
|
|
272
272
|
,mdebug=&mdebug
|
|
273
273
|
)
|
|
274
274
|
|
|
275
|
+
proc append base=&auditlibds data=&storediffs;
|
|
276
|
+
run;
|
|
277
|
+
|
|
275
278
|
%if &locklibds ne 0 %then %do;
|
|
276
279
|
%mp_lockanytable(UNLOCK
|
|
277
280
|
,lib=%scan(&auditlibds,1,.)
|
|
@@ -295,4 +298,4 @@ options ibufsize=&ibufsize;
|
|
|
295
298
|
%put &sysmacroname exit vars:;
|
|
296
299
|
%put _local_;
|
|
297
300
|
%end;
|
|
298
|
-
%mend mp_loadformat;
|
|
301
|
+
%mend mp_loadformat;
|
|
@@ -453,7 +453,8 @@ data _null_;
|
|
|
453
453
|
put ' %else %if %symexist(&metavar) %then %do; ';
|
|
454
454
|
put ' %if %length(&&&metavar)=0 %then %let user=&sysuserid; ';
|
|
455
455
|
put ' /* sometimes SAS will add @domain extension - remove for consistency */ ';
|
|
456
|
-
put '
|
|
456
|
+
put ' /* but be sure to quote in case of usernames with commas */ ';
|
|
457
|
+
put ' %else %let user=%unquote(%scan(%quote(&&&metavar),1,@)); ';
|
|
457
458
|
put ' %end; ';
|
|
458
459
|
put ' %else %let user=&sysuserid; ';
|
|
459
460
|
put ' ';
|
package/meta/mm_spkexport.sas
CHANGED
|
@@ -49,20 +49,25 @@
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
<h4> SAS Macros </h4>
|
|
52
|
-
@li mf_loc.sas
|
|
53
|
-
@li mm_tree.sas
|
|
54
52
|
@li mf_getuniquefileref.sas
|
|
53
|
+
@li mf_getuniquename.sas
|
|
55
54
|
@li mf_isblank.sas
|
|
55
|
+
@li mf_loc.sas
|
|
56
|
+
@li mm_tree.sas
|
|
56
57
|
@li mp_abort.sas
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
@param
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
@param
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
|
|
60
|
+
@param [in] metaloc= the metadata folder to export
|
|
61
|
+
@param [in] secureref= fileref containing the username / password (should
|
|
62
|
+
point to a file in a secure location). Leave blank to substitute $bash vars.
|
|
63
|
+
@param [in] excludevars= (0) A space seperated list of macro variable names,
|
|
64
|
+
each of which contains a value that should be used to filter the output
|
|
65
|
+
objects.
|
|
66
|
+
@param [out] outref= fileref to which to write the command
|
|
67
|
+
@param [out] cmdoutloc= (%sysfunc(pathname(work))) The directory to which the
|
|
68
|
+
command will write the SPK
|
|
69
|
+
@param [out] cmdoutname= (mmxport) The name of the spk / log files to create
|
|
70
|
+
(will be identical just with .spk or .log extension)
|
|
66
71
|
|
|
67
72
|
@version 9.4
|
|
68
73
|
@author Allan Bowe
|
|
@@ -71,6 +76,7 @@
|
|
|
71
76
|
|
|
72
77
|
%macro mm_spkexport(metaloc=
|
|
73
78
|
,secureref=
|
|
79
|
+
,excludevars=0
|
|
74
80
|
,outref=
|
|
75
81
|
,cmdoutloc=%sysfunc(pathname(work))
|
|
76
82
|
,cmdoutname=mmxport
|
|
@@ -82,7 +88,7 @@
|
|
|
82
88
|
%end;
|
|
83
89
|
|
|
84
90
|
/* set creds */
|
|
85
|
-
%local mmxuser mmxpath;
|
|
91
|
+
%local mmxuser mmxpath i var;
|
|
86
92
|
%let mmxuser=$1;
|
|
87
93
|
%let mmxpass=$2;
|
|
88
94
|
%if %mf_isblank(&secureref)=0 %then %do;
|
|
@@ -90,35 +96,43 @@
|
|
|
90
96
|
%end;
|
|
91
97
|
|
|
92
98
|
/* setup metadata connection options */
|
|
93
|
-
%local host port platform_object_path
|
|
99
|
+
%local host port platform_object_path ds;
|
|
94
100
|
%let host=%sysfunc(getoption(metaserver));
|
|
95
101
|
%let port=%sysfunc(getoption(metaport));
|
|
96
102
|
%let platform_object_path=%mf_loc(POF);
|
|
103
|
+
%let ds=%mf_getuniquename(prefix=spkexportable);
|
|
97
104
|
|
|
98
|
-
%
|
|
99
|
-
)-password &mmxpass);
|
|
100
|
-
|
|
101
|
-
%mm_tree(root=%str(&metaloc) ,types=EXPORTABLE ,outds=exportable)
|
|
105
|
+
%mm_tree(root=%str(&metaloc) ,types=EXPORTABLE ,outds=&ds)
|
|
102
106
|
|
|
103
107
|
%if %mf_isblank(&outref)=1 %then %let outref=%mf_getuniquefileref();
|
|
104
108
|
|
|
105
109
|
data _null_;
|
|
106
|
-
set
|
|
110
|
+
set &ds end=last;
|
|
107
111
|
file &outref lrecl=32767;
|
|
108
112
|
length str $32767;
|
|
109
113
|
if _n_=1 then do;
|
|
110
114
|
put "cd ""&platform_object_path"" \";
|
|
111
|
-
put "; ./ExportPackage &
|
|
112
|
-
put " -
|
|
115
|
+
put "; ./ExportPackage -host &host -port &port -user &mmxuser \";
|
|
116
|
+
put " -disableX11 -password &mmxpass \"
|
|
117
|
+
put " -package ""&cmdoutloc/&cmdoutname..spk"" \";
|
|
113
118
|
end;
|
|
119
|
+
/* exclude particular patterns from the exported SPK */
|
|
120
|
+
%if "&excludevars" ne "0" %then %do;
|
|
121
|
+
/* ignore top level folder else all subcontent will be exported regardless */
|
|
122
|
+
if _n_>1;
|
|
123
|
+
%do i=1 %to %sysfunc(countw(&excludevars));
|
|
124
|
+
%let var=%scan(&excludevars,&i);
|
|
125
|
+
if index(path,symget("&var")) ne 0;
|
|
126
|
+
%end;
|
|
127
|
+
%end;
|
|
114
128
|
str=' -objects '!!cats('"',path,'/',name,"(",publictype,')" \');
|
|
115
129
|
put str;
|
|
116
130
|
if last then put " -log ""&cmdoutloc/&cmdoutname..log"" 2>&1 ";
|
|
117
131
|
run;
|
|
118
132
|
|
|
119
133
|
%mp_abort(iftrue= (&syscc ne 0)
|
|
120
|
-
,mac
|
|
134
|
+
,mac=mm_spkexport
|
|
121
135
|
,msg=%str(syscc=&syscc)
|
|
122
136
|
)
|
|
123
137
|
|
|
124
|
-
%mend mm_spkexport;
|
|
138
|
+
%mend mm_spkexport;
|
package/package.json
CHANGED
|
@@ -655,7 +655,8 @@ data _null_;
|
|
|
655
655
|
put ' %else %if %symexist(&metavar) %then %do; ';
|
|
656
656
|
put ' %if %length(&&&metavar)=0 %then %let user=&sysuserid; ';
|
|
657
657
|
put ' /* sometimes SAS will add @domain extension - remove for consistency */ ';
|
|
658
|
-
put '
|
|
658
|
+
put ' /* but be sure to quote in case of usernames with commas */ ';
|
|
659
|
+
put ' %else %let user=%unquote(%scan(%quote(&&&metavar),1,@)); ';
|
|
659
660
|
put ' %end; ';
|
|
660
661
|
put ' %else %let user=&sysuserid; ';
|
|
661
662
|
put ' ';
|