1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 14:04:36 +00:00

feat: adding maxobs param to mX_webout macros

This commit is contained in:
Allan Bowe
2022-08-12 13:12:06 +00:00
parent 8c09c0bce0
commit 6015320145
10 changed files with 60 additions and 48 deletions

View File

@@ -512,7 +512,7 @@ data _null_;
put ' ';
put '%mend mf_getuser; ';
put '%macro mv_webout(action,ds,fref=_mvwtemp,dslabel=,fmt=Y,stream=Y,missing=NULL ';
put ' ,showmeta=N ';
put ' ,showmeta=N,maxobs=MAX ';
put '); ';
put '%global _webin_file_count _webin_fileuri _debug _omittextlog _webin_name ';
put ' sasjs_tables SYS_JES_JOB_URI; ';
@@ -614,8 +614,8 @@ data _null_;
put ' run; ';
put '%end; ';
put '%else %if &action=ARR or &action=OBJ %then %do; ';
put ' %mp_jsonout(&action,&ds,dslabel=&dslabel,fmt=&fmt ';
put ' ,jref=&fref,engine=DATASTEP,missing=&missing,showmeta=&showmeta ';
put ' %mp_jsonout(&action,&ds,dslabel=&dslabel,fmt=&fmt,jref=&fref ';
put ' ,engine=DATASTEP,missing=&missing,showmeta=&showmeta,maxobs=&maxobs ';
put ' ) ';
put '%end; ';
put '%else %if &action=CLOSE %then %do; ';

View File

@@ -33,6 +33,8 @@
such as the column formats and types. The metadata is contained inside an
object with the same name as the table but prefixed with a dollar sign - ie,
`,"$tablename":{"formats":{"col1":"$CHAR1"},"types":{"COL1":"C"}}`
@param [in] maxobs= (MAX) Provide an integer to limit the number of input rows
that should be converted to output JSON
<h4> SAS Macros </h4>
@li mp_jsonout.sas
@@ -43,7 +45,7 @@
**/
%macro mv_webout(action,ds,fref=_mvwtemp,dslabel=,fmt=Y,stream=Y,missing=NULL
,showmeta=N
,showmeta=N,maxobs=MAX
);
%global _webin_file_count _webin_fileuri _debug _omittextlog _webin_name
sasjs_tables SYS_JES_JOB_URI;
@@ -145,8 +147,8 @@
run;
%end;
%else %if &action=ARR or &action=OBJ %then %do;
%mp_jsonout(&action,&ds,dslabel=&dslabel,fmt=&fmt
,jref=&fref,engine=DATASTEP,missing=&missing,showmeta=&showmeta
%mp_jsonout(&action,&ds,dslabel=&dslabel,fmt=&fmt,jref=&fref
,engine=DATASTEP,missing=&missing,showmeta=&showmeta,maxobs=&maxobs
)
%end;
%else %if &action=CLOSE %then %do;