mirror of
https://github.com/sasjs/core.git
synced 2026-01-16 04:50:05 +00:00
fix: comma placement in mp_stackdiffs.sas
This commit is contained in:
13
all.sas
13
all.sas
@@ -10270,16 +10270,25 @@ select distinct tgtvar_nm into: missvars separated by ' '
|
|||||||
file &fref;
|
file &fref;
|
||||||
set &auditlibds(where=(move_type='M')) end=lastobs;
|
set &auditlibds(where=(move_type='M')) end=lastobs;
|
||||||
by key_hash;
|
by key_hash;
|
||||||
|
retain comma 'N';
|
||||||
if _n_=1 then put 'proc sql;';
|
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 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;
|
if tgtvar_type='C' then do;
|
||||||
length qstr $32767;
|
length qstr $32767;
|
||||||
qstr=quote(trim(NEWVAL_CHAR));
|
qstr=quote(trim(NEWVAL_CHAR));
|
||||||
put tgtvar_nm '=' qstr;
|
put tgtvar_nm '=' qstr;
|
||||||
end;
|
end;
|
||||||
else put tgtvar_nm '=' newval_num;
|
else put tgtvar_nm '=' newval_num;
|
||||||
|
if comma=' ' then comma=' ,';
|
||||||
end;
|
end;
|
||||||
if last.key_hash then put ' where key_hash=trim("' key_hash '");';
|
if last.key_hash then put ' where key_hash=trim("' key_hash '");';
|
||||||
if lastobs then put "alter table &outmod drop key_hash;";
|
if lastobs then put "alter table &outmod drop key_hash;";
|
||||||
|
|||||||
@@ -559,16 +559,25 @@ select distinct tgtvar_nm into: missvars separated by ' '
|
|||||||
file &fref;
|
file &fref;
|
||||||
set &auditlibds(where=(move_type='M')) end=lastobs;
|
set &auditlibds(where=(move_type='M')) end=lastobs;
|
||||||
by key_hash;
|
by key_hash;
|
||||||
|
retain comma 'N';
|
||||||
if _n_=1 then put 'proc sql;';
|
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 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;
|
if tgtvar_type='C' then do;
|
||||||
length qstr $32767;
|
length qstr $32767;
|
||||||
qstr=quote(trim(NEWVAL_CHAR));
|
qstr=quote(trim(NEWVAL_CHAR));
|
||||||
put tgtvar_nm '=' qstr;
|
put tgtvar_nm '=' qstr;
|
||||||
end;
|
end;
|
||||||
else put tgtvar_nm '=' newval_num;
|
else put tgtvar_nm '=' newval_num;
|
||||||
|
if comma=' ' then comma=' ,';
|
||||||
end;
|
end;
|
||||||
if last.key_hash then put ' where key_hash=trim("' key_hash '");';
|
if last.key_hash then put ' where key_hash=trim("' key_hash '");';
|
||||||
if lastobs then put "alter table &outmod drop key_hash;";
|
if lastobs then put "alter table &outmod drop key_hash;";
|
||||||
|
|||||||
Reference in New Issue
Block a user