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 ? | 0 Yes | 3 No |
Post New Answer View All Answers
How we can call macros with in data step? : sas-macro
What are the differences between sum function and using “+” operator?
What are the features of SAS?
i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm
What is PROC in SAS?
what is factor analysis? : Sas-administrator
How will you generate test data with no input data?
What is the difference between class statement and by statement in proc means?
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
How long can a macro variable be? A token? : sas-macro
why is sas data integration studio important? : Sas-di
What are all the problems you faced while validating tables and reports?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
Why and when do you use proc sql?
What is SAS informats?