hai
i am having sas 8.2 version
i am facing some problems when importing data into sas
options nosymbolgen noMLOGIC;
filename read "c:\abc.csv";
data new1;
infile read MISSOVER DSD firstobs=2 LS=32767;
informat
var1 $CHAR40.;
input
var1
var2;
format
var1 $CHAR40.;
run;
data new2;
set new1;
label var1='start date of dosage date(yymmdd10.)';
run;
first i imported data by using var1,var2,.........................
after getting data into sas i used label for getting column names more than 32 chars ,some specail chars
Is there any way to get column names directly from raw files into sas?
i used options validvarname=any but it is not working in sas 8.2
I am not sure whether the following code could be working ,since I can't test it.
options validvarname=any;
proc import datafile='c:\abc.csv' out=want dbms=csv replace;getnames=yes;run;
thanku ksharp
proc import datafile='c:\abc.csv' out=want dbms=csv replace;getnames=yes firstobs=8;run;
i want data from 8 th row
but it is getting error......................
sasemp999 wrote:
thanku ksharp
proc import datafile='c:\abc.csv' out=want dbms=csv replace;getnames=yes firstobs=8;run;
i want data from 8 th row
but it is getting error......................
Try datarow=8 instead of firstobs.
proc import datafile='c:\abc.csv' out=want dbms=csv replace;
getnames=yes;
datarow=8;
run;
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.