LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 28 Jul 2000 10:36:23 -0700
Reply-To:     KP <kpaddockNOkpSPAM@SCOHS.ON.CA.INVALID>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         KP <kpaddockNOkpSPAM@SCOHS.ON.CA.INVALID>
Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here
Subject:      writing selected records from large dataset to small...urgent!

Hi all,

I am having trouble with taking certain records from a larger dataset to a smaller one. The samples in the manual, etc. all describe ways to select 'the first 5 records' or 'the first and last' records or 'a random selection of records'.

What I want to do is select a bunch of records such as: record 12, record 3, record 342, record 16. I want to take these observations (by record i.d.) out of the big dataset and save them in a new, smaller one.

I'm not sure whether to subset in a datastep with where, or to use proc print or proc printto. Below is one of my attempts with the error message:

1 **********first make a much smaller complete database for the quarter w/just pall**; 2 3 libname consults 'l:\research\kathie\consults'; NOTE: Libref CONSULTS was successfully assigned as follows: Engine: V612 Physical Name: l:\research\kathie\consults 4 5 data consults.pall12; 6 set consults.qscoh12 (where=(a6a in (43934, 7 41254, ....., 75 43100, 76 43872))); ERROR: Where clause operator requires compatible variables.

any help is VERY much appreciated! I am in a deadline situation, so I'll be glad to receive quick replies!

Kathie

-----------------------------------------------------------

Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free! http://www.keen.com


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