Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Add a colon modifier before the informat (commaw.) and increase the informat width, like the following.

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

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

is data integration and etl programming is same? : Sas-di

1084


How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

2462


how can you create zero observation dataset? : Sas programming

1151


What is the difference between nodupkey and nodup options?

1041


How can you limit the variables written to output dataset in data step?

1319


Given an unsorted data set, how to read the last observation to a new data set?

1355


what is hash files in sas and why we are using this one in sas?

2217


what is sas business intelligence? : Sas-bi

1183


what is sas data set?

1109


name some data transformation used in sas di? : Sas-di

972


what other sas products have you used and consider yourself proficient in using? : Sas programming

1115


what is program data vector? : Sas-administrator

1079


What do you know about sas and what we do? : sas-grid-administration

1150


How would you identify a macro variable?

1097


What do the mod and int function do? : Sas programming

1234