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

fix: applying logic to BETWEEN as well as IN

This commit is contained in:
Allan Bowe
2022-07-07 23:24:24 +00:00
parent 6e32eb3bd6
commit 336743f2b4
2 changed files with 22 additions and 22 deletions

22
all.sas
View File

@@ -5973,18 +5973,18 @@ data &outds;
output; output;
end; end;
else raw_value1=substr(raw_value,2,max(length(raw_value)-2,0)); else raw_value1=substr(raw_value,2,max(length(raw_value)-2,0));
/* we now have a comma seperated list of values */ end;
if vtype='N' then do i=1 to countc(raw_value1, ',')+1; /* we now have a comma seperated list of values */
tmp=scan(raw_value1,i,','); if vtype='N' then do i=1 to countc(raw_value1, ',')+1;
if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do; tmp=scan(raw_value1,i,',');
REASON_CD='Non Numeric value provided'; if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do;
putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ; REASON_CD='Non Numeric value provided';
call symputx('reason_cd',reason_cd,'l'); putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ;
call symputx('nobs',_n_,'l'); call symputx('reason_cd',reason_cd,'l');
output; call symputx('nobs',_n_,'l');
end; output;
return;
end; end;
return;
end; end;
end; end;
else raw_value1=raw_value; else raw_value1=raw_value;

View File

@@ -182,18 +182,18 @@ data &outds;
output; output;
end; end;
else raw_value1=substr(raw_value,2,max(length(raw_value)-2,0)); else raw_value1=substr(raw_value,2,max(length(raw_value)-2,0));
/* we now have a comma seperated list of values */ end;
if vtype='N' then do i=1 to countc(raw_value1, ',')+1; /* we now have a comma seperated list of values */
tmp=scan(raw_value1,i,','); if vtype='N' then do i=1 to countc(raw_value1, ',')+1;
if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do; tmp=scan(raw_value1,i,',');
REASON_CD='Non Numeric value provided'; if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do;
putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ; REASON_CD='Non Numeric value provided';
call symputx('reason_cd',reason_cd,'l'); putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ;
call symputx('nobs',_n_,'l'); call symputx('reason_cd',reason_cd,'l');
output; call symputx('nobs',_n_,'l');
end; output;
return;
end; end;
return;
end; end;
end; end;
else raw_value1=raw_value; else raw_value1=raw_value;