BookmarkSubscribeRSS Feed
Jaheuk
Obsidian | Level 7
when printing a "missing" you can choose the character that is printed i.e. 0
is the other way (without data step programming) also possible: when een var=0 treat it as a missing??

H.
3 REPLIES 3
polingjw
Quartz | Level 8
If I understand your question correctly, you could just apply a user defined format. For example...

data temp;
input var1;
datalines;
5
0
3
0
;
run;

proc format;
value num 0 = '.';
run;

proc print data=temp;
format var1 num.;
run;
Jaheuk
Obsidian | Level 7
hi poling,
that's what i first did:
proc format ;
VALUE ZERO
0 = ' '
other = [commax15.]
;
RUN;

but then i have another problem 😉

look at: http://support.sas.com/forums/message.jspa?messageID=42147


H.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Again - where is the SAS code/program that references the FORMAT you created? You have not shared that information - and it would be best served by pasting the SAS log into your post-reply to show a DATA step with a PUT statement to demonstrate that the format is not being accessed.

Scott Barry
SBBWorks, Inc.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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