Code a PROC SORT on a data set containing State, District
and County as the primary variables, along with several
numeric variables.

Answers were Sorted based on User's Feedback



Code a PROC SORT on a data set containing State, District and County as the primary variables, alon..

Answer / lakshmi

proc sort data=data1 out=data2;
by district state country;
run;

Is This Answer Correct ?    7 Yes 0 No

Code a PROC SORT on a data set containing State, District and County as the primary variables, alon..

Answer / chiranjeevi

data code;
infile'C:\Documents and Settings\admin\Desktop\country.txt';
input state$ district$ county$ population total;
proc sort data=code out=count;
by state district county;
run;
proc print data=count;
run;

Is This Answer Correct ?    5 Yes 1 No

Code a PROC SORT on a data set containing State, District and County as the primary variables, alon..

Answer / radhika rakesh

here some step has syntax errors lik in input statement its
mentioned as $ state and so but correct form is state $...

Is This Answer Correct ?    4 Yes 0 No

Code a PROC SORT on a data set containing State, District and County as the primary variables, alon..

Answer / swarup

Proc Sort data=data1 out=data2;
By State District County _numeric_;
Run;

Is This Answer Correct ?    3 Yes 0 No

Code a PROC SORT on a data set containing State, District and County as the primary variables, alon..

Answer / pallavi

data abc;
infile 'c:\country.txt';
input &state &district &country population total:
proc sort data=abc:
by state district country;
proc print data=abc;
run;

Is This Answer Correct ?    3 Yes 2 No

Code a PROC SORT on a data set containing State, District and County as the primary variables, alon..

Answer / prakash

data info;
infile 'C:\country.txt';
input $state $district $country population total;
proc sort data=info;
by state district country;
proc print data= info ;
run;

Is This Answer Correct ?    3 Yes 4 No

Code a PROC SORT on a data set containing State, District and County as the primary variables, alon..

Answer / daya

data daya;
infile 'c:\country.txt';
input &state &district &country population total:
proc sort data=daya:
by state;
proc print data=daya;
run;

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SAS Interview Questions

Briefly describe 5 ways to do a "table lookup" in sas.

4 Answers   Quintiles,


Hi im new to sas. I have a file with some charecter variables and some numeric variables now i want to load charecter variables into one datastep and numeric variables into another data step pls let me know Thanks

2 Answers  


What is the order of evaluation of the comparison && logical && relational operators:?

2 Answers   CitiGroup,


If you were told to create many records from one record show how you would do this using arrays and with PROC TRANSPOSE?

1 Answers   HCL, Quintiles,


what is Global Symbol table and Local symbol table?

4 Answers   CitiGroup,


What are the automatic variables for macro? : sas-macro

0 Answers  


Which are SAS Windows Clients & SAS Java Clients

3 Answers   TCS,


why is sas considered self-documenting? : Sas programming

0 Answers  


. Which date advances a date, time or date/time value by a given interval?

8 Answers  


How do you use the do loop if you don’t know how many times you should execute the do loop?

0 Answers  


What is SAS Information Map Studio and its purpose ?

2 Answers   SAS, TCS,


Hi, I have one dataset like id date ex: id date 1 13 1 13Oct2011 2 14 2 14Oct2011 3 15 3 15Oct2011 --->this is the current date here i want date format like 13Oct2011,14Oct2011 how we can modify the numeric to date format plz answer.

4 Answers  


Categories