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 |
What statement do you code to tell SAS that it is to write to an external file? What statement do you code to write the record to the file?
what is the difference between sas and other datawarehousing languages?what are the advantages of sas over them?
What are the difficulties u faced while doing vital signs table or dataset?
To what type of programms have you used scratch macros?
how would you determine the number of missing or nonmissing values in computations? : Sas programming
For what purpose would you use the RETAIN statement?
for what purpose would you use the retain statement? : Sas programming
How do you test for missing values?
how to delete the duplicates by using proc sql?
Describe the function and untility of the most difficult SAS macro that you have written.
wt is a-z and a--z?
How would you include common or reuse code to be processed along with your statements?