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 / pravin
data cityrank;
input rank @3 city $ 13. amount : comma15.;
datalines;
1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
;
run;
proc print data=cityrank;
run;
this is the ans only for this example new york has more than
single blank so problem arise hire.if not & modifier can be
used.
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
explain the function of substr in sas? : Sas-administrator
Explain why double trailing @@ is used in input statement?
what is the difference between infile and input? : Sas-administrator
What does the RUN statement do?
what is sas data set?
What are the prime responsibilities of data integration administrator? : Sas-di
what is data governance? : Sas-di
how does sas handle missing values in sort order? : Sas programming
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
What is slibref?
Describe the ways in which you can create a macro variable?
Differences between where and if statement?
What do you know about sas data set?
What does PROC print, and PROC contents do?
what is ae onset date n what is RDS