From 888e07468c1977bd10f994b0d610f11c662b5674 Mon Sep 17 00:00:00 2001 From: Allan Bowe <> Date: Sat, 11 Jul 2020 11:57:56 +0200 Subject: [PATCH] fix: pretty option always in proc json --- all.sas | 13 ++++++------- base/mp_jsonout.sas | 7 ++++--- meta/mm_createwebservice.sas | 3 +-- viya/mv_createwebservice.sas | 3 +-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/all.sas b/all.sas index 0152142..8060a2d 100644 --- a/all.sas +++ b/all.sas @@ -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 @@ -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; @@ -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; '; @@ -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; '; diff --git a/base/mp_jsonout.sas b/base/mp_jsonout.sas index 4aabc5c..80acee9 100644 --- a/base/mp_jsonout.sas +++ b/base/mp_jsonout.sas @@ -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 @@ -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; diff --git a/meta/mm_createwebservice.sas b/meta/mm_createwebservice.sas index 1493c78..46edefa 100644 --- a/meta/mm_createwebservice.sas +++ b/meta/mm_createwebservice.sas @@ -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; '; diff --git a/viya/mv_createwebservice.sas b/viya/mv_createwebservice.sas index e3055f9..402273a 100644 --- a/viya/mv_createwebservice.sas +++ b/viya/mv_createwebservice.sas @@ -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; ';