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 / amy

Add a colon modifier before the informat (commaw.) and increase the informat width, like the following.

data cityrank;
infile 'D:\miths data\Mithelesh\cityrank.txt' ;
input rank city $12. amount : comma15.;
run;
proc print data=cityrank;
run;

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you generate test data with no input data?

561


what are sas bi dashboard components? : Sas-bi

655


Intern stastical programmer written test

282


what is information maps?

1612


What is the function of Stop statement in a SAS Program?

642






Explain the use of proc print and proc contents?

556


What would you change about your job?

1920


I need level 2 to 5 sas using companies in india

1926


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1467


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

505


What does PROC print, and PROC contents do?

723


what has been your most common programming mistake? : Sas programming

562


What do the mod and int function do? : Sas programming

575


Describe the function and untility of the most difficult SAS macro that you have written.

1556


What do you code to create a macro? : sas-macro

576