how can u import .csv file in to SAS?tell Syntax?
Answers were Sorted based on User's Feedback
Answer / enr
To create csv file,we have to open notepad.then ,declaring
the variables.then save the file.like enr.csv
SYNTAX: proc import datafile='external file'
out=<dataset name> dbms=csv replace;
getnames=yes;
proc print data=<dataset name>
run;
eg:proc import datafile='E:\enr.csv'
out=sai
dbms=csv replace;
getnames=yes;
proc print data=sai;
run;
Is This Answer Correct ? | 32 Yes | 2 No |
Answer / chiranjeevi
retreving the data we can use import&infile also.
import:
proc import datafile='external file'
out=<dataset name> dbms=csv replace;
getnames=yes;
proc print data=<dataset name>
run;
infile:
data code;
infile'C:\Documents and Settings\admin\Desktop\chiru.csv';
input<variable list>;
run;
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / shruthi
data DatasetName(drop = If any);
infile 'Path\CSVFileName.csv' delimiter = ',' ;
informat Var1 $2.;
informat Var2 anydtdte21.;
format Var1 $2.;
format Var2 anydtdte21.;
Input
Var1 $
Var2 $;
run;
Is This Answer Correct ? | 14 Yes | 7 No |
Answer / rajamohan
proc import datafile="externalfile location" out=library.datasetname dbms=csv repalce;
getname=yes;
run;
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / ganesh
by using proc import or through wizard select import data
from file menu and infile statement.
proc import datafile='c:\my .csv' out =gan;
run;
Is This Answer Correct ? | 7 Yes | 10 No |
Answer / dupe bassey
You can also use an
ods html file ='c:\user\new.xls';
proc print data=new;
run;
ods html close;
something along those lines
Is This Answer Correct ? | 1 Yes | 19 No |
What are Dashboard reports?And significance of these in analysis?
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
What are the features of SAS?
Does anybody has lastest SAS certification dumps,if anybody has please mail me at akshara_SAS@ymail.com Thanks Akshara
What is the order of evaluation of the comparison operators: + - * /** ()?
What is the registered Key word is sas????
Differentiate between proc means and proc summary.
what are the differences between proc report and proc tabulate?
tell me about intnx, intcx functions?
Name types of category in which SAS Informats are placed?
Explain the purpose of retain statement.
Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro