@sasjs/core 4.18.9 → 4.18.12
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_getpk.sas
CHANGED
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
)/*/STORE SOURCE*/;
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
%local engine schema ds1 ds2 ds3 dsn tabs1 tabs2 sum pk4sure pkdefault finalpks
|
|
58
|
+
%local engine schema ds1 ds2 ds3 dsn tabs1 tabs2 sum pk4sure pkdefault finalpks
|
|
59
|
+
pkfromindex;
|
|
59
60
|
|
|
60
61
|
%let lib=%upcase(&lib);
|
|
61
62
|
%let ds=%upcase(&ds);
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
%let sum=%mf_getuniquename(prefix=getpk_sum);
|
|
71
72
|
%let pk4sure=%mf_getuniquename(prefix=getpk_pk4sure);
|
|
72
73
|
%let pkdefault=%mf_getuniquename(prefix=getpk_pkdefault);
|
|
74
|
+
%let pkfromindex=%mf_getuniquename(prefix=getpk_pkfromindex);
|
|
73
75
|
%let finalpks=%mf_getuniquename(prefix=getpk_finalpks);
|
|
74
76
|
|
|
75
77
|
%local dbg;
|
|
@@ -180,9 +182,23 @@ create table &ds1 as
|
|
|
180
182
|
and a.constraint_name=b.constraint_name
|
|
181
183
|
order by 1,2,3,4;
|
|
182
184
|
|
|
185
|
+
/* extract cols from the relevant unique INDEXES */
|
|
186
|
+
create table &pkfromindex as
|
|
187
|
+
select libname as libref
|
|
188
|
+
,memname as table_name
|
|
189
|
+
,indxname as constraint_name
|
|
190
|
+
,indxpos as constraint_order
|
|
191
|
+
,name
|
|
192
|
+
from dictionary.indexes
|
|
193
|
+
where nomiss='yes' and unique='yes' and upcase(libname)="&lib"
|
|
194
|
+
%if &ds ne 0 %then %do;
|
|
195
|
+
and upcase(memname)="&ds"
|
|
196
|
+
%end;
|
|
197
|
+
order by 1,2,3,4;
|
|
198
|
+
|
|
183
199
|
/* create one table */
|
|
184
200
|
data &finalpks;
|
|
185
|
-
set &pkdefault &pk4sure ;
|
|
201
|
+
set &pkdefault &pk4sure &pkfromindex;
|
|
186
202
|
pk_ind=1;
|
|
187
203
|
/* if there are multiple unique constraints, take the first */
|
|
188
204
|
by libref table_name constraint_name;
|
|
@@ -256,4 +272,4 @@ create table &outds as
|
|
|
256
272
|
iftrue=(&mdebug=0)
|
|
257
273
|
)
|
|
258
274
|
|
|
259
|
-
%mend mp_getpk;
|
|
275
|
+
%mend mp_getpk;
|
package/base/mp_jsonout.sas
CHANGED
|
@@ -203,13 +203,13 @@
|
|
|
203
203
|
prxchange('s/'!!'0A'x!!'/\n/',-1,
|
|
204
204
|
prxchange('s/'!!'0D'x!!'/\r/',-1,
|
|
205
205
|
prxchange('s/'!!'09'x!!'/\t/',-1,
|
|
206
|
-
prxchange('s
|
|
207
|
-
prxchange('s
|
|
208
|
-
prxchange('s
|
|
209
|
-
prxchange('s
|
|
210
|
-
prxchange('s
|
|
211
|
-
prxchange('s
|
|
212
|
-
prxchange('s
|
|
206
|
+
prxchange('s/\x00/\\u0000/',-1, /* NUL */
|
|
207
|
+
prxchange('s/\x0E/\\u000E/',-1, /* SS */
|
|
208
|
+
prxchange('s/\x0F/\\u000F/',-1, /* SF */
|
|
209
|
+
prxchange('s/\x01/\\u0001/',-1, /* SOH */
|
|
210
|
+
prxchange('s/\x02/\\u0002/',-1, /* STX */
|
|
211
|
+
prxchange('s/\x10/\\u0010/',-1, /* DLE */
|
|
212
|
+
prxchange('s/\x11/\\u0011/',-1, /* DC1 */
|
|
213
213
|
prxchange('s/\\/\\\\/',-1,&&name&i)
|
|
214
214
|
))))))))))))!!'"';
|
|
215
215
|
%end;
|
package/base/mp_streamfile.sas
CHANGED
|
@@ -105,12 +105,20 @@ run;
|
|
|
105
105
|
%end;
|
|
106
106
|
%end;
|
|
107
107
|
%else %if &contentype=HTML %then %do;
|
|
108
|
-
%if &platform=
|
|
108
|
+
%if (&platform=SASMETA and &streamweb=1) %then %do;
|
|
109
|
+
data _null_;
|
|
110
|
+
rc=stpsrv_header('Content-type','text/html');
|
|
111
|
+
rc=stpsrv_header('Content-disposition',"attachment; filename=&outname");
|
|
112
|
+
run;
|
|
113
|
+
%end;
|
|
114
|
+
%else %if &platform=SASVIYA %then %do;
|
|
109
115
|
filename &outref filesrvc parenturi="&SYS_JES_JOB_URI" name="_webout.json"
|
|
110
|
-
contenttype="text/html"
|
|
116
|
+
contenttype="text/html"
|
|
117
|
+
contentdisp="attachment; filename=&outname";
|
|
111
118
|
%end;
|
|
112
119
|
%else %if &platform=SASJS %then %do;
|
|
113
120
|
%mfs_httpheader(Content-type,text/html)
|
|
121
|
+
%mfs_httpheader(Content-disposition,%str(attachment; filename=&outname))
|
|
114
122
|
%end;
|
|
115
123
|
%end;
|
|
116
124
|
%else %if &contentype=TEXT %then %do;
|
|
@@ -236,13 +236,13 @@ data _null_;
|
|
|
236
236
|
put ' prxchange(''s/''!!''0A''x!!''/\n/'',-1, ';
|
|
237
237
|
put ' prxchange(''s/''!!''0D''x!!''/\r/'',-1, ';
|
|
238
238
|
put ' prxchange(''s/''!!''09''x!!''/\t/'',-1, ';
|
|
239
|
-
put ' prxchange(''s
|
|
240
|
-
put ' prxchange(''s
|
|
241
|
-
put ' prxchange(''s
|
|
242
|
-
put ' prxchange(''s
|
|
243
|
-
put ' prxchange(''s
|
|
244
|
-
put ' prxchange(''s
|
|
245
|
-
put ' prxchange(''s
|
|
239
|
+
put ' prxchange(''s/\x00/\\u0000/'',-1, /* NUL */ ';
|
|
240
|
+
put ' prxchange(''s/\x0E/\\u000E/'',-1, /* SS */ ';
|
|
241
|
+
put ' prxchange(''s/\x0F/\\u000F/'',-1, /* SF */ ';
|
|
242
|
+
put ' prxchange(''s/\x01/\\u0001/'',-1, /* SOH */ ';
|
|
243
|
+
put ' prxchange(''s/\x02/\\u0002/'',-1, /* STX */ ';
|
|
244
|
+
put ' prxchange(''s/\x10/\\u0010/'',-1, /* DLE */ ';
|
|
245
|
+
put ' prxchange(''s/\x11/\\u0011/'',-1, /* DC1 */ ';
|
|
246
246
|
put ' prxchange(''s/\\/\\\\/'',-1,&&name&i) ';
|
|
247
247
|
put ' ))))))))))))!!''"''; ';
|
|
248
248
|
put ' %end; ';
|
package/package.json
CHANGED
|
@@ -380,13 +380,13 @@ data _null_;
|
|
|
380
380
|
put ' prxchange(''s/''!!''0A''x!!''/\n/'',-1, ';
|
|
381
381
|
put ' prxchange(''s/''!!''0D''x!!''/\r/'',-1, ';
|
|
382
382
|
put ' prxchange(''s/''!!''09''x!!''/\t/'',-1, ';
|
|
383
|
-
put ' prxchange(''s
|
|
384
|
-
put ' prxchange(''s
|
|
385
|
-
put ' prxchange(''s
|
|
386
|
-
put ' prxchange(''s
|
|
387
|
-
put ' prxchange(''s
|
|
388
|
-
put ' prxchange(''s
|
|
389
|
-
put ' prxchange(''s
|
|
383
|
+
put ' prxchange(''s/\x00/\\u0000/'',-1, /* NUL */ ';
|
|
384
|
+
put ' prxchange(''s/\x0E/\\u000E/'',-1, /* SS */ ';
|
|
385
|
+
put ' prxchange(''s/\x0F/\\u000F/'',-1, /* SF */ ';
|
|
386
|
+
put ' prxchange(''s/\x01/\\u0001/'',-1, /* SOH */ ';
|
|
387
|
+
put ' prxchange(''s/\x02/\\u0002/'',-1, /* STX */ ';
|
|
388
|
+
put ' prxchange(''s/\x10/\\u0010/'',-1, /* DLE */ ';
|
|
389
|
+
put ' prxchange(''s/\x11/\\u0011/'',-1, /* DC1 */ ';
|
|
390
390
|
put ' prxchange(''s/\\/\\\\/'',-1,&&name&i) ';
|
|
391
391
|
put ' ))))))))))))!!''"''; ';
|
|
392
392
|
put ' %end; ';
|