Date: Thu, 20 May 2004 22:04:18 +0530
Reply-To: "Sharma, Diwakar (Corporate)" <diwakar.sharma@GE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Sharma, Diwakar (Corporate)" <diwakar.sharma@GE.COM>
Subject: SORT / SUBSET Vs SUBSET / SORT
Content-Type: text/plain; charset="iso-8859-1"
Hi,
Given a dataset having a character variable x, the aim is to create subset datasets such that :-
subset dataset has x having same length
subset dataset is sorted by x
Example
data a;
input x $;
cards;
12
56
312
8
32
756
5
76
345
;
run;
The output should be
dataset a1 having
5
8
dataset a2 having
12
32
56
76
dataset a3 having
312
345
756
There are two approaches
1. First Sort then Subset
2. First Subset then Sort
Which is the better one ???? Any takers
Thanks
Diwakar
|