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
Explain data_null_?
what is transformation in sas data integration? : Sas-di
explain the key concept of sas? : Sas-administrator
name some data transformation used in sas di? : Sas-di
If a variable contains letters or special characters, can it be numeric data type?
Define run-group processing?
Explain what is the use of proc gplot?
Explain the difference between using drop = data set option in set and data statement?
What would you change about your job?
Explain by-group processing?
what type of graphs we will create(for 2+years candidates)?
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.
what is function of retain statment
In SAS explain which statement does not perform automatic conversions in comparisons?
what are the component of range? : Sas-bi