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

To Solasa and others ....whenever you read data from an input file...you need to be careful about the last data value in every dataline you have values like x,xxx,xxx which is total width of 9, when you mention more than 9 the input pointer will go the next data line to get the remaining spaces. So in your code you used comma10. try with using comma9. I am very sure it will work.

Another option is if you want to keep that comma10. use TRUNCOVER in the infile statement, this should fix all the extra spaces you mention in the input statement.

let me know if this does not help you

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the best sas programming practices for handling very large datasets? : sas-grid-administration

1017


Tell me more about the parameters in macro? : sas-macro

1053


In proc transpose and data step with arrays which one you pick?

3112


how will you location sas platform applications available from web browser? : Sas-bi

1076


What would you change about your job?

2390


What do you know about sas data set?

1121


what is sas and what are the functions? : Sas-administrator

992


What is the difference between SAS functions and procedures?

1153


What is the basic structure of the SAS base program?

1331


What is program data vector (pdv) and what are its functions?

1251


I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.

2154


In SAS explain which statement does not perform automatic conversions in comparisons?

1314


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

1011


What areas of SAS are you most interested in?

1537


Describe the ways in which you can create a macro variable?

1084