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

how to change the execute of macro

1671


if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming

538


Mention what is PROC in SAS?

597


What is the difference between INPUT and INFILE ?

754


What is the work of tranwrd function?

662






what is the difference between nodup and nodupkey options? : Sas programming

617


Describe a time when you were really stuck on a problem and how you solved it?

2201


what are some differences between proc summary and proc means? : Sas programming

505


What are the difficulties u faced while doing vital signs table or dataset?

1931


how could you generate test data with no input data? : Sas programming

621


what are sas/access and sas/connect? : Sas programming

546


Mention how to limit decimal places for the variable using proc means?

641


What’s the difference between var b1 – b3 and var b1 — b3?

824


where are dashboard components are created and maintained? : Sas-bi

559


Are you involved in writing the inferential analysis plan? Tables specfications?

1742