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 / solasa

data cityrank;
infile 'D:\miths data\Mithelesh\cityrank.txt' ;
input rank city & $12. amoutnt comma10.;
run;
proc print data=cityrank;
run;

problem with amount varible
tell what to do?

Is This Answer Correct ?    3 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how sas deals with business intelligence? : Sas-bi

586


what is sas database server? : Sas-di

619


What are the five ways to do a table lookup in sas? : sas-grid-administration

601


Which statement does not perform automatic conversions in comparisons?

1206


Explain the difference between informat and format with an example.

689






How would you identify a macro variable? : sas-macro

537


What was the last computer book you purchased? Why?

1918


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

551


How do you control the number of observations and/or variables read or written?

753


What areas of SAS are you most interested in?

1070


how many types of prompts are there? : Sas-bi

557


What is the role of unrestrictive users? : sas-grid-administration

576


How to test the debugging in sas?

612


What is the difference between using drop = data set option in data statement and set statement?

642


Mention common programming errors committed in sas ?

649