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 the limit of the number of the rows and columns available in the worksheet? : Sas-bi
what is data governance? : Sas-di
What is a method to debug and test your SAS program?
what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
how do you test for missing values? : Sas programming
how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming
If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?
What do you code to create a macro? : sas-macro
What was the last computer book you purchased? Why?
How to include or exclude specific variables in a data set?
what is the purpose of _error_? : Sas programming
What are types of transport files?
what are the types of interactive display types? : Sas-bi
Describe a time when you were really stuck on a problem and how you solved it?