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 is the SAS/ACCESS and SAS/CONNECT?
9 Answers Accenture, iFlex, TCS,
how to read raw data in sas. Do it manually and throw the programming.
what is the difference between SET and MERGE?
How to include or exclude specific variables in a data set?
Code a PROC SORT on a data set containing State, District and County as the primary variables, along with several numeric variables.
Name any two sas spawners? : sas-grid-administration
Dear all, proc means data=dsn noprint completetypes; class trtmntgroup /preloadfmt; output out=tot n=n; format trtmntgroup trtf. ; by vstgrp descending severity; run; This is the code I used for AE table. I got the values without giving the variable ‘trtmntgroup(numeric)’ in var statement. And if I give the var statement for that variable i’m getting the same values.How is that possible? What is the difference between class and var statement? Could any one explain me how does proc means work at the back end. And what is the difference between _freq_ value and N value in proc means. Thanks and regards, Rajesh.
what is intially documentation for a sas programmer?
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di
how do we get duplicate observations in a separate dataset?
I have a dataset concat having variable a b & c. How to rename a b to e & f?
How does proc sql work?