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 / mohan reddy
INFILE AND INPUT STATEMENTS
EX;
DATA EMP;
INFILE 'E:\ABC\EMPLOYEE.TXT' MISSOVER;
INPUT VAR1 VAR 2....VARN;
RUN;
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / god
using infile and input statements must it is possible to
clean and get the data into in u r environment....
some body says using proc import using proc import it is not
possible to clean and get the data in u r
environment..................it will take as it is
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / name is no need
we can import the an external file in three ways to a sas
data set
1.libname libref<location of the sas data set library>;
filname fileref<path of the raw data file>;
data <data set name>;
infile <fileref>;
input <variable declarations>;
run;
2.proc import
3.by using the proc import option in the sas wizard of file
menu option.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / g.jyotshna
whenever the data in .txt .dat format we can directly us
infile and input statements.
but incase of .xls
it is not possible to read excel data file directly through
infile input.
we have to use:
wizard
DDE(dynamic data exchange)
proc import (its best one)
(in projects we go for proc import only)
after reading into sas session we will go for cleaning.
| Is This Answer Correct ? | 5 Yes | 4 No |
For what purposes have you used sas macros? : sas-macro
What is proc sort?
What’s the difference between var b1 – b3 and var b1 — b3?
if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming
if i having variables named a b c d e f ,how to find total of each variable ????give syntax...??
how does sas handle missing values in functions? : Sas programming
what are methods to identify duplicate observations?
What do you feel about hardcoding?
how to delete the duplicate columns permanently in SQL
IS SAS COMPILER OR INTERPRETER? EXPLAIN?
3 Answers Aon Hewitt, HSBC, SCL, TCS,
calculate the sum of value using only DATA STEP. data count_; input year name $ value; cards; 2006 xxx 10 2007 yyy 12 2006 xxx 20 2008 yyy 15 2007 xxx 15 ; out put should be like this year name T_value ----------------------- 2006 xxx 30 2007 xxx 15 2007 yyy 12 2008 xxx 15
Have you been involved in editing the data or writing data queries?
1 Answers BioServe, Oracle, Sasken,