1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-11 06:24:35 +00:00

fix: mp_jsonout

This commit is contained in:
Allan Bowe
2022-06-25 21:38:05 +00:00
parent e1afbc02c4
commit 532bf84e06
5 changed files with 80 additions and 112 deletions

View File

@@ -236,20 +236,16 @@
%if &action=ARR %then "]" ; %else "}" ; ;
/* now write the long strings to _webout 1 byte at a time */
data _null_;
length filein 8 fileid 8;
filein=fopen("_sjs",'I',1,'B');
fileid=fopen("&jref",'A',1,'B');
rec='20'x;
do while(fread(filein)=0);
rc=fget(filein,rec,1);
rc=fput(fileid, rec);
rc=fwrite(fileid);
end;
/* close out the table */
rc=fput(fileid, "]");
rc=fwrite(fileid);
rc=fclose(filein);
rc=fclose(fileid);
infile _sjs;
file &jref mod;
input sourcechar $char1. @@;
format sourcechar hex2.;
put sourcechar char1. @@;
run;
/* close out the table */
data _null_;
file &jref mod;
put ']';
run;
filename _sjs clear;
%end;