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 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 11 Jul 2002 12:19:51 -0400
Reply-To:   Robert Abelson <rabelson@KAI-RESEARCH.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Robert Abelson <rabelson@KAI-RESEARCH.COM>
Subject:   Re: variable selection in output statement
Content-Type:   text/plain

Daniele,

You could do it this way:

data data2(keep=...) data3(keep=...); set data1; if <condition> then output data2; else output data3; run;

HTH.

Bob Abelson KAI 6001 Montrose Rd. Suite 920 Rockville, MD 20852 T: 301-770-2730 F: 301-770-4183 rabelson@kai-research.com

"Politics should be limited in scope to war, protection of property, and the occasional precautionary beheading of a member of the ruling class." -- P.J. O'Rourke

> -----Original Message----- > From: Daniele Monzali [SMTP:Daniele.Monzali@PROMETEIA.IT] > Sent: Thursday, July 11, 2002 11:52 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: variable selection in output statement > > Hello All > do you know if it is possible to generate an output statement in a data > step > selecting different variables for different datasets in output ? > It would be something like > > data data2 data3; > set data1; > if <condition> then output data2 (keep=....); > else output data3 (keep=...=; > run; > > thanks a lot > daniele > > -- > Daniele Monzali, Ph.D. > Area Financial Planning and Risk Management > Gruppo Credit Risk > Prometeia > Via Marconi, 43 40122 Bologna > Tel 0039 051 6480911 > Mobile 0039 348 4038038


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