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

Answer:

data cityrank;
input rank 1-2 @3 city $13. @16 amoutnt comma15.;
datalines;
1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
;
run;

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the ways in which macro variables can be created in sas programming?

573


Mention few capabilities of sas framework.

696


sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

3114


which features do you use to check the data validations and errors? : Sas-administrator

554


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

549






what is treatment emergent events and treatment emregent adverse event

1949


What are the limitations for memory allocation for SAS variables

934


What is the maximum length of the macro variable?

680


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

647


How to create an external dataset with sas code?

590


what is program data vector? : Sas-administrator

617


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?

643


How is character variable converted into numeric variable and vice versa?

602


What are the default statistics that proc means produce?

606


explain the use of % includes a statement in sas? : Sas-administrator

553