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


Please Help Members By Posting Answers For Below Questions

Mention the category in which sas informats are placed?

624


how could you generate test data with no input data? : Sas programming

621


What are the prime responsibilities of data integration administrator? : Sas-di

585


How to create an external dataset with sas code?

584


What is your favorite all time computer book? Why?

2044






What areas of SAS are you most interested in?

1062


Explain the purpose of substr functions in sas programming.

561


Do you need to rearrange the order of the data for the report?

1830


How is character variable converted into numeric variable and vice versa?

593


Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya

1345


what is sas metadata repository? : Sas-bi

599


what is sas business intelligence? : Sas-bi

584


How you can read the variables that you need?

653


how many display types available in sas bi dashboard? : Sas-bi

638


what are input dataset and output dataset options? : Sas programming

561