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
how to change the execute of macro
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
Mention what is PROC in SAS?
What is the difference between INPUT and INFILE ?
What is the work of tranwrd function?
what is the difference between nodup and nodupkey options? : Sas programming
Describe a time when you were really stuck on a problem and how you solved it?
what are some differences between proc summary and proc means? : Sas programming
What are the difficulties u faced while doing vital signs table or dataset?
how could you generate test data with no input data? : Sas programming
what are sas/access and sas/connect? : Sas programming
Mention how to limit decimal places for the variable using proc means?
What’s the difference between var b1 – b3 and var b1 — b3?
where are dashboard components are created and maintained? : Sas-bi
Are you involved in writing the inferential analysis plan? Tables specfications?