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

data poo;
infile 'D:\poo.txt ';
input rank country $ 12. salary ;
INFORMAT SALARY COMMA10.;
FORMAT SALARY COMMA10.;
run;

proc print;
run;

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

1795


what is transformation in sas data integration? : Sas-di

552


where to use sas business intelligence? : Sas-bi

576


What is a pdv and what are its functions?

598


Which function is used to count the number of intervals between two sas dates?

566






Where do you use proc means over proc freq?

558


What is the difference between %local and %global? : sas-macro

666


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

1222


what are input dataset and output dataset options? : Sas programming

561


How would you define the end of a macro?

698


what is the difference between infile and input? : Sas-administrator

605


what are informats in sas? : Sas-administrator

584


For what purpose would you use the RETAIN statement?

1041


How would you determine the number of missing or nonmissing values in computations?

646


how will you locate the sas platform applications? : Sas-bi

581