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 to read an input file in sas?
what is the use of proc contents and proc print in sas? : Sas-administrator
Describe 5 ways to do a “table lookup” in SAS?
do you prefer proc report or proc tabulate? Why? : Sas programming
What is the difference between where and if statement?
Explain data_null_?
What is interleaving in SAS?
Do you know the features of sas?
Why and when do you use proc sql?
what is hash files in sas and why we are using this one in sas?
what is the difference between floor and ceil functions in sas? : Sas-administrator
how could you generate test data with no input data? : Sas programming
If a variable contains only numbers, can it be a character data type?
For what purposes have you used sas macros? : sas-macro
explain what is data set in sas? : Sas-administrator