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

fix: removing warning from mf_wordsinstr1xxx macros, compiling all.sas, fixing MOD changes in mp_stackdiffs.sas

This commit is contained in:
munja
2022-01-25 00:04:54 +01:00
parent 6224844915
commit bfe4b1ec8b
4 changed files with 1008 additions and 313 deletions

1297
all.sas

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,6 @@
%local count_base count_extr i i2 extr_word base_word match outvar; %local count_base count_extr i i2 extr_word base_word match outvar;
%if %length(&str1)=0 or %length(&str2)=0 %then %do; %if %length(&str1)=0 or %length(&str2)=0 %then %do;
%put %str(WARN)ING: empty string provided!;
%put base string (str1)= &str1; %put base string (str1)= &str1;
%put compare string (str2) = &str2; %put compare string (str2) = &str2;
%return; %return;

View File

@@ -3,6 +3,9 @@
@brief Returns words that are in string 1 but not in string 2 @brief Returns words that are in string 1 but not in string 2
@details Compares two space separated strings and returns the words that are @details Compares two space separated strings and returns the words that are
in the first but not in the second. in the first but not in the second.
Note - case sensitive!
Usage: Usage:
%let x= %mf_wordsInStr1ButNotStr2( %let x= %mf_wordsInStr1ButNotStr2(
@@ -13,10 +16,8 @@
returns: returns:
> sss bram boo > sss bram boo
@param str1= string containing words to extract @param [in] str1= string containing words to extract
@param str2= used to compare with the extract string @param [in] str2= used to compare with the extract string
@warning CASE SENSITIVE!
@version 9.2 @version 9.2
@author Allan Bowe @author Allan Bowe
@@ -30,7 +31,6 @@
%local count_base count_extr i i2 extr_word base_word match outvar; %local count_base count_extr i i2 extr_word base_word match outvar;
%if %length(&str1)=0 or %length(&str2)=0 %then %do; %if %length(&str1)=0 or %length(&str2)=0 %then %do;
%put %str(WARN)ING: empty string provided!;
%put base string (str1)= &str1; %put base string (str1)= &str1;
%put compare string (str2) = &str2; %put compare string (str2) = &str2;
%return; %return;

View File

@@ -560,9 +560,16 @@ select distinct tgtvar_nm into: missvars separated by ' '
set &auditlibds(where=(move_type='M')) end=lastobs; set &auditlibds(where=(move_type='M')) end=lastobs;
by key_hash; by key_hash;
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 put "update &outmod set " / ' '@@;
comma=ifc(first.key_hash=0,',',' '); else put ' ,'@@;
if tgtvar_type='C' then put ' ' comma TGTVAR_NM '=trim("' NEWVAL_CHAR '")'; if is_diff=1 then do;
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;
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;";
run; run;