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
Diamond | Level 26

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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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