Date: Thu, 22 Jan 2004 16:00:21 -0500
Reply-To: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject: Re: proc SORT - create variables during execution?
Content-Type: text/plain; charset="iso-8859-1"
Kinda.
Create a view that adds the additional field, sort the view specifying an
out= dataset.
data a / view=a;
set ds1;
tempyear = year(target_date);
run;
proc sort data = a
out = ds2;
by ... ;
run;
-----Original Message-----
From: Rebecca Jones [mailto:rjones2@FFIC.COM]
Sent: January 22, 2004 3:50 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: proc SORT - create variables during execution?
Is there any way to code a proc SORT to create a new field in the out=
dataset? For instance, a year variable from an existing date:
TEMPYEAR = year(TARGET_DATE).
|