Hi All,
I'm using proc import to read in my excel data to SAS. I have many variables and would like to drop variables with names starting with raw_.
How can I achieve to allow limited variables based on the common prefix of variable names in the proc import or in data step using the data imported if doing this in proc import was impossible?
Thank you very much for your time.
Cruise
proc import
datafile="mydata_Jan11.xlsx"
out=ipd
dbms=xlsx replace;
getnames=yes;
run;
proc import
datafile="mydata_Jan11.xlsx"
out=ipd(drop=raw_:)
dbms=xlsx replace;
getnames=yes;
run;
drop=raw_:
proc import
datafile="mydata_Jan11.xlsx"
out=ipd(drop=raw_:)
dbms=xlsx replace;
getnames=yes;
run;
drop=raw_:
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.