hi guys ...i have one query...
data abc;
input s w k g o t a m;
cards;
1 2 3 4 5 6 7 8
2 3 4 5 6 7 8 9
;
run;

i want the output to be the sorted order(only
variables).observations should not be changed..

Answers were Sorted based on User's Feedback



hi guys ...i have one query... data abc; input s w k g o t a m; cards; 1 2 3 4 5 6 7 8 2 3 4 5..

Answer / vishnu

create data set as given above.Next follow the below step.

data abc;
format a $2.;
format g $2.;
format k $2.;
format m $2.;
format o $2.;
format s $2.;
format t $2.;
format w $2.;
set abc;
run;

Run the above program u will get variables in sorted order.

Note:-In the place of format statement u can use length
statement.

Is This Answer Correct ?    2 Yes 6 No

hi guys ...i have one query... data abc; input s w k g o t a m; cards; 1 2 3 4 5 6 7 8 2 3 4 5..

Answer / sravan

data xyz;
set abc;
retain a g k m o s t;
run;

Is This Answer Correct ?    3 Yes 9 No

hi guys ...i have one query... data abc; input s w k g o t a m; cards; 1 2 3 4 5 6 7 8 2 3 4 5..

Answer / guest

data abc;
input s w k g o t a m;
cards;
1 2 3 4 5 6 7 8
2 3 4 5 6 7 8 9
;
run;
proc sort data=abc;
run;

Is This Answer Correct ?    2 Yes 24 No

hi guys ...i have one query... data abc; input s w k g o t a m; cards; 1 2 3 4 5 6 7 8 2 3 4 5..

Answer / amar

Proc sort data=dataset;
by idnumber ;
run;

Is This Answer Correct ?    2 Yes 25 No

Post New Answer

More SAS Interview Questions

Name statements that function at both compile and execution time?

1 Answers  


What would be the value of month at the end of data step execution and how many observations would be there?

0 Answers  


What versions of SAS have you used (on which platforms)?

0 Answers   Quintiles,


How do you put a giraffe into the refrigerator?

3 Answers   Oracle,


Hi I have list of products in a dataset, which are classified by other name for eg:- there is a product A> Malambo Shiraz Malbec 750ML(0388) which is a Red wine.Now i need to generate a report where it shows if this product appears then it should b displayed as red wine,similarly for other products and other classification. I dont wan use proc format.

4 Answers   Symphony,






Which is the best training institute for SAS in Delhi. Please reply

12 Answers   HCL, HSBC,


what is the difference between compiler and interpreter? give any one example (software product) that act as a interpreter?

36 Answers   Accenture, College School Exams Tests, CTS, IBM, IHRD, Infosys, Sylhet Engineering College, TCS, Wipro,


name few built in sas transformation in DI studio ?

4 Answers   SAS,


How can I remove header from output data set?

0 Answers  


How we will Developing new reports Using Data step programming and Macros ?

4 Answers  


here is a string like chq.2312244%4452- from that i want only special characters in a column. dont use compress. bcoz i have 1.2 billion of records.i want another process to find the values instant from the data.

2 Answers   Cap Gemini, L&T,


what is ae onset date n what is RDS

0 Answers   Accenture,


Categories