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 metadata? : Sas-bi
for what purpose would you use the retain statement? : Sas programming
what does the run statement do? : Sas programming
Which are the statements whose placement in the data step is critical?
What is the sas data set? : sas-grid-administration
what can you learn from the sas log when debugging? : Sas programming
what is the effect of the options statement errors=1? : Sas programming
How to limit decimal places for the variable using proc means?
How to read an input file in sas?
What is the difference between one to one merge and match merge? Give an example.
What are the new features included in the new version of SAS Programming Language?
Mention what is the difference between nodupkey and nodup options?
Explain bmdp procedure?
what is the use of proc sql? : Sas programming
How would you determine the number of missing or nonmissing values in computations?