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


Please Help Members By Posting Answers For Below Questions

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

1614


what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

694


List down the reasons for choosing sas over other data analytics tools.

812


what do the mod and int function do? What do the pad and dim functions do? : Sas programming

617


How would you identify a macro variable? : sas-macro

537






How to specify variables to be processed by the freq procedure?

619


what are the types of interactive display types? : Sas-bi

656


State the difference between INFORMAT and FORMAT ?

599


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?

2387


What is the difference between %put and symbolgen? : sas-macro

675


what versions of sas have you used (on which platforms)? : Sas programming

587


How you can read the variables that you need?

655


what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming

572


Explain the purpose of substr functions in sas programming.

568


How can sas program be validated?

581