mirror of
https://github.com/sasjs/core.git
synced 2026-01-15 12:30:06 +00:00
fix: tests for char support, #368
This commit is contained in:
@@ -272,9 +272,35 @@ data &outds;
|
|||||||
|
|
||||||
/* output records that contain values other than digits and spaces */
|
/* output records that contain values other than digits and spaces */
|
||||||
if notdigit(compress(raw_value3,' '))>0 then do;
|
if notdigit(compress(raw_value3,' '))>0 then do;
|
||||||
|
if vtype='C' and subpad(upcase(raw_value),1,1) in (
|
||||||
|
'A','B','C','D','E','F','G','H','I','J','K','L','M','N'
|
||||||
|
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z','_'
|
||||||
|
)
|
||||||
|
then do;
|
||||||
|
/* check if the raw_value contains a valid variable NAME */
|
||||||
|
vnum=varnum(dsid,subpad(raw_value,1,32));
|
||||||
|
if vnum>0 then do;
|
||||||
|
/* now we can get the type */
|
||||||
|
vtype2=vartype(dsid,vnum);
|
||||||
|
/* check type matches */
|
||||||
|
if vtype2=vtype then do;
|
||||||
|
/* valid target var - exit loop */
|
||||||
|
return;
|
||||||
|
end;
|
||||||
|
else do;
|
||||||
|
REASON_CD=cats("Compared Char Type (",vtype2,") is not (",vtype,")");
|
||||||
|
putlog REASON_CD= dsid=;
|
||||||
|
call symputx('reason_cd',reason_cd,'l');
|
||||||
|
call symputx('nobs',_n_,'l');
|
||||||
|
output;
|
||||||
|
goto endstep;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
putlog raw_value3= $hex32.;
|
putlog raw_value3= $hex32.;
|
||||||
REASON_CD=cats('Invalid RAW_VALUE:',raw_value);
|
REASON_CD=cats('Invalid RAW_VALUE:',raw_value);
|
||||||
putlog REASON_CD= raw_value= raw_value1= raw_value2= raw_value3=;
|
putlog (_all_)(=);
|
||||||
call symputx('reason_cd',reason_cd,'l');
|
call symputx('reason_cd',reason_cd,'l');
|
||||||
call symputx('nobs',_n_,'l');
|
call symputx('nobs',_n_,'l');
|
||||||
output;
|
output;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ AND,AND,1,age,IN,"(.A)"
|
|||||||
AND,AND,1,AGE,=,AGE
|
AND,AND,1,AGE,=,AGE
|
||||||
AND,AND,1,AGE,<,Weight
|
AND,AND,1,AGE,<,Weight
|
||||||
AND,AND,1,AGE,BETWEEN,"HEIGHT AND WEIGHT"
|
AND,AND,1,AGE,BETWEEN,"HEIGHT AND WEIGHT"
|
||||||
|
AND,OR,2,Name,=,name
|
||||||
;;;;
|
;;;;
|
||||||
run;
|
run;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user