What SAS statements would you code to read an external raw
data file to a DATA step?
Answers were Sorted based on User's Feedback
Answer / madhu
infile and input statements.
ex:
data m;
infile 'c:\m.txt';
input :xxxx;
run;
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / sankar
use INFLE statement
data dsname;
infile 'path of file' <options>;
input var1 var2................varn;
run;
options like dsd dlm missover firstobs obs ..etc
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / pramod
Using import wizard in file menu also we read an external
raw data file to a data step
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / sastechies
We use SAS statements –
FILENAME – to specify the location of the file
INFILE - Identifies an external file to read with an INPUT
statement
INPUT – to specify the variables that the data is
identified with.
Read more: http://sastechies.blogspot.com/2009/11/sas-
interview-questions.html
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sankar
using proc import procedure
synatax :for text file
proc import datafile='path' out=datasetname
dbms=dlm;
delimiter='specific delimiter';
run;
Is This Answer Correct ? | 1 Yes | 2 No |
There are 200 observations in a dataset, i want to pull out the observation no's 100, 150,180,190 by using Proc SQL? How you can get it?
Compare sas with other data analytics tools.
How would you identify a macro variable? : sas-macro
what is _error_?
2 Answers Axis Bank, Cognizant, JPMorgan Chase,
how to import HTML files into SAS datasets?
what is snowflake schema? : Sas-di
what is the difference between proc report and proc format?
name several ways to achieve efficiency in your program? : Sas programming
Are you familiar with special input delimiters? How are they used?
what versions of sas have you used (on which platforms)? : Sas programming
Why do we use QUIT commmand for proc datasets and proc sql ???
Name statements that are execution only.