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 / amy
Add a colon modifier before the informat (commaw.) and increase the informat width, like the following.
data cityrank;
infile 'D:\miths data\Mithelesh\cityrank.txt' ;
input rank city $12. amount : comma15.;
run;
proc print data=cityrank;
run;
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
Describe the function and untility of the most difficult SAS macro that you have written.
For what purpose would you use the RETAIN statement?
Name and describe few sas character functions that are used for data cleaning in brief.
where to use sas business intelligence? : Sas-bi
Give e an example of..
How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?
What are the different operating system platforms in which we can use sas? : sas-grid-administration
what are some differences between proc summary and proc means? : Sas programming
Do you need to rearrange the order of the data for the report?
which date function advances a date, time or datetime value by a given interval? : Sas programming
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
Explain what Proc glm does?
In SAS explain which statement does not perform automatic conversions in comparisons?
What do you code to create a macro? : sas-macro
What is the basic structure of the SAS base program?