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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 799 views
  • 0 likes
  • 3 in conversation