I have .CSV file with 2000 columns.Some columns have blank data.Now mr requirement is:
(1)How to import this file into SAS,while importing into SAS i need to drop the columns with blank data?
(2)How to import only column1,column2,column150,column256?
You ou need to import all and drop the columns you don't want in a second step.
Easiest:
Use proc import. The procedure will generate a datastep to read the data. You can either Recall the code into the editor (F4 key by default, command Recall, or copy and paste from the log).
Edit the data step to have (keep= <list the names of the variables you want to keep>) data set option .
data want (keep=column1 column2 column150 column256);
<remainder of generated code>
If you can get you data in fixed column then you can read directly by specifying the columns to read.
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.
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.