@sasjs/core 4.35.2 → 4.35.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.
|
@@ -447,7 +447,7 @@ data _null_;
|
|
|
447
447
|
put ' ';
|
|
448
448
|
put '%mend mf_getuser; ';
|
|
449
449
|
put '%macro mm_webout(action,ds,dslabel=,fref=_webout,fmt=N,missing=NULL ';
|
|
450
|
-
put ' ,showmeta=N,maxobs=MAX ';
|
|
450
|
+
put ' ,showmeta=N,maxobs=MAX,workobs=0 ';
|
|
451
451
|
put '); ';
|
|
452
452
|
put '%global _webin_file_count _webin_fileref1 _webin_name1 _program _debug ';
|
|
453
453
|
put ' sasjs_tables; ';
|
|
@@ -520,8 +520,8 @@ data _null_;
|
|
|
520
520
|
put '%else %if &action=CLOSE %then %do; ';
|
|
521
521
|
put ' /* To avoid issues with _webout on EBI we use a temporary file */ ';
|
|
522
522
|
put ' filename _sjsref temp lrecl=131068; ';
|
|
523
|
-
put ' %if %str(&
|
|
524
|
-
put ' /* if debug mode, send back first
|
|
523
|
+
put ' %if %str(&workobs) > 0 %then %do; ';
|
|
524
|
+
put ' /* if debug mode, send back first XX records of each work table also */ ';
|
|
525
525
|
put ' data;run;%let tempds=%scan(&syslast,2,.); ';
|
|
526
526
|
put ' ods output Members=&tempds; ';
|
|
527
527
|
put ' proc datasets library=WORK memtype=data; ';
|
|
@@ -545,7 +545,9 @@ data _null_;
|
|
|
545
545
|
put ' put " ""&wt"" : {"; ';
|
|
546
546
|
put ' put ''"nlobs":'' nlobs; ';
|
|
547
547
|
put ' put '',"nvars":'' nvars; ';
|
|
548
|
-
put ' %mp_jsonout(OBJ,&wt,jref=_sjsref,dslabel=first10rows,showmeta=Y,maxobs=10
|
|
548
|
+
put ' %mp_jsonout(OBJ,&wt,jref=_sjsref,dslabel=first10rows,showmeta=Y,maxobs=10 ';
|
|
549
|
+
put ' ,maxobs=&workobs ';
|
|
550
|
+
put ' ) ';
|
|
549
551
|
put ' data _null_; file _sjsref mod encoding=''utf-8''; ';
|
|
550
552
|
put ' put "}"; ';
|
|
551
553
|
put ' %end; ';
|
package/meta/mm_webout.sas
CHANGED
|
@@ -34,6 +34,9 @@
|
|
|
34
34
|
such as the column formats and types. The metadata is contained inside an
|
|
35
35
|
object with the same name as the table but prefixed with a dollar sign - ie,
|
|
36
36
|
`,"$tablename":{"formats":{"col1":"$CHAR1"},"types":{"COL1":"C"}}`
|
|
37
|
+
@param [in] workobs= (0) When set to a positive integer, will create a new
|
|
38
|
+
output object (WORK) which contains this number of observations from all
|
|
39
|
+
tables in the WORK library.
|
|
37
40
|
@param [in] maxobs= (MAX) Provide an integer to limit the number of input rows
|
|
38
41
|
that should be converted to output JSON
|
|
39
42
|
|
|
@@ -49,7 +52,7 @@
|
|
|
49
52
|
|
|
50
53
|
**/
|
|
51
54
|
%macro mm_webout(action,ds,dslabel=,fref=_webout,fmt=N,missing=NULL
|
|
52
|
-
,showmeta=N,maxobs=MAX
|
|
55
|
+
,showmeta=N,maxobs=MAX,workobs=0
|
|
53
56
|
);
|
|
54
57
|
%global _webin_file_count _webin_fileref1 _webin_name1 _program _debug
|
|
55
58
|
sasjs_tables;
|
|
@@ -122,8 +125,8 @@
|
|
|
122
125
|
%else %if &action=CLOSE %then %do;
|
|
123
126
|
/* To avoid issues with _webout on EBI we use a temporary file */
|
|
124
127
|
filename _sjsref temp lrecl=131068;
|
|
125
|
-
%if %str(&
|
|
126
|
-
/* if debug mode, send back first
|
|
128
|
+
%if %str(&workobs) > 0 %then %do;
|
|
129
|
+
/* if debug mode, send back first XX records of each work table also */
|
|
127
130
|
data;run;%let tempds=%scan(&syslast,2,.);
|
|
128
131
|
ods output Members=&tempds;
|
|
129
132
|
proc datasets library=WORK memtype=data;
|
|
@@ -147,7 +150,9 @@
|
|
|
147
150
|
put " ""&wt"" : {";
|
|
148
151
|
put '"nlobs":' nlobs;
|
|
149
152
|
put ',"nvars":' nvars;
|
|
150
|
-
%mp_jsonout(OBJ,&wt,jref=_sjsref,dslabel=first10rows,showmeta=Y,maxobs=10
|
|
153
|
+
%mp_jsonout(OBJ,&wt,jref=_sjsref,dslabel=first10rows,showmeta=Y,maxobs=10
|
|
154
|
+
,maxobs=&workobs
|
|
155
|
+
)
|
|
151
156
|
data _null_; file _sjsref mod encoding='utf-8';
|
|
152
157
|
put "}";
|
|
153
158
|
%end;
|
package/package.json
CHANGED
|
@@ -449,7 +449,7 @@ data _null_;
|
|
|
449
449
|
put '%mend mf_getuser; ';
|
|
450
450
|
put ' ';
|
|
451
451
|
put '%macro ms_webout(action,ds,dslabel=,fref=_webout,fmt=N,missing=NULL ';
|
|
452
|
-
put ' ,showmeta=N,maxobs=MAX ';
|
|
452
|
+
put ' ,showmeta=N,maxobs=MAX,workobs=0 ';
|
|
453
453
|
put '); ';
|
|
454
454
|
put '%global _webin_file_count _webin_fileref1 _webin_name1 _program _debug ';
|
|
455
455
|
put ' sasjs_tables; ';
|
|
@@ -512,8 +512,8 @@ data _null_;
|
|
|
512
512
|
put ' ) ';
|
|
513
513
|
put '%end; ';
|
|
514
514
|
put '%else %if &action=CLOSE %then %do; ';
|
|
515
|
-
put ' %if %str(&
|
|
516
|
-
put ' /* if debug mode, send back first
|
|
515
|
+
put ' %if %str(&workobs) > 0 %then %do; ';
|
|
516
|
+
put ' /* if debug mode, send back first XX records of each work table also */ ';
|
|
517
517
|
put ' data;run;%let tempds=%scan(&syslast,2,.); ';
|
|
518
518
|
put ' ods output Members=&tempds; ';
|
|
519
519
|
put ' proc datasets library=WORK memtype=data; ';
|
|
@@ -538,7 +538,9 @@ data _null_;
|
|
|
538
538
|
put ' put " ""&wt"" : {"; ';
|
|
539
539
|
put ' put ''"nlobs":'' nlobs; ';
|
|
540
540
|
put ' put '',"nvars":'' nvars; ';
|
|
541
|
-
put ' %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y,maxobs=10
|
|
541
|
+
put ' %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y,maxobs=10 ';
|
|
542
|
+
put ' ,maxobs=&workobs ';
|
|
543
|
+
put ' ) ';
|
|
542
544
|
put ' data _null_; file &fref mod encoding=''utf-8'' termstr=lf; ';
|
|
543
545
|
put ' put "}"; ';
|
|
544
546
|
put ' %end; ';
|
package/server/ms_webout.sas
CHANGED
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
such as the column formats and types. The metadata is contained inside an
|
|
32
32
|
object with the same name as the table but prefixed with a dollar sign - ie,
|
|
33
33
|
`,"$tablename":{"formats":{"col1":"$CHAR1"},"types":{"COL1":"C"}}`
|
|
34
|
+
@param [in] workobs= (0) When set to a positive integer, will create a new
|
|
35
|
+
output object (WORK) which contains this number of observations from all
|
|
36
|
+
tables in the WORK library.
|
|
34
37
|
@param [in] maxobs= (MAX) Provide an integer to limit the number of input rows
|
|
35
38
|
that should be converted to output JSON
|
|
36
39
|
|
|
@@ -49,7 +52,7 @@
|
|
|
49
52
|
**/
|
|
50
53
|
|
|
51
54
|
%macro ms_webout(action,ds,dslabel=,fref=_webout,fmt=N,missing=NULL
|
|
52
|
-
,showmeta=N,maxobs=MAX
|
|
55
|
+
,showmeta=N,maxobs=MAX,workobs=0
|
|
53
56
|
);
|
|
54
57
|
%global _webin_file_count _webin_fileref1 _webin_name1 _program _debug
|
|
55
58
|
sasjs_tables;
|
|
@@ -112,8 +115,8 @@
|
|
|
112
115
|
)
|
|
113
116
|
%end;
|
|
114
117
|
%else %if &action=CLOSE %then %do;
|
|
115
|
-
%if %str(&
|
|
116
|
-
/* if debug mode, send back first
|
|
118
|
+
%if %str(&workobs) > 0 %then %do;
|
|
119
|
+
/* if debug mode, send back first XX records of each work table also */
|
|
117
120
|
data;run;%let tempds=%scan(&syslast,2,.);
|
|
118
121
|
ods output Members=&tempds;
|
|
119
122
|
proc datasets library=WORK memtype=data;
|
|
@@ -138,7 +141,9 @@
|
|
|
138
141
|
put " ""&wt"" : {";
|
|
139
142
|
put '"nlobs":' nlobs;
|
|
140
143
|
put ',"nvars":' nvars;
|
|
141
|
-
%mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y,maxobs=10
|
|
144
|
+
%mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y,maxobs=10
|
|
145
|
+
,maxobs=&workobs
|
|
146
|
+
)
|
|
142
147
|
data _null_; file &fref mod encoding='utf-8' termstr=lf;
|
|
143
148
|
put "}";
|
|
144
149
|
%end;
|
|
@@ -590,7 +590,7 @@ data _null_;
|
|
|
590
590
|
put ' ';
|
|
591
591
|
put '%mend mf_getuser; ';
|
|
592
592
|
put '%macro mv_webout(action,ds,fref=_mvwtemp,dslabel=,fmt=N,stream=Y,missing=NULL ';
|
|
593
|
-
put ' ,showmeta=N,maxobs=MAX ';
|
|
593
|
+
put ' ,showmeta=N,maxobs=MAX,workobs=0 ';
|
|
594
594
|
put '); ';
|
|
595
595
|
put '%global _webin_file_count _webin_fileuri _debug _omittextlog _webin_name ';
|
|
596
596
|
put ' sasjs_tables SYS_JES_JOB_URI; ';
|
|
@@ -697,8 +697,8 @@ data _null_;
|
|
|
697
697
|
put ' ) ';
|
|
698
698
|
put '%end; ';
|
|
699
699
|
put '%else %if &action=CLOSE %then %do; ';
|
|
700
|
-
put ' %if %str(&
|
|
701
|
-
put ' /* send back first
|
|
700
|
+
put ' %if %str(&workobs) > 0 %then %do; ';
|
|
701
|
+
put ' /* send back first XX records of each work table for debugging */ ';
|
|
702
702
|
put ' data;run;%let tempds=%scan(&syslast,2,.); ';
|
|
703
703
|
put ' ods output Members=&tempds; ';
|
|
704
704
|
put ' proc datasets library=WORK memtype=data; ';
|
|
@@ -721,7 +721,9 @@ data _null_;
|
|
|
721
721
|
put ' put " ""&wt"" : {"; ';
|
|
722
722
|
put ' put ''"nlobs":'' nlobs; ';
|
|
723
723
|
put ' put '',"nvars":'' nvars; ';
|
|
724
|
-
put ' %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y
|
|
724
|
+
put ' %mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y ';
|
|
725
|
+
put ' ,maxobs=&workobs ';
|
|
726
|
+
put ' ) ';
|
|
725
727
|
put ' data _null_; file &fref mod;put "}"; ';
|
|
726
728
|
put ' %end; ';
|
|
727
729
|
put ' data _null_; file &fref mod;put "}";run; ';
|
package/viya/mv_webout.sas
CHANGED
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
`,"$tablename":{"formats":{"col1":"$CHAR1"},"types":{"COL1":"C"}}`
|
|
36
36
|
@param [in] maxobs= (MAX) Provide an integer to limit the number of input rows
|
|
37
37
|
that should be converted to output JSON
|
|
38
|
+
@param [in] workobs= (0) When set to a positive integer, will create a new
|
|
39
|
+
output object (WORK) which contains this number of observations from all
|
|
40
|
+
tables in the WORK library.
|
|
38
41
|
|
|
39
42
|
<h4> SAS Macros </h4>
|
|
40
43
|
@li mp_jsonout.sas
|
|
@@ -49,7 +52,7 @@
|
|
|
49
52
|
|
|
50
53
|
**/
|
|
51
54
|
%macro mv_webout(action,ds,fref=_mvwtemp,dslabel=,fmt=N,stream=Y,missing=NULL
|
|
52
|
-
,showmeta=N,maxobs=MAX
|
|
55
|
+
,showmeta=N,maxobs=MAX,workobs=0
|
|
53
56
|
);
|
|
54
57
|
%global _webin_file_count _webin_fileuri _debug _omittextlog _webin_name
|
|
55
58
|
sasjs_tables SYS_JES_JOB_URI;
|
|
@@ -156,8 +159,8 @@
|
|
|
156
159
|
)
|
|
157
160
|
%end;
|
|
158
161
|
%else %if &action=CLOSE %then %do;
|
|
159
|
-
%if %str(&
|
|
160
|
-
/* send back first
|
|
162
|
+
%if %str(&workobs) > 0 %then %do;
|
|
163
|
+
/* send back first XX records of each work table for debugging */
|
|
161
164
|
data;run;%let tempds=%scan(&syslast,2,.);
|
|
162
165
|
ods output Members=&tempds;
|
|
163
166
|
proc datasets library=WORK memtype=data;
|
|
@@ -180,7 +183,9 @@
|
|
|
180
183
|
put " ""&wt"" : {";
|
|
181
184
|
put '"nlobs":' nlobs;
|
|
182
185
|
put ',"nvars":' nvars;
|
|
183
|
-
%mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y
|
|
186
|
+
%mp_jsonout(OBJ,&wt,jref=&fref,dslabel=first10rows,showmeta=Y
|
|
187
|
+
,maxobs=&workobs
|
|
188
|
+
)
|
|
184
189
|
data _null_; file &fref mod;put "}";
|
|
185
190
|
%end;
|
|
186
191
|
data _null_; file &fref mod;put "}";run;
|