BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
superman1
Fluorite | Level 6

Hello 

 

I am recoding some values with proc format statement and I want to recode the "blanks" or the missing data to "Missing" ? How would I do that? 

 

I already tried this and it didnt work. it still says "Frequency missing= 5" in my proc freq statement and does not recode my missing data. 

Proc format library=example;

value $catjt    '.'= 'Missing'; 
run; 

"proc freq statement"

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Try this to get a Missing label:

Proc format;
  value $catjt 
' ' = 'Missing'; run;

View solution in original post

6 REPLIES 6
PGStats
Opal | Level 21

No need to recode the missing values.Try using option MISSING on the TABLES statement instead.

PG
superman1
Fluorite | Level 6
So I would code like this or how so?

Proc freq data=Example.mydata;
tables cat missing ;
format cat $catjt.;
run;
superman1
Fluorite | Level 6
also my assignment requires to label missing values so I need to have it say "missing" for the missing values
SASKiwi
PROC Star

This is the correct syntax - you can look it up yourself in the documentation. If you select a statement in the SAS editor with your mouse and press F1 then you should get syntax help. 

Proc freq data=Example.mydata;
tables cat / missing ;
format cat $catjt.;
run;
SASKiwi
PROC Star

Try this to get a Missing label:

Proc format;
  value $catjt 
' ' = 'Missing'; run;
superman1
Fluorite | Level 6

Thank you that worked along with the proc freq comment!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 867 views
  • 2 likes
  • 3 in conversation