1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-03 15:40:05 +00:00

fix: updating ms_runstp to accept parameters and file inputs. Explicitly setting lrecl everywhere. Adding lrecl=80 as default in testinit.sas

This commit is contained in:
munja
2022-04-28 21:06:28 +01:00
parent f2d80b3b63
commit b525b4171d
15 changed files with 196 additions and 58 deletions

View File

@@ -41,7 +41,7 @@ run;
/* multibyte string check */
filename tmp2 temp;
filename tmp2 temp lrecl=500;
data _null_;
file tmp2;
put "'╤', '╔', '╗', '═', '╧', '╚', '╝', '║', '╟', '─', '┼', '║', '╢', '│'";

View File

@@ -18,7 +18,7 @@
, cards_file= "%sysfunc(pathname(work))/cars.sas"
, showlog=NO
)
%inc "%sysfunc(pathname(work))/cars.sas"/source2;
%inc "%sysfunc(pathname(work))/cars.sas"/source2 lrecl=32767;
proc compare base=sashelp.cars compare=work.test;
quit;
@@ -48,7 +48,7 @@ run;
, append=
)
%inc "%sysfunc(pathname(work))/c2.sas"/source2;
%inc "%sysfunc(pathname(work))/c2.sas"/source2 lrecl=32767;
proc compare base=work.binarybase compare=work.binarycompare;
run;

View File

@@ -10,7 +10,7 @@
%macro gsubtest();
%if "%substr(&sysver,1,4)"="V.04" %then %do;
%if "%substr(&sysver.XX,1,4)"="V.04" %then %do;
%put %str(ERR)OR: Viya 4 does not support the IO library in lua;
%return;
%end;

View File

@@ -39,7 +39,7 @@ run;
%let str=%str(replacewith trailing spaces );
%let rep=%str( with more spaces );
data _null_;
file &test2;
file &test2 lrecl=500;
put 'blahblah';
put "blahblah&str.blah&str. replace &str.X";
put "blahbreplacewith&str.spacesahblah";
@@ -47,7 +47,7 @@ run;
%mp_replace(&test2, findvar=str, replacevar=rep)
data _null_;
infile &test2;
infile &test2 lrecl=500;
input;
if _n_=2 then call symputx('test2resulta',_infile_);
if _n_=3 then call symputx('test2resultb',_infile_);
@@ -69,7 +69,7 @@ run;
%let str=%str(replace.string.with.dots );
%let rep=%str( more.dots);
data _null_;
file &test3;
file &test3 lrecl=500;
put 'blahblah';
put "blahblah&str.blah&str. replace &str.X";
put "blahbreplacewith&str.spacesahblah";
@@ -77,7 +77,7 @@ run;
%mp_replace(&test3, findvar=str, replacevar=rep)
data _null_;
infile &test3;
infile &test3 lrecl=500;
input;
if _n_=2 then call symputx('test3resulta',_infile_);
if _n_=3 then call symputx('test3resultb',_infile_);

View File

@@ -50,3 +50,8 @@ run;
desc=Checking line was created,
outds=work.test_results
)
/* reset header so the test will pass */
%mfs_httpheader(Content-type,application/json)

View File

@@ -16,6 +16,7 @@ filename stpcode temp;
data _null_;
file stpcode;
put '%put hello world;';
put '%put _all_;';
run;
options mprint;

View File

@@ -5,6 +5,7 @@
<h4> SAS Macros </h4>
@li mf_uid.sas
@li mp_init.sas
@li ms_webout.sas
**/
@@ -14,12 +15,15 @@
/* set defaults */
%mp_init()
options lrecl=80;
%global _debug sasjs_mdebug;
%let sasjs_mdebug=0;
%macro loglevel();
%if "&_debug"="2477" or "&_debug"="fields,log,trace" %then %do;
%if "&_debug"="2477" or "&_debug"="fields,log,trace" or "&_debug"="131"
%then %do;
%put debug mode activated;
options mprint mprintnest;
%let sasjs_mdebug=1;

View File

@@ -9,7 +9,7 @@
%mp_assert(
iftrue=(&syscc=0),
desc=Checking final error condition,
desc=Checking final err condition,
outds=work.test_results
)