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
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

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