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 / subbu
data s;
input no 1-2 area $ 3-15 am $ 16-30 ;
amount=input(am,comma15.);
format amount comma15.;
drop am;
cards;
1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
;
proc print;
run;
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
List down the reasons for choosing sas over other data analytics tools.
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
How would you identify a macro variable? : sas-macro
How to specify variables to be processed by the freq procedure?
what are the types of interactive display types? : Sas-bi
State the difference between INFORMAT and FORMAT ?
How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?
What is the difference between %put and symbolgen? : sas-macro
what versions of sas have you used (on which platforms)? : Sas programming
How you can read the variables that you need?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
Explain the purpose of substr functions in sas programming.
How can sas program be validated?