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
why is sas data integration studio important? : Sas-di
How do you debug and test your SAS programs?
What is by-group processing?
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro
Give an example where SAS fails to convert character value to numeric value automatically?
Explain the purpose of substr functions in sas programming.
Mention the difference between ceil and floor functions in sas?
Differences between where and if statement?
How to include or exclude specific variables in a data set?
What do you know about sas and what we do? : sas-grid-administration
Which function is used to count the number of intervals between two sas dates?
What is the maximum and minimum length of macro variable
what is transformation in sas data integration? : Sas-di
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
What are the default statistics for means procedure?