DATA Step, Macro, Functions and more

How to edit table value in Sas

Reply
New Contributor
Posts: 2

How to edit table value in Sas

SAS.JPG

 

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

Super User
Posts: 5,254

Re: How to edit table value in Sas

Please, take the free online programming course.
Data never sleeps
SAS Super FREQ
Posts: 8,740

Re: How to edit table value in Sas

[ Edited ]

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

Ask a Question
Discussion stats
  • 2 replies
  • 201 views
  • 0 likes
  • 3 in conversation