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

data cityrank;

input rank @3 city $ 13. amount : comma15.;
datalines;
1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900

;
run;
proc print data=cityrank;
run;

this is the ans only for this example new york has more than
single blank so problem arise hire.if not & modifier can be
used.

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain data_null_?

611


what is transformation in sas data integration? : Sas-di

560


explain the key concept of sas? : Sas-administrator

563


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

548


If a variable contains letters or special characters, can it be numeric data type?

766






Define run-group processing?

583


Explain what is the use of proc gplot?

708


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

687


What would you change about your job?

1929


Explain by-group processing?

591


what type of graphs we will create(for 2+years candidates)?

1908


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.

1700


what is function of retain statment

1528


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

803


what are the component of range? : Sas-bi

618