How to get any kind of data in SAS? Is it possible to take
data from notepad in SAS?
Answer Posted / naveen
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;
filename myfile "C:\Mydata\sample_accounts.txt";
data qqq;
infile myfile dlm=' ';
input Account OpenDate $ StatusCode $ CreditLimit;
run;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Are you involved in writing the inferential analysis plan? Tables specfications?
Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?
Explain the difference between informat and format with an example.
Mention the difference between ceil and floor functions in sas?
What are the limitations for memory allocation for SAS variables
Explain data step in SAS
What do you know about symput and symget?
In ARRAY processing, what does the DIM function do?
what is the use of proc contents and proc print in sas? : Sas-administrator
What is the function of output statement in a SAS Program?
If you could design your ideal job, what would it look like?
What is a method to debug and test your SAS program?
If a variable contains only numbers, can it be a character data type?
What is the differnce between SDTM 3.1.2 to 3.1.1 version
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.