How to get any kind of data in SAS? Is it possible to take
data from notepad in SAS?
Answer Posted / sas29
Data sample_accounts;
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
CARDS;
1234670 11-Sep-04 Z 2000
1234671 12-Sep-04 3000
1234672 13-Sep-04 Z 2500
1234673 14-Sep-04 T 3200
1234674 15-Sep-04 8000
run;
method1
--------------------------
Data sample_accounts;
INFILE "C:\Mydata\sample_accounts.txt";
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
RUN;
method 2
-----------------------------------
filename sacc "D:\Mydata\sample_accounts.txt";
Data sample_accounts;
INFILE sacc ;
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
RUN;
method 3;
use proc import:
method 4:
use proc cimport for xpt files into sas
| Is This Answer Correct ? | 28 Yes | 0 No |
Post New Answer View All Answers
What is a pdv and what are its functions?
Tell me more about the parameters in macro? : sas-macro
What are the functions which are used for character handling functions?
To what type of programms have you used scratch macros?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
What is the difference between %local and %global? : sas-macro
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
what is star schema? : Sas-di
What are the data types in sas?
What is the function of output statement in a SAS Program?
how does sas handle missing values in formats? : Sas programming
What is connection profile? : sas-grid-administration
What is the maximum and minimum length of macro variable
how does sas handle missing values in procs? : Sas programming