1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-11 02:50:06 +00:00

Merge pull request #217 from sasjs/bom

fix: avoid sending BOM marker to SASjs API
This commit is contained in:
Allan Bowe
2022-04-14 21:32:25 +03:00
committed by GitHub
3 changed files with 19 additions and 4 deletions

12
all.sas
View File

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

View File

@@ -73,4 +73,4 @@ options
%end;
;
%mend mp_init;
%mend mp_init;

View File

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