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
how to change the execute of macro
What are the features of SAS?
What is the use of the %include statement?
For what purpose would you use the RETAIN statement?
How we can call macros with in data step? : sas-macro
How do you debug and test your SAS programs?
How to create list output for cross-tabulations in proc freq?
for report generation which one you used proc report or data_null_?
What is the difference between using drop = data set option in data statement and set statement?
What is the SAS data set?
what is snowflake schema? : Sas-di
What are the features of base sas system?
Explain the special input delimiters used in sas programming.
how do you test for missing values? : Sas programming
Explain by-group processing?