From 336743f2b4b360008fe9a5cd3f9e0bd45ad509bb Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Thu, 7 Jul 2022 23:24:24 +0000 Subject: [PATCH] fix: applying logic to BETWEEN as well as IN --- all.sas | 22 +++++++++++----------- base/mp_filtercheck.sas | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/all.sas b/all.sas index 5d2e8aa..3f1afc1 100644 --- a/all.sas +++ b/all.sas @@ -5973,18 +5973,18 @@ data &outds; output; end; else raw_value1=substr(raw_value,2,max(length(raw_value)-2,0)); - /* we now have a comma seperated list of values */ - if vtype='N' then do i=1 to countc(raw_value1, ',')+1; - tmp=scan(raw_value1,i,','); - if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do; - REASON_CD='Non Numeric value provided'; - putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ; - call symputx('reason_cd',reason_cd,'l'); - call symputx('nobs',_n_,'l'); - output; - end; - return; + end; + /* we now have a comma seperated list of values */ + if vtype='N' then do i=1 to countc(raw_value1, ',')+1; + tmp=scan(raw_value1,i,','); + if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do; + REASON_CD='Non Numeric value provided'; + putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ; + call symputx('reason_cd',reason_cd,'l'); + call symputx('nobs',_n_,'l'); + output; end; + return; end; end; else raw_value1=raw_value; diff --git a/base/mp_filtercheck.sas b/base/mp_filtercheck.sas index f10f0c7..30fb2ad 100644 --- a/base/mp_filtercheck.sas +++ b/base/mp_filtercheck.sas @@ -182,18 +182,18 @@ data &outds; output; end; else raw_value1=substr(raw_value,2,max(length(raw_value)-2,0)); - /* we now have a comma seperated list of values */ - if vtype='N' then do i=1 to countc(raw_value1, ',')+1; - tmp=scan(raw_value1,i,','); - if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do; - REASON_CD='Non Numeric value provided'; - putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ; - call symputx('reason_cd',reason_cd,'l'); - call symputx('nobs',_n_,'l'); - output; - end; - return; + end; + /* we now have a comma seperated list of values */ + if vtype='N' then do i=1 to countc(raw_value1, ',')+1; + tmp=scan(raw_value1,i,','); + if cats(tmp) ne '.' and input(tmp, ?? 8.) eq . then do; + REASON_CD='Non Numeric value provided'; + putlog REASON_CD= OPERATOR_NM= raw_value= raw_value1= ; + call symputx('reason_cd',reason_cd,'l'); + call symputx('nobs',_n_,'l'); + output; end; + return; end; end; else raw_value1=raw_value;