BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
strik11
Calcite | Level 5
libname ashish "/folders/myfolders";
proc import datafile="/folders/myfolders/Car_sales.csv" out=Car_sales dbms=csv replace;getnames=yes;
proc copy in=work out=ashish;
select Car_sales;
proc print data=ashish.Car_sales;
IF Price_in_thousands='.' then delete;
run;


Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

If you want to modify the data set you need to use a data step. 

data filtered;
set ashish.car_sales;
where not missing(price_in_thousands);
run;

 

If you want to filter the results to display in Proc print then use a where. 

 

Where not missing(price_in_thousands );

 

 

 

 

View solution in original post

2 REPLIES 2
ballardw
Super User

Proc print does not allow If or delete.

 

To show the records where a specific condition is needed use a WHERE clause:

 

WHERE Price_in_Thousands ne . ;

 

Reeza
Super User

If you want to modify the data set you need to use a data step. 

data filtered;
set ashish.car_sales;
where not missing(price_in_thousands);
run;

 

If you want to filter the results to display in Proc print then use a where. 

 

Where not missing(price_in_thousands );

 

 

 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2470 views
  • 2 likes
  • 3 in conversation