1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-21 10:11:19 +00:00

fix: avoid sending BOM marker to SASjs API

This commit is contained in:
munja
2022-04-14 19:31:36 +01:00
parent 6938a42896
commit ddd120bb75
3 changed files with 19 additions and 4 deletions

12
all.sas
View File

@@ -8239,7 +8239,8 @@ options
%end; %end;
; ;
%mend mp_init;/** %mend mp_init;
/**
@file mp_jsonout.sas @file mp_jsonout.sas
@brief Writes JSON in SASjs format to a fileref @brief Writes JSON in SASjs format to a fileref
@details PROC JSON is faster but will produce errs like the ones below if @details PROC JSON is faster but will produce errs like the ones below if
@@ -18937,12 +18938,16 @@ run;
,mdebug=0 ,mdebug=0
); );
%local fname0 fname1 fname2 boundary fname statcd msg; %local fname0 fname1 fname2 boundary fname statcd msg optval;
%let fname0=%mf_getuniquefileref(); %let fname0=%mf_getuniquefileref();
%let fname1=%mf_getuniquefileref(); %let fname1=%mf_getuniquefileref();
%let fname2=%mf_getuniquefileref(); %let fname2=%mf_getuniquefileref();
%let boundary=%mf_getuniquename(); %let boundary=%mf_getuniquename();
/* avoid sending bom marker to API */
%let optval=%sysfunc(getoption(bomfile));
options nobomfile;
data _null_; data _null_;
file &fname0 termstr=crlf; file &fname0 termstr=crlf;
infile &inref end=eof; infile &inref end=eof;
@@ -19003,6 +19008,9 @@ run;
,msg=%superq(msg) ,msg=%superq(msg)
) )
/* reset options */
options &optval;
%mend ms_createfile; %mend ms_createfile;
/** /**
@file @file

View File

@@ -29,12 +29,16 @@
,mdebug=0 ,mdebug=0
); );
%local fname0 fname1 fname2 boundary fname statcd msg; %local fname0 fname1 fname2 boundary fname statcd msg optval;
%let fname0=%mf_getuniquefileref(); %let fname0=%mf_getuniquefileref();
%let fname1=%mf_getuniquefileref(); %let fname1=%mf_getuniquefileref();
%let fname2=%mf_getuniquefileref(); %let fname2=%mf_getuniquefileref();
%let boundary=%mf_getuniquename(); %let boundary=%mf_getuniquename();
/* avoid sending bom marker to API */
%let optval=%sysfunc(getoption(bomfile));
options nobomfile;
data _null_; data _null_;
file &fname0 termstr=crlf; file &fname0 termstr=crlf;
infile &inref end=eof; infile &inref end=eof;
@@ -95,4 +99,7 @@ run;
,msg=%superq(msg) ,msg=%superq(msg)
) )
/* reset options */
options &optval;
%mend ms_createfile; %mend ms_createfile;