BookmarkSubscribeRSS Feed
strik11
Calcite | Level 5

SAS.JPG

 

i want  to change values of hlthfood variable and set all 0 to no

2 REPLIES 2
LinusH
Tourmaline | Level 20
Please, take the free online programming course.
Data never sleeps
Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 790 views
  • 0 likes
  • 3 in conversation