When you use PUT to create a character variable from numeric the results by default are right justified so you end up with leading spaces for values less than 8, in your example, digits.
Use the -L justification option: put(var, 8 -L) to create a left justified variable.
While it did change the format to character, the join won't produce results
There could be a lot of reasons for this.
Show us examples of typical values in each of the two variables. Let's say we need to see a dozen example. Show us the code you used.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.