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;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.