i want to change values of hlthfood variable and set all 0 to no
Hi:
I would recommend a user-defined format because you cannot suddenly turn a numeric variable into a character variable. But you can use a format to have the number 0 be displayed as No on any report output.
As Linus suggests, taking Programming 1 would help you with this task. In Programming 1, which is free, as self-paced e-learning, user-defined formats are covered in Lesson 5, entitled "Formatting Data Values" and in that lesson, there is a demo that covers "Specifying a User-Defined Format for a Numeric Variable".
cynthia
ps you can activate the free Programming 1 class by setting up a SAS Profile and clicking Start Now on this page next to Programming 1: https://support.sas.com/edu/elearning.html?ctry=us&productType=library
cynthia
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.