That's not making sense. Please post your proc contents.
93
var1 | Num | 8 |
# Variable Type Len Format Informat Label 6
var2 | Char | 4 |
No formats?
What does each one of those variables look like - to make sure?
var1 0234 0389 0423
var2 234 389 423
data one;
input var1;
cards;
123
456
789
234
;
run;
data two;
input var2 $;
cards;
0123
0456
0789
234
;
run;
data two_formatted;
set two;
var1=input(var2, best12.);
run;
proc sort data=one; by var1; run;
proc sort data=two_formatted; by var1; run;
data merged;
merge one two_formatted;
by var1;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.