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


Please Help Members By Posting Answers For Below Questions

what is metadata? : Sas-bi

598


for what purpose would you use the retain statement? : Sas programming

579


what does the run statement do? : Sas programming

554


Which are the statements whose placement in the data step is critical?

758


What is the sas data set? : sas-grid-administration

564






what can you learn from the sas log when debugging? : Sas programming

607


what is the effect of the options statement errors=1? : Sas programming

588


How to limit decimal places for the variable using proc means?

595


How to read an input file in sas?

653


What is the difference between one to one merge and match merge? Give an example.

565


What are the new features included in the new version of SAS Programming Language?

733


Mention what is the difference between nodupkey and nodup options?

595


Explain bmdp procedure?

612


what is the use of proc sql? : Sas programming

592


How would you determine the number of missing or nonmissing values in computations?

646