Since you did not provide a type for b in it's first use [cat(b,'1')], SAS assumed it was numeric. Numeric variables are legitimate arguments to the CAT function. The documentation states that it does not provide an error or warning on conversion.
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.