LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page