That sounds strange. You added ?? to get rid of the note, and now you're unhappy because you're not getting the note?
While you're on the road to correcting the problem, consider what the result should be for each of these inputs:
MINE20
3.14
A1B2C3
-40
WD10-40
Clarifying your objective would help in developing the right program.
See if this gives you a likely clue:
If ~missing(compress(mixed,,"kd")) then Number=input(name,best.);
I think that you meant to use mixed in both places.
If not then you need to provide values for NAME.
If the variable NAME has not been defined prior to this statement then it was created as NUMERIC, with missing values. Then the missing numeric value was attempted to turn into character for use by the INPUT function.
Use the NOTDIGIT function. Your condition will return true if there's any digit in the string.
data want;
input mixed $10.;
if notdigit(mixed) = 0 then number = input(mixed,best.);
datalines;
Johnroy
17533
45688
BET32L
MINE20
56
12
ALPHA65
;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.