how can u import .csv file in to SAS?tell Syntax?

Answers were Sorted based on User's Feedback



how can u import .csv file in to SAS?tell Syntax?..

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

how can u import .csv file in to SAS?tell Syntax?..

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

how can u import .csv file in to SAS?tell Syntax?..

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

how can u import .csv file in to SAS?tell Syntax?..

Answer / swaroop

proc import datafile="f:\x.csv"
out= x dbms=csv;
run;
proc print;
run;

Is This Answer Correct ?    3 Yes 1 No

how can u import .csv file in to SAS?tell Syntax?..

Answer / rajamohan

proc import datafile="externalfile location" out=library.datasetname dbms=csv repalce;
getname=yes;
run;

Is This Answer Correct ?    0 Yes 2 No

how can u import .csv file in to SAS?tell Syntax?..

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

how can u import .csv file in to SAS?tell Syntax?..

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

Post New Answer

More SAS Interview Questions

why is sas considered self-documenting? : Sas programming

0 Answers  


In the following DATA step, what is needed for ‘fraction’ to print to the log? data _null_; x=1/3; if x=.3333 then put ‘fraction’; run;

1 Answers  


what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?

2 Answers   Wockhardt,


how do i get last 10obs from a dataset when we don't know about the number of obsevations in that dataset?

7 Answers   TCS,


What do you understand by the term Normal Distribution?

0 Answers  






For clinical entire study how many tables will create approx?

0 Answers   TCS,


How do you convert basic cube to transaction cube and transaction cube to basic cube?

0 Answers  


The below code we are using for creating more than one macro variables in proc sql using into clause. How we can use same code to create macro variables vara, varb, varc instead of var1, var2, var3.? proc sql noprint; select count(distinct(patient)) into :var1 - :var3 from dataset1 group by trtreg1c ; quit;

1 Answers   Accenture,


how do the in= variables improve the capability of a merge? : Sas programming

0 Answers  


what are the benefits of data integration? : Sas-di

0 Answers  


what is the purpose of _error_? : Sas programming

0 Answers  


what is _error_?

2 Answers   Axis Bank, Cognizant, JPMorgan Chase,


Categories