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
;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.