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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.