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

fix: comma placement in mp_stackdiffs.sas

This commit is contained in:
munja
2022-01-25 00:49:26 +01:00
parent c160b5058b
commit 11d073c10a
2 changed files with 22 additions and 4 deletions

13
all.sas
View File

@@ -10270,16 +10270,25 @@ select distinct tgtvar_nm into: missvars separated by ' '
file &fref;
set &auditlibds(where=(move_type='M')) end=lastobs;
by key_hash;
retain comma 'N';
if _n_=1 then put 'proc sql;';
if first.key_hash then put "update &outmod set " / ' '@@;
if first.key_hash then do;
comma='N';
put "update &outmod set " @@;
end;
if is_diff=1 then do;
if not first.key_hash then put ' ,'@@;
if comma='N' then do;
put ' '@@;
comma='Y';
end;
else put ' ,'@@;
if tgtvar_type='C' then do;
length qstr $32767;
qstr=quote(trim(NEWVAL_CHAR));
put tgtvar_nm '=' qstr;
end;
else put tgtvar_nm '=' newval_num;
if comma=' ' then comma=' ,';
end;
if last.key_hash then put ' where key_hash=trim("' key_hash '");';
if lastobs then put "alter table &outmod drop key_hash;";