Dear SAS community,
since days I am fighting with the following problem, and growing desperate...!
Simply, I do just intend to check a CHAR column col1 for whether its value is missing - trivial for numeric values, but - at least for me - the promise it's the same for characters doesn't seem to come true.
After anonymizing the namings, my code is about (which for numeric columns works perfectly well):
= 8< ======================================================================
data Out_Tab1;
set Input_Tab1;
missing_z=missing( col1);
keep missing_z col1 ;
run;
proc summary data= Out_Tab1;
by missing_z;
var col1;
output out=Out_Tab2 sum=;
run;
= 8< ======================================================================
Once trying to do the same on a character column, however (having tried out uncounted imaginable variations), I regularly receive an error message like this:
= 8< ======================================================================
...
ERROR: Variable col1 in list does not match type prescribed for this list.
WARNING: The data set Out_Tab2 may be incomplete. When this step was stopped there were 0 observations and
WARNING: Data set Out_Tab2 was not replaced because this step was stopped.
ERROR: SAS ended due to errors.
ERROR: Errors printed on pages 9,10.
...
= 8< ======================================================================
What needs to be done, that I do not see?? And, where to find documentation on this that is neither terse nor cryptic??
Thank you so much in advance - I really need your help, Teona
many thanks for your support.
It works!
Best regards
Teona
Hi,
The Var requires numeric analysis variables. in your case, you are saying COL1 is a Character variable!
Hope this helps,
Ahmed
thank you very much for your advice. I really miss understanding.
Thanks for the link!
Best regards
Teona
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.