@sasjs/core 4.18.2 → 4.18.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/base/mp_abort.sas +4 -2
- package/meta/mm_assignlib.sas +30 -17
- package/package.json +1 -1
package/base/mp_abort.sas
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
%end;
|
|
86
86
|
|
|
87
87
|
/* Stored Process Server web app context */
|
|
88
|
-
%if %symexist(
|
|
88
|
+
%if %symexist(_METAFOLDER)
|
|
89
89
|
or "&SYSPROCESSNAME "="Compute Server "
|
|
90
90
|
or &mode=INCLUDE
|
|
91
91
|
%then %do;
|
|
@@ -161,12 +161,14 @@
|
|
|
161
161
|
/* send response in SASjs JSON format */
|
|
162
162
|
data _null_;
|
|
163
163
|
file _webout mod lrecl=32000 encoding='utf-8';
|
|
164
|
-
length msg $32767 ;
|
|
164
|
+
length msg syswarningtext syserrortext $32767 ;
|
|
165
165
|
sasdatetime=datetime();
|
|
166
166
|
msg=symget('msg');
|
|
167
167
|
%if &logline>0 %then %do;
|
|
168
168
|
msg=cats(msg,'\n\nLog Extract:\n',symget('logmsg'));
|
|
169
169
|
%end;
|
|
170
|
+
/* escape the escapes */
|
|
171
|
+
msg=tranwrd(msg,'\','\\');
|
|
170
172
|
/* escape the quotes */
|
|
171
173
|
msg=tranwrd(msg,'"','\"');
|
|
172
174
|
/* ditch the CRLFs as chrome complains */
|
package/meta/mm_assignlib.sas
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
<h4> SAS Macros </h4>
|
|
14
14
|
@li mp_abort.sas
|
|
15
15
|
|
|
16
|
-
@param libref
|
|
17
|
-
@param mAbort= If not assigned, HARD will call %mp_abort(), SOFT will
|
|
16
|
+
@param [in] libref The libref (not name) of the metadata library
|
|
17
|
+
@param [in] mAbort= If not assigned, HARD will call %mp_abort(), SOFT will
|
|
18
18
|
silently return
|
|
19
19
|
|
|
20
20
|
@returns libname statement
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
libref
|
|
29
29
|
,mAbort=HARD
|
|
30
30
|
)/*/STORE SOURCE*/;
|
|
31
|
-
|
|
31
|
+
%local mp_abort msg;
|
|
32
|
+
%let mp_abort=0;
|
|
32
33
|
%if %sysfunc(libref(&libref)) %then %do;
|
|
33
|
-
%local mp_abort msg; %let mp_abort=0;
|
|
34
34
|
data _null_;
|
|
35
|
-
length liburi LibName $200;
|
|
35
|
+
length liburi LibName msg $200;
|
|
36
36
|
call missing(of _all_);
|
|
37
37
|
nobj=metadata_getnobj("omsobj:SASLibrary?@Libref='&libref'",1,liburi);
|
|
38
38
|
if nobj=1 then do;
|
|
@@ -46,7 +46,24 @@
|
|
|
46
46
|
* not always helpful though. One example, previously received:
|
|
47
47
|
* NOTE: Libref XX refers to the same library metadata as libref XX.
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
msg=sysmsg();
|
|
50
|
+
if msg=:'ERROR: Libref SAVE is not assigned.' then do;
|
|
51
|
+
msg=catx(" ",
|
|
52
|
+
"Could not assign %upcase(&libref).",
|
|
53
|
+
"Please check metadata permissions! Libname:",libname,
|
|
54
|
+
"Liburi:",liburi
|
|
55
|
+
);
|
|
56
|
+
end;
|
|
57
|
+
else if msg="ERROR: User does not have appropriate authorization "!!
|
|
58
|
+
"level for library SAVE."
|
|
59
|
+
then do;
|
|
60
|
+
msg=catx(" ",
|
|
61
|
+
"ERROR: User does not have appropriate authorization level",
|
|
62
|
+
"for library %upcase(&libref), libname:",libname,
|
|
63
|
+
"Liburi:",liburi
|
|
64
|
+
);
|
|
65
|
+
end;
|
|
66
|
+
call symputx('msg',msg,'l');
|
|
50
67
|
if "&mabort"='HARD' then call symputx('mp_abort',1,'l');
|
|
51
68
|
end;
|
|
52
69
|
else do;
|
|
@@ -65,20 +82,16 @@
|
|
|
65
82
|
end;
|
|
66
83
|
run;
|
|
67
84
|
|
|
68
|
-
%
|
|
69
|
-
%mp_abort(iftrue= (&mp_abort=1)
|
|
70
|
-
,mac=mm_assignlib.sas
|
|
71
|
-
,msg=&msg
|
|
72
|
-
)
|
|
73
|
-
%return;
|
|
74
|
-
%end;
|
|
75
|
-
%else %if %length(&msg)>2 %then %do;
|
|
76
|
-
%put NOTE: &msg;
|
|
77
|
-
%return;
|
|
78
|
-
%end;
|
|
85
|
+
%put NOTE: &msg;
|
|
79
86
|
|
|
80
87
|
%end;
|
|
81
88
|
%else %do;
|
|
82
89
|
%put NOTE: Library &libref is already assigned;
|
|
83
90
|
%end;
|
|
91
|
+
|
|
92
|
+
%mp_abort(iftrue= (&mp_abort=1)
|
|
93
|
+
,mac=mm_assignlib.sas
|
|
94
|
+
,msg=%superq(msg)
|
|
95
|
+
)
|
|
96
|
+
|
|
84
97
|
%mend mm_assignlib;
|
package/package.json
CHANGED