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 / guest
data temp;
infile datalines ;
input sno city & $12.
pop : comma.;
datalines;
1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
;
The ampersand (&) modifier is used to read character values
that contain embedded blanks.
The colon (:) modifier is used to read nonstandard data
values and character values that are longer than eight
characters, but which contain no embedded blanks.
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is the sas data set? : sas-grid-administration
What is the use of divide function?
What are the different versions of sas that you have used until now? : sas-grid-administration
what is the Population you used in your project, is it ITT or PP?
Tell me more about the parameters in macro? : sas-macro
What are the different types of sas functions?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
which features do you use to check the data validations and errors? : Sas-administrator
What’s the difference between var b1 – b3 and var b1 — b3?
what are the categories that sas informats are used to the place the data? : Sas-administrator
What are pdv and it functions?
What are the difference between sas functions and procedures?
Describe what are the different levels of administrative users in sas? : sas-grid-administration
What are the features of base sas system?