BookmarkSubscribeRSS Feed
Inp
Obsidian | Level 7 Inp
Obsidian | Level 7
Hi Dear,
Here is my coding. I am expecting s value of var x and missing value of y in the report. When I run the below codiing , I get value 'a' of x but the value 's' of x. can you please let me if there any options that I can put to get this value in my proc report. I am using SAS 9.2 in Windows XP

data temp;
input @1 x $1. @2 y $1. @3 z 1.;
cards;
ab1
ab2
ac1
ac2
s 3
;
run;
options missing;
proc report data=temp nowd;
column x y z;
define x / order;
define y / order;
define z / analysis;
run;



here is my output;



x y z
a b 1
2
c 1
2

Thanks for your help in advance.


Inp
3 REPLIES 3
deleted_user
Not applicable
How about...

proc report data=temp nowd missing;
column x y z;
define x / order;
define y / order;
define z / analysis;
run;
Cynthia_sas
Diamond | Level 26
Hi:
It seems that you are confusing the SAS System Option MISSING with a different option. Your syntax should be showing you an ERROR message in the SAS log:
[pre]
2944 options missing;
-------
26
ERROR 26-12: Expect an equal sign and value to follow SAS option MISSING.
[/pre]

What SAS means by the error message is that the correct syntax for the option is:
OPTIONS MISSING=' ';

which would replace the normal . (period) for missing numeric values with a blank or space character.

To have PROC REPORT reveal the missing values of GROUP or ORDER variables, you can use the MISSING option either on the PROC REPORT statement or the DEFINE statement:
[pre]
proc report data=.... nowd missing;
OR
define varname / ORDER missing;
[/pre]

The PROC REPORT MISSING option is working with missing GROUP or ORDER variables -- not missing numeric variable values, such as those used for summarizing (which would be affected by the system option).

cynthia
Inp
Obsidian | Level 7 Inp
Obsidian | Level 7
thanks a lot Cynthia and Mike,
It helps a lot.

Thank again.

regards

Inp

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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