Skip to content

Commit

Permalink
fix: pretty option always in proc json
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Bowe committed Jul 11, 2020
1 parent f491fa3 commit 888e074
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
13 changes: 6 additions & 7 deletions all.sas
Original file line number Diff line number Diff line change
Expand Up @@ -3080,7 +3080,9 @@ create table &outds (rename=(
* PROCJSON (default)
* DATASTEP
@param dbg= Typically used with an _debug (numeric) option
@param dbg= DEPRECATED - was used to conditionally add PRETTY to
proc json but this can cause line truncation in large files.
@version 9.2
@author Allan Bowe
Expand All @@ -3106,9 +3108,8 @@ create table &outds (rename=(
proc sql;drop table &tempds;
data &tempds /view=&tempds;set &ds;
%if &fmt=N %then format _numeric_ best32.;;
proc json out=&jref
proc json out=&jref pretty
%if &action=ARR %then nokeys ;
%if &dbg ge 131 %then pretty ;
;export &tempds / nosastags fmtnumeric;
run;
proc sql;drop view &tempds;
Expand Down Expand Up @@ -6053,9 +6054,8 @@ data _null_;
put ' proc sql;drop table &tempds; ';
put ' data &tempds /view=&tempds;set &ds; ';
put ' %if &fmt=N %then format _numeric_ best32.;; ';
put ' proc json out=&jref ';
put ' proc json out=&jref pretty ';
put ' %if &action=ARR %then nokeys ; ';
put ' %if &dbg ge 131 %then pretty ; ';
put ' ;export &tempds / nosastags fmtnumeric; ';
put ' run; ';
put ' proc sql;drop view &tempds; ';
Expand Down Expand Up @@ -9840,9 +9840,8 @@ data _null_;
put ' proc sql;drop table &tempds; ';
put ' data &tempds /view=&tempds;set &ds; ';
put ' %if &fmt=N %then format _numeric_ best32.;; ';
put ' proc json out=&jref ';
put ' proc json out=&jref pretty ';
put ' %if &action=ARR %then nokeys ; ';
put ' %if &dbg ge 131 %then pretty ; ';
put ' ;export &tempds / nosastags fmtnumeric; ';
put ' run; ';
put ' proc sql;drop view &tempds; ';
Expand Down
7 changes: 4 additions & 3 deletions base/mp_jsonout.sas
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
* PROCJSON (default)
* DATASTEP
@param dbg= Typically used with an _debug (numeric) option
@param dbg= DEPRECATED - was used to conditionally add PRETTY to
proc json but this can cause line truncation in large files.
@version 9.2
@author Allan Bowe
Expand All @@ -66,9 +68,8 @@
proc sql;drop table &tempds;
data &tempds /view=&tempds;set &ds;
%if &fmt=N %then format _numeric_ best32.;;
proc json out=&jref
proc json out=&jref pretty
%if &action=ARR %then nokeys ;
%if &dbg ge 131 %then pretty ;
;export &tempds / nosastags fmtnumeric;
run;
proc sql;drop view &tempds;
Expand Down
3 changes: 1 addition & 2 deletions meta/mm_createwebservice.sas
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ data _null_;
put ' proc sql;drop table &tempds; ';
put ' data &tempds /view=&tempds;set &ds; ';
put ' %if &fmt=N %then format _numeric_ best32.;; ';
put ' proc json out=&jref ';
put ' proc json out=&jref pretty ';
put ' %if &action=ARR %then nokeys ; ';
put ' %if &dbg ge 131 %then pretty ; ';
put ' ;export &tempds / nosastags fmtnumeric; ';
put ' run; ';
put ' proc sql;drop view &tempds; ';
Expand Down
3 changes: 1 addition & 2 deletions viya/mv_createwebservice.sas
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,8 @@ data _null_;
put ' proc sql;drop table &tempds; ';
put ' data &tempds /view=&tempds;set &ds; ';
put ' %if &fmt=N %then format _numeric_ best32.;; ';
put ' proc json out=&jref ';
put ' proc json out=&jref pretty ';
put ' %if &action=ARR %then nokeys ; ';
put ' %if &dbg ge 131 %then pretty ; ';
put ' ;export &tempds / nosastags fmtnumeric; ';
put ' run; ';
put ' proc sql;drop view &tempds; ';
Expand Down

0 comments on commit 888e074

Please sign in to comment.