1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
how to read the above data using input statement
consider the above data is in txt format externally
u have to use infile and input statement.
Answer Posted / ravikumar
Answer:
data cityrank;
input rank 1-2 @3 city $13. @16 amoutnt comma15.;
datalines;
1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
;
run;
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
how do you want missing values handled? : Sas programming
what are the component of range? : Sas-bi
What versions of SAS have you used (on which platforms)?
what r the job openings SAS for fresher graduates !
which date functions advances a date time or date/time value by a given interval? : Sas programming
List down the reasons for choosing sas over other data analytics tools.
What is the function of Stop statement in a SAS Program?
What are the ways in which macro variables can be created in sas programming?
What is the command used to find missing values?
What is the maximum and minimum length of macro variable
Explain what is data step?
what is star schema? : Sas-di
what is data integration? : Sas-di
how to remove duplicates using proc sql?
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.