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
How will you generate test data with no input data?
what are sas bi dashboard components? : Sas-bi
Intern stastical programmer written test
what is information maps?
What is the function of Stop statement in a SAS Program?
Explain the use of proc print and proc contents?
What would you change about your job?
I need level 2 to 5 sas using companies in india
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
what are some differences between proc summary and proc means? : Sas programming
What does PROC print, and PROC contents do?
what has been your most common programming mistake? : Sas programming
What do the mod and int function do? : Sas programming
Describe the function and untility of the most difficult SAS macro that you have written.
What do you code to create a macro? : sas-macro