1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 22:14:35 +00:00

fix: avoiding lua compilation issues by setting wide enough lrecl

This commit is contained in:
munja
2022-04-28 20:57:44 +01:00
parent 42f2767129
commit 3435509eec
3 changed files with 23 additions and 0 deletions

View File

@@ -22,8 +22,15 @@ for file in files:
for line in infile: for line in infile:
ml.write(" put '" + line.rstrip().replace("'", "''") + " ';\n") ml.write(" put '" + line.rstrip().replace("'", "''") + " ';\n")
ml.write("run;\n\n") ml.write("run;\n\n")
ml.write("/* ensure big enough lrecl to avoid lua compilation issues */\n")
ml.write("%local optval;\n")
ml.write("%let optval=%sysfunc(getoption(lrecl));\n")
ml.write("options lrecl=1024;\n\n")
ml.write("/* execute the lua code by using a .lua extension */\n")
ml.write("%inc \"%sysfunc(pathname(work))/" + ml.write("%inc \"%sysfunc(pathname(work))/" +
name + ".lua\" /source2;\n\n") name + ".lua\" /source2;\n\n")
ml.write("options lrecl=&optval;\n\n")
ml.write("%mend " + name + ";\n") ml.write("%mend " + name + ";\n")
ml.close() ml.close()

View File

@@ -39,6 +39,14 @@ data _null_;
put 'io.close(file) '; put 'io.close(file) ';
run; run;
/* ensure big enough lrecl to avoid lua compilation issues */
%local optval;
%let optval=%sysfunc(getoption(lrecl));
options lrecl=1024;
/* execute the lua code by using a .lua extension */
%inc "%sysfunc(pathname(work))/ml_gsubfile.lua" /source2; %inc "%sysfunc(pathname(work))/ml_gsubfile.lua" /source2;
options lrecl=&optval;
%mend ml_gsubfile; %mend ml_gsubfile;

View File

@@ -389,6 +389,14 @@ data _null_;
put '-- JSON.LUA ENDS HERE '; put '-- JSON.LUA ENDS HERE ';
run; run;
/* ensure big enough lrecl to avoid lua compilation issues */
%local optval;
%let optval=%sysfunc(getoption(lrecl));
options lrecl=1024;
/* execute the lua code by using a .lua extension */
%inc "%sysfunc(pathname(work))/ml_json.lua" /source2; %inc "%sysfunc(pathname(work))/ml_json.lua" /source2;
options lrecl=&optval;
%mend ml_json; %mend ml_json;