13%
if "%substr(&sysver.XX,1,4)"=
"V.04" %then %
do;
14 %put %str(ERR)OR: Viya 4 does not support the IO library in lua;
22%let file=%sysfunc(pathname(work))/file.txt;
29%mp_gsubfile(file=&file, patternvar=pat, replacevar=str)
33 call symputx(
'str1',_infile_);
37 iftrue=(
"&str1"=
"&str"),
38 desc=Check that simple replacement was successful,
39 outds=work.test_results
45%global str2 strcheck2 strcheck2b;
46%let file2=%sysfunc(pathname(work))/file2.txt;
55%mp_gsubfile(file=&file2, patternvar=pat2, replacevar=str2)
59 if _n_=2 then call symputx(
'strcheck2',_infile_);
60 if _n_=3 then call symputx(
'strcheck2b',_infile_);
65 iftrue=(
"&strcheck2"=
"&str2"),
66 desc=Check that multi line replacement was successful (line2),
67 outds=work.test_results
70 iftrue=(
"&strcheck2b"=
"&str2"),
71 desc=Check that multi line replacement was successful (line3),
72 outds=work.test_results