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

What are Dashboard reports?And significance of these in analysis?

1 Answers  


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

0 Answers  


What are the features of SAS?

0 Answers  


Does anybody has lastest SAS certification dumps,if anybody has please mail me at akshara_SAS@ymail.com Thanks Akshara

55 Answers  


What is the order of evaluation of the comparison operators: + - * /** ()?

3 Answers   Quintiles,






What is the registered Key word is sas????

2 Answers   TCS,


Differentiate between proc means and proc summary.

0 Answers  


what are the differences between proc report and proc tabulate?

3 Answers  


tell me about intnx, intcx functions?

4 Answers   CitiGroup,


Name types of category in which SAS Informats are placed?

0 Answers  


Explain the purpose of retain statement.

0 Answers  


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

0 Answers  


Categories