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 |
in the flow of data step processing, what is the first action in a typical data step? : Sas programming
I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a different functionality. In my program I use bot these data sets. How do I specify which Age variable I want to use?
What Proc glm does?
What other SAS features do you use for error trapping and data validation?
do you need to know if there are any missing values? : Sas programming
what is change analysis in sas di ? : Sas-di
how to import HTML files into SAS datasets?
How to limit decimal places for variable using proc means?
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
is there any differnce between proc means and proc summary?
If you set a label in the data step and call a proc freq on the data, how do you display the data without the labels and just the variables.
how can you improve the performance of a query, If it is excuting very slowly?