BookmarkSubscribeRSS Feed
ybz12003
Rhodochrosite | Level 12

Hello:

 

I would like to only PROC REPORT the non-missing value.  But it didn't work when I remove the missing option below.  How to fix it?

 

proc report data=test list headline headskip missing;
	column Class name component product;
	define Class /group width=150 left;
	define name /group width=150 left; 
	define component /group width=150 left;
	define product /group width=150 left; 
run;
5 REPLIES 5
Reeza
Super User

Add a WHERE statement to filter out what you want to exclude.

 


@ybz12003 wrote:

Hello:

 

I would like to only PROC REPORT the non-missing value.  But it didn't work when I remove the missing option below.  How to fix it?

 

proc report data=test list headline headskip missing;
	column Class name component product;
	define Class /group width=150 left;
	define name /group width=150 left; 
	define component /group width=150 left;
	define product /group width=150 left; 
run;

 

andreas_lds
Jade | Level 19

Sorry, i don't work for the NSA and can't look into your computer to see the data you used, and i - shame on me - even can't read your mind, so i don't have any idea what you expected to get from running proc report.

ybz12003
Rhodochrosite | Level 12

proc report data=test list headline headskip missing;
column Class name component product;
define Class /group width=150 left;
define name /group width=150 left;
define component /group width=150 left;
define product /group width=150 left;
run;

ybz12003
Rhodochrosite | Level 12

It would be annoying if I have to put where state in each define column cause every time I would like to change different variable names.

Reeza
Super User

@ybz12003 wrote:

It would be annoying if I have to put where state in each define column cause every time I would like to change different variable names.


Cleaning up the data before reporting is a pretty standard step and there are multiple ways to specify that you want all variables of a type to have non missing. Those approaches should be within your current skill set. 

 

You also haven't really shown what you want or have so we're going off your code so far, general questions get general answers. The drill hasn't changed 🙂

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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