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

Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com

0 Answers  


create macros---you have 365 number of data and you need to merge it throw the macros,,,,,, data file1; input a @@; cards; 1 2 3 4 ; run; data file2; input a @@; cards; 5 6 7 8 ; run; data file3; input a @@; cards; 9 10 11 12 ; run;data file4; input a @@; cards; 13 14 15 16 ; run;

6 Answers   WNS,


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

3 Answers   Quintiles,


I need to find the numeric field which contains blank in between..Ex:123 456...there is blank in between the 123 456..I need to know if there is any SAS function to find a field.. Please suggest...

5 Answers   TCS,


what other sas products have you used and consider yourself proficient in using? : Sas programming

0 Answers  






what is the use of sas management console? : Sas-di

0 Answers  


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

0 Answers  


What type of tables you are using in YOUR reporting..???

2 Answers   GSK GlaxoSmithKline,


what is enterprise guide? What is the use of it? : Sas programming

0 Answers  


How to create list output for cross-tabulations in proc freq?

0 Answers  


/*i have the following dataset.*/ data score; input marks ; datalines; 10 20 30 40 50 60 70 80 90 100 ; run; Now i should get the result as sum of 1 to 5 i.e(10+20+30+40+50)=150 and 2 to 6 i.e(20+30+40+50+60)=200 and 3 to 7 i.e(30+40+50+60+70)=250 and so on. how to get it. thanks in advance

2 Answers   Eval Source,


Explain input and put function?

0 Answers  


Categories