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 use of %include statement?
IS SAS COMPILER OR INTERPRETER? EXPLAIN?
3 Answers Aon Hewitt, HSBC, SCL, TCS,
How to read an input file in sas?
How the Excel file enter into the SAS environment without Code of Infile & Import procs,if i have no file Conversion?
Below is the table. Required to be output should be the highest number of each student_id. Example. Student_id Subject Marks 1 Hindi 86 2 Hindi 70 3 English 80 . Calculate sum and average marks for each group of student_id Example. Student_id Subject Marks Total Marks Average 1 English 40 181 60.33333 2 English 67 196 65.33333 3 English 80 160 53.33333 PLEASE PROVIDE THE CODE OF ABOVE PROBLEMS
in which companies SAS openings are there? List of companies using SAS technology.
how do we mail reports from SAS environment to our team leader
how many types prompting framework can be broken down to? : Sas-bi
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
What is the Program Data Vector (PDV)? What are its functions?
Explain the difference between informat and format with an example.
What happens in the following code, if u type 8 instead of *? proc sql noprint; create table abc as select 8 from lib.abc; quit;